pingbu.nlp.LexiconWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pingbu-nlp Show documentation
Show all versions of pingbu-nlp Show documentation
A library to do Chinese NLP
package pingbu.nlp;
import java.util.Collection;
public class LexiconWrapper extends Lexicon {
private Lexicon mLexicon = null;
public LexiconWrapper(String debugName) {
super(debugName);
}
public void setLexicon(Lexicon lexicon) {
mLexicon = lexicon;
}
@Override
public final int getType() {
return mLexicon.getType();
}
@Override
public int getItemCount() {
return mLexicon.getItemCount();
}
@Override
public String getItemText(int id) {
return mLexicon.getItemText(id);
}
@Override
public Collection getItemParams(int id) {
return mLexicon.getItemParams(id);
}
@Override
public int findItem(String text) {
return mLexicon.findItem(text);
}
@Override
public Collection search(String text) {
return mLexicon.search(text);
}
}