私は次の方法で Java言語検出ライブラリを使用しています。
Detector detector = DetectorFactory.create(); //profiles are in the default location
detector.append("What language is this text?");
List<Language> languages = detector.getProbabilities();
Language mostProbable = languages.get(0);
System.out.println(mostProbable.lang + " - " + mostProbable.prob);
The prob
value varies slightly from execution to execution given the exact same input. Is that "normal"? What does that depend on?