List of usage examples for org.apache.lucene.analysis.ja JapaneseTokenizer calcNBestCost
public int calcNBestCost(String examples)
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 www . j ava 2s .co m t.setNBestCost(nBestCost); return t; }