Package org.apache.lucene.analysis.snowball

Examples of org.apache.lucene.analysis.snowball.SnowballFilter


    result = new ElisionFilter(result, DEFAULT_ARTICLES);
    result = new IrishLowerCaseFilter(result);
    result = new StopFilter(matchVersion, result, stopwords);
    if(!stemExclusionSet.isEmpty())
      result = new SetKeywordMarkerFilter(result, stemExclusionSet);
    result = new SnowballFilter(result, new IrishStemmer());
    return new TokenStreamComponents(source, result);
  }
View Full Code Here


    this.stemmerName = stemmerName;
  }

  @Override
  public TokenFilter filter(TokenStream stream) {
    return new SnowballFilter(stream, stemmerName);
  }
View Full Code Here

    String stemmerName = properties.getProperty(STEMMER_NAME_PARAMETER);
    if( stemmerName == null )
      stemmerName = DEFAULT_STEMMER_NAME;
   
    return new SnowballFilter(tokenStream, stemmerName);
  }
View Full Code Here

        return doSnowballStemming(tokenizer);
    }

    public Set<String> doSnowballStemming(TokenStream ts) {
        Set<String> res = new LinkedHashSet<String>();
        ts = new SnowballFilter(ts, "English");
        try {
            while (ts.incrementToken()) {
                res.add(ts.getAttribute(TermAttribute.class).term());
            }
        } catch (IOException ex) {
View Full Code Here

    result = new ElisionFilter(result, DEFAULT_ARTICLES);
    result = new IrishLowerCaseFilter(result);
    result = new StopFilter(matchVersion, result, stopwords);
    if(!stemExclusionSet.isEmpty())
      result = new SetKeywordMarkerFilter(result, stemExclusionSet);
    result = new SnowballFilter(result, new IrishStemmer());
    return new TokenStreamComponents(source, result);
  }
View Full Code Here

    TokenStream result = new StandardFilter(matchVersion, source);
    result = new LowerCaseFilter(matchVersion, result);
    result = new StopFilter(matchVersion, result, stopwords);
    if(!stemExclusionSet.isEmpty())
      result = new SetKeywordMarkerFilter(result, stemExclusionSet);
    result = new SnowballFilter(result, new SwedishStemmer());
    return new TokenStreamComponents(source, result);
  }
View Full Code Here

    result = new SetKeywordMarkerFilter(result, exclusionSet);
    if (matchVersion.onOrAfter(Version.LUCENE_36)) {
      result = new GermanNormalizationFilter(result);
      result = new GermanLightStemFilter(result);
    } else if (matchVersion.onOrAfter(Version.LUCENE_31)) {
      result = new SnowballFilter(result, new German2Stemmer());
    } else {
      result = new GermanStemFilter(result);
    }
    return new TokenStreamComponents(source, result);
  }
View Full Code Here

      result = new ApostropheFilter(result);
    result = new TurkishLowerCaseFilter(result);
    result = new StopFilter(matchVersion, result, stopwords);
    if(!stemExclusionSet.isEmpty())
      result = new SetKeywordMarkerFilter(result, stemExclusionSet);
    result = new SnowballFilter(result, new TurkishStemmer());
    return new TokenStreamComponents(source, result);
  }
View Full Code Here

    TokenStream result = new StandardFilter(matchVersion, source);
    result = new LowerCaseFilter(matchVersion, result);
    result = new StopFilter(matchVersion, result, stopwords);
    if(!stemExclusionSet.isEmpty())
      result = new SetKeywordMarkerFilter(result, stemExclusionSet);
    result = new SnowballFilter(result, new NorwegianStemmer());
    return new TokenStreamComponents(source, result);
  }
View Full Code Here

    if(!stemExclusionSet.isEmpty())
      result = new SetKeywordMarkerFilter(result, stemExclusionSet);
    if (matchVersion.onOrAfter(Version.LUCENE_36)) {
      result = new SpanishLightStemFilter(result);
    } else {
      result = new SnowballFilter(result, new SpanishStemmer());
    }
    return new TokenStreamComponents(source, result);
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.analysis.snowball.SnowballFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.