List of usage examples for org.apache.lucene.analysis.ja.tokenattributes PartOfSpeechAttribute getPartOfSpeech
public String getPartOfSpeech();
From source file:com.github.riccardove.easyjasub.lucene.LuceneParser.java
License:Apache License
private void readPartOfSpeech(TokenStream tokenStream, LuceneToken token) { PartOfSpeechAttribute partOfSpeech = tokenStream.getAttribute(PartOfSpeechAttribute.class); if (partOfSpeech != null) { String str = partOfSpeech.getPartOfSpeech(); if (str != null) { token.setPartOfSpeech(LuceneUtil.translatePartOfSpeech(str)); }/*from w w w .ja v a 2 s .c o m*/ } }