Giter VIP home page Giter VIP logo

mynlp's Introduction

MYNLP 中文NLP工具包

License Maven Central Latest release

一个高性能、模块化、可扩展的中文NLP工具包

Wiki文档



如果你认可MYNLP,欢迎CLONE、FORK、ISSUE,请STAR鼓励一下 :)

mynlp是一个开源高性能、模块化、可扩展的中文NLP工具包。

设计目标:

  • 企业级
  • 高性能
  • 模块化
  • 可扩展
  • 多场景
  • 柔性API

Getting Started

只需要导入maven依赖,无需配置和额外资源下载。

Requirements

您需要 JAVA1.8+ 运行环境

Installation

mynlp多个功能被划分在不同的模块中,下面演示分词模块:

GRADLE

compile 'com.mayabot.mynlp:mynlp-segment:3.0.1'

或者MAVEN

<dependency>
  <groupId>com.mayabot.mynlp</groupId>
  <artifactId>mynlp-segment</artifactId>
  <version>3.0.1</version>
</dependency>
模块(artifactId) 功能
mynlp-core 基础功能 Guice、logger、资源、基础数据结构和算法
mynlp-perceptron 通用序列标注感知机
mynlp-segment 分词
mynlp-classification 文本分类
mynlp-lucene lucene 分析器接口实现
mynlp-pinyin 文字转拼音
mynlp-summary 文本摘要
mynlp-transform 繁简体互转

中文分词示例

Kotlin:

println("mynlp是mayabot开源的中文NLP工具包。".lexer().toList())

Java:

Lexer lexer = Lexers.coreBuilder()      //core分词构建器
                     .withPos()         //开启词性
                     .withPersonName()  //开启人名
                     .build();          // 创建定制词法分析对象
                     
Sentence sentence = lexer.scan("mynlp是mayabot开源的中文NLP工具包。");

System.out.println(sentence.toList());

输出:

[mynlp/x, 是/v, mayabot/x, 开源/v, 的/u, 中文/nz, nlp/x, 工具包/n, 。/w]

添加微信公众号:加入微信交流群、获取最新NLP相关文章和动态。

weixin

包含功能和资源如下:

  • 中文分词

    • CORE分词

      • 二元语言模型 + viterbi解码算法 + 基础规则(数字、英文、日期..。_
      • 高性能:速度200万+字/秒(2.6GHz Intel i7)
    • 感知机分词

      基于感知机序列标注算法 + 基础规则。_

    • CRF分词

      高性能CRF解码器 + 基础规则。

    • 人名识别

      基于感知机实现,高准确率,高性能,自动排除歧义。

    • NER命名实体识别

    • 自定义功能

      自定义词库、分词纠错

    • 柔性API和PIPELINE设计模式

      自由组合和扩展分词逻辑需求

  • 词性标注

    基于感知机的词性标注

  • 拼音转换

    文字转拼音,好用的API

  • 文本分类

    基于fastText Java原生实现

  • 简繁体转换

  • 感知机通用接口

    提供一个通用的感知机基础API

  • 文本摘要

    简单的文本摘要实现

  • 基础架构

    • 基于GUICE的IOC实现可插拔的组件开发
    • 高性能、易扩展的基础数据结构
  • 词典和语料库资源

    • 二元模型
      • 二元模型词数量达20万+
      • 二元接续词配对数量485万+(Hanlp对应资源大概290万+)
    • 感知机模型
      • 训练语料库字数7000万+
    • 词性标注
      • 训练语料库字数3000万+
    • 人名识别
      • 训练语料库字数3000万+
    • 地名、组织机构名
      • 训练语料库字数3000万+
    • 语料库来源
      • 公开语料库
        • 收集的互联网资源
      • 自建语料库
        • 基础数据为人民日报2014全年内容,通过Hanlp、中科院等多种分词器自动切分对比差异,再经过50人月时间修复、校验 后获得的分词语料库。

声明和致谢

早期在使用ansj和hanlp过程中,遇到很多问题无法解决和扩展,mynlp开发之初借鉴了算法实现,通过多次迭代和项目需求驱动实践,逐渐发展为目前自有的架构体系。 也向HanLP和ansj在中文NLP开源中做出的贡献和努力致敬!

mynlp项目参考了以下项目:

计划

跨平台

  • Kotlin多平台特性,为 Android、iOS、Linux、Windows、 Mac支持
  • 跨平台动态库文件
  • 为Python RUST 语言提供支持接口

mynlp's People

Contributors

jimichan avatar xswds123 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.