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

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

Introduction

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

Prototype

public void setNBestCost(int value) 

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  ww w  .  j ava 2s . c o  m*/
    t.setNBestCost(nBestCost);
    return t;
}