lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-lucene-sandbox/contributions/snowball/src/java/org/apache/lucene/analysis/snowball SnowballAnalyzer.java
Date Thu, 05 Aug 2004 14:34:44 GMT
ehatcher    2004/08/05 07:34:44

  Modified:    contributions/snowball/src/java/org/apache/lucene/analysis/snowball
                        SnowballAnalyzer.java
  Log:
  convert map to set
  
  Revision  Changes    Path
  1.4       +5 -5      jakarta-lucene-sandbox/contributions/snowball/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java
  
  Index: SnowballAnalyzer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/snowball/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SnowballAnalyzer.java	24 Feb 2004 19:07:36 -0000	1.3
  +++ SnowballAnalyzer.java	5 Aug 2004 14:34:44 -0000	1.4
  @@ -22,7 +22,7 @@
   import net.sf.snowball.ext.*;
   
   import java.io.Reader;
  -import java.util.Hashtable;
  +import java.util.Set;
   
   /** Filters {@link StandardTokenizer} with {@link StandardFilter}, {@link
    * LowerCaseFilter}, {@link StopFilter} and {@link SnowballFilter}.
  @@ -33,7 +33,7 @@
    */
   public class SnowballAnalyzer extends Analyzer {
     private String name;
  -  private Hashtable stopTable;
  +  private Set stopSet;
   
     /** Builds the named analyzer with no stop words. */
     public SnowballAnalyzer(String name) {
  @@ -43,7 +43,7 @@
     /** Builds the named analyzer with the given stop words. */
     public SnowballAnalyzer(String name, String[] stopWords) {
       this(name);
  -    stopTable = StopFilter.makeStopTable(stopWords);
  +    stopSet = StopFilter.makeStopSet(stopWords);
     }
   
     /** Constructs a {@link StandardTokenizer} filtered by a {@link
  @@ -52,8 +52,8 @@
       TokenStream result = new StandardTokenizer(reader);
       result = new StandardFilter(result);
       result = new LowerCaseFilter(result);
  -    if (stopTable != null)
  -      result = new StopFilter(result, stopTable);
  +    if (stopSet != null)
  +      result = new StopFilter(result, stopSet);
       result = new SnowballFilter(result, name);
       return result;
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message