lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene-sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/cz CzechAnalyzer.java
Date Wed, 04 Aug 2004 17:57:14 GMT
dnaber      2004/08/04 10:57:14

  Modified:    contributions/analyzers/src/java/org/apache/lucene/analysis/br
                        BrazilianAnalyzer.java
               contributions/analyzers/src/java/org/apache/lucene/analysis/cz
                        CzechAnalyzer.java
  Log:
  add "throws IOException" so that these analyzers compile again against Lucene 1.4
  
  Revision  Changes    Path
  1.6       +6 -5      jakarta-lucene-sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java
  
  Index: BrazilianAnalyzer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BrazilianAnalyzer.java	12 Mar 2004 15:52:58 -0000	1.5
  +++ BrazilianAnalyzer.java	4 Aug 2004 17:57:14 -0000	1.6
  @@ -62,6 +62,7 @@
   import org.apache.lucene.analysis.standard.StandardFilter;
   import org.apache.lucene.analysis.standard.StandardTokenizer;
   import java.io.File;
  +import java.io.IOException;
   import java.io.Reader;
   import java.util.Hashtable;
   import java.util.HashSet;
  @@ -72,7 +73,7 @@
    * will not be indexed at all) and an external list of exclusions (word that will
    * not be stemmed, but indexed).
    *
  - * @author    Joo Kramer
  + * @author    Jo�o Kramer
    */
   public final class BrazilianAnalyzer extends Analyzer {
   
  @@ -134,8 +135,8 @@
   	/**
   	 * Builds an analyzer with the given stop words.
   	 */
  -	public BrazilianAnalyzer( File stopwords ) {
  -		stoptable = new HashSet(WordlistLoader.getWordtable( stopwords ).keySet());
  +	public BrazilianAnalyzer( File stopwords ) throws IOException {
  +		stoptable = WordlistLoader.getWordSet( stopwords );
   	}
   
   	/**
  @@ -153,8 +154,8 @@
   	/**
   	 * Builds an exclusionlist from the words contained in the given file.
   	 */
  -	public void setStemExclusionTable( File exclusionlist ) {
  -		excltable = new HashSet(WordlistLoader.getWordtable( exclusionlist ).keySet());
  +	public void setStemExclusionTable( File exclusionlist ) throws IOException {
  +		excltable = WordlistLoader.getWordSet( exclusionlist );
   	}
   
   	/**
  
  
  
  1.5       +3 -3      jakarta-lucene-sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java
  
  Index: CzechAnalyzer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/analyzers/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CzechAnalyzer.java	12 Mar 2004 15:52:58 -0000	1.4
  +++ CzechAnalyzer.java	4 Aug 2004 17:57:14 -0000	1.5
  @@ -136,8 +136,8 @@
   	/**
   	 * Builds an analyzer with the given stop words.
   	 */
  -	public CzechAnalyzer( File stopwords ) {
  -		stoptable = new HashSet(WordlistLoader.getWordtable( stopwords ).keySet());
  +	public CzechAnalyzer( File stopwords ) throws IOException {
  +		stoptable = WordlistLoader.getWordSet( stopwords );
   	}
   
       /**
  @@ -182,7 +182,7 @@
   		TokenStream result = new StandardTokenizer( reader );
   		result = new StandardFilter( result );
   		result = new LowerCaseFilter( result );
  -        result = new StopFilter( result, stoptable );
  +		result = new StopFilter( result, stoptable );
   		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