lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r806891 - in /lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm: SegGraph.java SegToken.java WordDictionary.java
Date Sat, 22 Aug 2009 21:03:08 GMT
Author: rmuir
Date: Sat Aug 22 21:03:08 2009
New Revision: 806891

URL: http://svn.apache.org/viewvc?rev=806891&view=rev
Log:
LUCENE-1834: Remove unused code in SmartChineseAnalyzer hmm pkg

Modified:
    lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java
    lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java
    lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java

Modified: lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java?rev=806891&r1=806890&r2=806891&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java
(original)
+++ lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegGraph.java
Sat Aug 22 21:03:08 2009
@@ -111,15 +111,6 @@
   }
 
   /**
-   * 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.
    * 
    * @return {@link List} of all tokens in the map.

Modified: lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java?rev=806891&r1=806890&r2=806891&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java
(original)
+++ lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java
Sat Aug 22 21:03:08 2009
@@ -56,19 +56,6 @@
   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.
    * 
    * @param idArray character array containing text

Modified: lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java?rev=806891&r1=806890&r2=806891&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java
(original)
+++ lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/WordDictionary.java
Sat Aug 22 21:03:08 2009
@@ -417,23 +417,6 @@
   /**
    * 在字典库中查找单词对应的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的字符串。返回该单词在单词序列中的位置
-   * 
    * @param knownHashIndex 已知单词第一个字符charArray[0]在hash表中的位置,如果未计算,可以用函数int
    *        findInTable(char[] charArray) 代替
    * @param charArray 查找单词对应的char数组
@@ -464,16 +447,6 @@
   }
 
   /**
-   * 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
    * 
    * @see #getPrefixMatch(char[], int)



Mime
View raw message