Java 类org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute 实例源码

项目:easyjasub    文件:LuceneParser.java   
private void addAttributes(TokenStream tokenStream) {
    tokenStream.addAttribute(OffsetAttribute.class);
    tokenStream.addAttribute(ReadingAttribute.class);
    tokenStream.addAttribute(PartOfSpeechAttribute.class);
    tokenStream.addAttribute(InflectionAttribute.class);
    tokenStream.addAttribute(BaseFormAttribute.class);
}
项目:easyjasub    文件:LuceneParser.java   
private void readReading(TokenStream tokenStream, LuceneToken token) {
    ReadingAttribute reading = tokenStream
            .getAttribute(ReadingAttribute.class);
    if (reading != null) {
        token.setPronunciation(reading.getPronunciation());
        token.setReading(reading.getReading());
    }
}