We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请确认下列注意事项:
当前最新版本号是:1.7.0 我使用的版本是:1.7.0
1、我搜索TranslatedPersonRecognition和JapenesePersonRecognition发现这两个java类只被维特比、最短路径、n最短路径分词所用到,CRF和感知机分词没有用到,那么如果我想让CRF和感知机分词能识别日本人名和翻译人名是否只能依靠训练新的相关语料? 2、如果我想识别新的人名类型(如少数民族人名),字典文件是否只需要准备一份带有人名关键字的nrx.txt呢?trie.dat和value.dat是自动生成的吗? 再次感谢您的时间和耐心!
public class DemoJapaneseNameRecognition { public static void main(String[] args) { String[] testCase = new String[]{ "北川景子参演了林诣彬导演的《速度与激情3》", "林志玲亮相网友:确定不是波多野结衣?", "龟山千广和近藤公园在龟山公园里喝酒赏花", }; Segment segment = HanLP.newSegment("crf").enableJapaneseNameRecognize(true); for (String sentence : testCase) { List<Term> termList = segment.seg(sentence); System.out.println(termList); } } }
[北川景子/nrj, 参演/v, 了/ule, 林诣彬/nr, 导演/nnt, 的/ude1, 《/w, 速度/n, 与/cc, 激情/n, 3/m, 》/w] [林志玲/nr, 亮相/vi, 网友/n, :/w, 确定/v, 不是/c, 波多野结衣/nrj, ?/w] [龟山千广/nrj, 和/cc, 近藤公园/nrj, 在/p, 龟山/nz, 公园/n, 里/f, 喝酒/vi, 赏花/nz]
[北川/ns, 景子/n, 参演/v, 了/u, 林诣彬/nr, 导演/n, 的/u, 《/w, 速度/n, 与/c, 激情/n, 3/m, 》/w] [林志玲/nr, 亮相/v, 网友/n, :/w, 确定/v, 不/d, 是/v, 波多野/n, 结衣/n, ?/w] [龟/v, 山/n, 千/m, 广/q, 和/c, 近藤/a, 公园/n, 在/p, 龟山公园/ns, 里/f, 喝/v, 酒/n, 赏/v, 花/n]
The text was updated successfully, but these errors were encountered:
ce949cd
你好,TranslatedPersonRecognition和JapenesePersonRecognition都是基于规则的,与感知机模型格格不入,所以没有调用这两个函数。虽然现在加入了对这两个模块的支持,但依然建议优先采用语料库来解决。
Sorry, something went wrong.
使LexicalAnalyzer支持TranslatedPersonRecognition和JapanesePersonRecognition
99c3f62
fix #1080
No branches or pull requests
注意事项
请确认下列注意事项:
版本号
当前最新版本号是:1.7.0
我使用的版本是:1.7.0
我的问题
1、我搜索TranslatedPersonRecognition和JapenesePersonRecognition发现这两个java类只被维特比、最短路径、n最短路径分词所用到,CRF和感知机分词没有用到,那么如果我想让CRF和感知机分词能识别日本人名和翻译人名是否只能依靠训练新的相关语料?
2、如果我想识别新的人名类型(如少数民族人名),字典文件是否只需要准备一份带有人名关键字的nrx.txt呢?trie.dat和value.dat是自动生成的吗?
再次感谢您的时间和耐心!
触发代码
期望输出
实际输出
其他信息
The text was updated successfully, but these errors were encountered: