Note | Visit the full online document mynlp.mayabot.com |
This chapter describes how to install and simply use the basic functions of mynlp.
mynlp has been published in the Maven central repository, so you only need to introduce mynlp.jar dependencies in Maven or Gradle.
compile 'com.mayabot.mynlp:mynlp:4.0.0'
< dependency >
< groupId >com.mayabot.mynlp</ groupId >
< artifactId >mynlp</ artifactId >
< version >4.0.0</ version >
</ dependency >Because the resource file is large, the mynlp.jar package does not include resource file (dictionary and model file) dependencies by default.
The lazy scheme, by citing the resource dictionary provided by mynlp-all, meets most needs.
compile 'com.mayabot.mynlp:mynlp-all:4.0.0'
| Gradle coordinates | mynlp-all dependency | File size | illustrate |
|---|---|---|---|
com.mayabot.mynlp.resource:mynlp-resource-coredict:1.0.0 | Y | 18.2M | Core Dictionary (20w+words, 500w+binary) |
com.mayabot.mynlp.resource:mynlp-resource-pos:1.0.0 | Y | 17.5M | Part-of-speech annotation model (perceptor model) |
com.mayabot.mynlp.resource:mynlp-resource-ner:1.0.0 | Y | 13.4M | Named entity recognition (personal name recognition, other NER) |
com.mayabot.mynlp.resource:mynlp-resource-pinyin:1.1.0 | Y | 272K | Pinyin dictionary, pinyin sync model |
com.mayabot.mynlp.resource:mynlp-resource-transform:1.0.0 | Y | 478K | Traditional Chinese Dictionary |
com.mayabot.mynlp.resource:mynlp-resource-cws:1.0.0 | N | 62.4M | Perceptual machine word segmentation model |
com.mayabot.mynlp.resource:mynlp-resource-custom:1.0.0 | N | 2.19M | Custom extended thesaurus |
According to actual needs, introduce resource packages as needed.
compile 'com.mayabot.mynlp:mynlp:3.2.0'
// 核心词典
implementation 'com.mayabot.mynlp.resource:mynlp-resource-coredict:1.0.0'
// 词性标注
implementation 'com.mayabot.mynlp.resource:mynlp-resource-pos:1.0.0'
// 命名实体
implementation 'com.mayabot.mynlp.resource:mynlp-resource-ner:1.0.0'
// 拼音
implementation 'com.mayabot.mynlp.resource:mynlp-resource-pinyin:1.1.0'
// 繁简体转换
implementation 'com.mayabot.mynlp.resource:mynlp-resource-transform:1.0.0'
// 感知机分词模型
// implementation 'com.mayabot.mynlp.resource:mynlp-resource-cws:1.0.0'
// 自定义扩展词库
// implementation 'com.mayabot.mynlp.resource:mynlp-resource-custom:1.0.0' mynlp.mayabot.com
HanLP
ansj_seg
Mynlp implementation refers to their algorithm implementation and some code