List of usage examples for org.apache.lucene.analysis.ja JapaneseTokenizer setNBestCost
public void setNBestCost(int value)
From source file:org.elasticsearch.index.analysis.Kuromoji2TokenizerFactory.java
License:Apache License
@Override public Tokenizer create() { JapaneseTokenizer t = new JapaneseTokenizer(userDictionary, discartPunctuation, mode); int nBestCost = this.nBestCost; if (nBestExamples != null) { nBestCost = Math.max(nBestCost, t.calcNBestCost(nBestExamples)); }/*from ww w . j ava 2s . c o m*/ t.setNBestCost(nBestCost); return t; }