Example usage for org.apache.lucene.analysis.ja.util ToStringUtil getPOSTranslation

List of usage examples for org.apache.lucene.analysis.ja.util ToStringUtil getPOSTranslation

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.ja.util ToStringUtil getPOSTranslation.

Prototype

public static String getPOSTranslation(String s) 

Source Link

Document

Get the english form of a POS tag

Usage

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

License:Apache License

public static String translatePartOfSpeech(String partOfSpeech) {
    String translation = ToStringUtil.getPOSTranslation(partOfSpeech);
    return translation != null ? translation : partOfSpeech;
}

From source file:lucene.hadoop.util.PartOfSpeechAttributeImpl.java

License:Apache License

@Override
public void reflectWith(AttributeReflector reflector) {
    String partOfSpeech = getPartOfSpeech();
    String partOfSpeechEN = partOfSpeech == null ? null : ToStringUtil.getPOSTranslation(partOfSpeech);
    reflector.reflect(PartOfSpeechAttribute.class, "partOfSpeech", partOfSpeech);
    reflector.reflect(PartOfSpeechAttribute.class, "partOfSpeech (en)", partOfSpeechEN);
}