问题描述
我想知道是否可以使用Stanford CoreNLP
来检测句子所用的语言?如果是这样,这些算法的精确度如何?
I'm wondering if it is possible to use Stanford CoreNLP
to detect which language a sentence is written in? If so, how precise can those algorithms be?
推荐答案
几乎可以确定,斯坦福大学COreNLP目前没有语言标识. '几乎'-因为不存在很难证明.
Almost certainly there is no language identification in Stanford COreNLP at this moment. 'almost' - because nonexistence is much harder to prove.
不过,以下是间接证据:
Nevertheless, below are circumstantial evidences:
- 在主要页,也没有 CoreNLP页,也没有在常见问题解答(尽管有问题如何在其他语言上运行CoreNLP?")或 2014CoreNLP作者的论文; 结合了多个NLP库的
- 工具包括Stanford CoreNLP,请使用另一个lib作为语言标识,例如 DKPro Core ASL ;还其他谈论语言识别和CoreNLP的用户没有提及此功能
- CoreNLP的源文件包含
Language
类,但与语言识别无关-您可以手动检查所有84个出现的语言"单词此处
- there is no mention of language identification neither on mainpage, nor CoreNLP page, nor in FAQ (although there isa question 'How do I run CoreNLP on other languages?'), nor in 2014paper of CoreNLP's authors;
- tools that combine several NLP libsincluding Stanford CoreNLP use another lib for languageidentification, for example DKPro Core ASL; also otherusers talking about language identification and CoreNLP don't mention this capability
- source file of CoreNLP contains
Language
classes, but nothing related to language identification - you cancheck manually for all 84 occurrence of 'language' word here
尝试 TIKA 或 TextCat 或 Java语言检测库(他们报告"53种语言的精度提高了99%").
Try TIKA, or TextCat, or Language Detection Library for Java (they report "99% over precision for 53 languages").
通常,质量取决于输入文本的大小:如果输入文本足够长(例如,至少几个单词并且没有特别选择),则精度可以很好-约为95%.
In general, quality depends on the size of input text: if it is long enough (say, at least several words and not specially chosen), then precision can be pretty good - about 95%.
这篇关于使用Stanford NLP检测语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!