
有沒有一個工具可以偵測幾個段落的文字語言?
答案1
有很多工具可以做到這一點,我能想到的第一個是谷歌自己的: http://code.google.com/apis/ajax/playground/#language_detect
- 在java中,有http://textcat.sourceforge.net/
- 在紅寶石中https://github.com/peterc/whatlanguage
- 在 Perl 中http://search.cpan.org/~ambs/Lingua-Identify-0.29/lib/Lingua/Identify.pm ETC。
希望能幫助你
答案2
該file
工具有一系列用於猜測文件類型的啟發式方法,包括報告「英文文本」的啟發式方法。我不知道它是否了解其他人類語言,但它絕對可以升級為在它們之間進行猜測。