lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciej Gawinecki <mgawine...@gmail.com>
Subject Re: Limitations of StempelStemmer
Date Wed, 25 Sep 2019 12:31:25 GMT
> You always pass "piwko" for stemming.

 Right, I've spotted my mistake once I've posted my question but
didn't want spam with too many posts (there's no way to edit already
posted question in a mailing list :-)). Anyway, the issue still
persists. Here's the corrected version to reproduce it:

import java.io.InputStream;
import org.apache.lucene.analysis.stempel.StempelStemmer;

public class Try {

  public static void main(String[] args) throws Exception {
    InputStream stemmerTabke = ClassLoader.getSystemClassLoader()
        .getResourceAsStream("org/apache/lucene/analysis/pl/stemmer_20000.tbl");
    StempelStemmer stemmer = new StempelStemmer(stemmerTabke);
    String[] words = {"joyce", "wielce", "piwko", "royce", "pip", "xyz"};
    for (String word : words) {
      System.out.println(String.format("%s -> %s", word,
stemmer.stem(word)));
    }

  }
}

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


Mime
View raw message