Apache Nutch is an extensible and scalable web crawler
NGramProfile was not correctly re-intialized each time a piece of text is analyzed. It can cause troubles on repeated calls to analyze(StringBuffer) method (reported by Caglar Iskender)
Jerome Charron9caad91ea81f
diff --git a/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/NGramProfile.java b/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/NGramProfile.javaindex 66685b867..780634910 100644--- a/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/NGramProfile.java+++ b/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/NGramProfile.java@@ -187,6 +187,7 @@ public class NGramProfile {if (ngrams != null) {ngrams.clear();sorted = null;+ ngramcounts = null;}word.clear().append(SEPARATOR);