Example usage for org.apache.lucene.analysis.ja JapaneseTokenizer calcNBestCost

List of usage examples for org.apache.lucene.analysis.ja JapaneseTokenizer calcNBestCost

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.ja JapaneseTokenizer calcNBestCost.

Prototype

public int calcNBestCost(String examples) 

Source Link

Usage

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;
}