Example usage for org.apache.lucene.analysis.ja.tokenattributes InflectionAttribute getInflectionForm

List of usage examples for org.apache.lucene.analysis.ja.tokenattributes InflectionAttribute getInflectionForm

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.ja.tokenattributes InflectionAttribute getInflectionForm.

Prototype

public String getInflectionForm();

Source Link

Usage

From source file:com.github.riccardove.easyjasub.lucene.LuceneParser.java

License:Apache License

private void readInflection(TokenStream tokenStream, LuceneToken token) {
    InflectionAttribute inflection = tokenStream.getAttribute(InflectionAttribute.class);
    if (inflection != null) {
        token.setInflectionForm(LuceneUtil.translateInflectedForm(inflection.getInflectionForm()));
        token.setInflectionType(LuceneUtil.translateInflectionType(inflection.getInflectionType()));
    }/*from   ww  w .j  av a  2  s.  c  o m*/
}