Apache Solr open-source search software
LUCENE-1834: Remove unused code in SmartChineseAnalyzer hmm pkg
Robert Muir8e4e7e17d022
diff --git a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.javaindex 26afe9d48b1..bf9970cb040 100644--- a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java+++ b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java@@ -110,15 +110,6 @@ class SegGraph {maxStart = s;}- /**- * Get the number of startOffsets.- *- * @return number of startOffsets in the mapping- */- public int getStartCount() {- return tokenListTable.size();- }-/*** Return a {@link List} of all tokens in the map, ordered by startOffset.*diff --git a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.javaindex e6ccfdef988..ef28a11a0ce 100644--- a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java+++ b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java@@ -55,19 +55,6 @@ public class SegToken {*/public int index;- /**- * Create a new SegToken from a {@link String}- *- * @param word String containing text- * @param start start offset into word- * @param end end offset of word- * @param wordType {@link WordType} of the text- * @param weight word frequency- */- public SegToken(String word, int start, int end, int wordType, int weight) {- this(word.toCharArray(), start, end, wordType, weight);- }-/*** Create a new SegToken from a character array.*diff --git a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.javaindex c68bcca7899..79b246694c9 100644--- a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java+++ b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java@@ -414,23 +414,6 @@ class WordDictionary extends AbstractDictionary {return -1;}- /**- * 在字典库中查找单词对应的char数组为charArray的字符串。返回该单词在单词序列中的位置- *- * @param charArray 查找单词对应的char数组- * @return 单词在单词数组中的位置,如果没找到则返回-1- */- private int findInTable(char[] charArray) {- if (charArray == null || charArray.length == 0)- return -1;- short index = getWordItemTableIndex(charArray[0]);- if (index == -1)- return -1;-- return findInTable(index, charArray);-- }-/*** 在字典库中查找单词对应的char数组为charArray的字符串。返回该单词在单词序列中的位置*@@ -463,16 +446,6 @@ class WordDictionary extends AbstractDictionary {return -1;}- /**- * Returns true if the input word appears in the dictionary- *- * @param charArray input word- * @return true if the word exists- */- public boolean isExist(char[] charArray) {- return findInTable(charArray) != -1;- }-/*** Find the first word in the dictionary that starts with the supplied prefix*