Package org.apache.lucene.analysis.ar

Examples of org.apache.lucene.analysis.ar.ArabicStemFilter


*/
public class ArabicStemFilterFactory extends BaseTokenFilterFactory{


  public ArabicStemFilter create(TokenStream input) {
    return new ArabicStemFilter(input);
  }
View Full Code Here


            @Override public String name() {
                return "arabic_stem";
            }

            @Override public TokenStream create(TokenStream tokenStream) {
                return new ArabicStemFilter(tokenStream);
            }
        }));
        tokenFilterFactories.put("brazilian_stem", new PreBuiltTokenFilterFactoryFactory(new TokenFilterFactory() {
            @Override public String name() {
                return "brazilian_stem";
View Full Code Here

    @Inject public ArabicStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
        super(index, indexSettings, name, settings);
    }

    @Override public TokenStream create(TokenStream tokenStream) {
        return new ArabicStemFilter(tokenStream);
    }
View Full Code Here

**/
public class ArabicStemFilterFactory extends BaseTokenFilterFactory{


  public ArabicStemFilter create(TokenStream input) {
    return new ArabicStemFilter(input);
  }
View Full Code Here

public class ArabicStemFilterFactory extends TokenFilterFactory {


  @Override
  public ArabicStemFilter create(TokenStream input) {
    return new ArabicStemFilter(input);
  }
View Full Code Here

*
**/
public class ArabicStemFilterFactory extends BaseTokenFilterFactory {

  public ArabicStemFilter create(TokenStream input) {
    return new ArabicStemFilter( input );
  }
View Full Code Here

    }
  }

  @Override
  public ArabicStemFilter create(TokenStream input) {
    return new ArabicStemFilter(input);
  }
View Full Code Here


  @Override
  public String stem(String token) {
    tokenizer = new StandardTokenizer(Version.LUCENE_35, new StringReader(token));
    TokenStream tokenStream = new ArabicStemFilter(new ArabicNormalizationFilter(tokenizer));
    CharTermAttribute termAtt = tokenStream.getAttribute(CharTermAttribute.class);
    tokenStream.clearAttributes();
    StringBuilder stemmed = new StringBuilder();
    try {
      while (tokenStream.incrementToken()) {
        String curToken = termAtt.toString();
        if ( vocab != null && vocab.get(curToken) <= 0) {
          continue;
        }
        stemmed.append( curToken + " " );
View Full Code Here

      }
    }
   
    if (isStemming()) {
      tokenizer = new StandardTokenizer(Version.LUCENE_35, new StringReader(finalTokenized.toString().trim()));
      tokenStream = new ArabicStemFilter(new ArabicNormalizationFilter(tokenizer));
      CharTermAttribute termAtt = tokenStream.getAttribute(CharTermAttribute.class);
      tokenStream.clearAttributes();
      try {
        while (tokenStream.incrementToken()) {
          String curToken = termAtt.toString();
View Full Code Here


  @Override
  public String stem(String token) {
    tokenizer = new StandardTokenizer(Version.LUCENE_35, new StringReader(token));
    TokenStream tokenStream = new ArabicStemFilter(new ArabicNormalizationFilter(tokenizer));
    CharTermAttribute termAtt = tokenStream.getAttribute(CharTermAttribute.class);
    tokenStream.clearAttributes();
    StringBuilder stemmed = new StringBuilder();
    try {
      while (tokenStream.incrementToken()) {
        String curToken = termAtt.toString();
        if ( vocab != null && vocab.get(curToken) <= 0) {
          continue;
        }
        stemmed.append( curToken + " " );
View Full Code Here

TOP

Related Classes of org.apache.lucene.analysis.ar.ArabicStemFilter

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.