public class HanLPAnalyzer
extends org.apache.lucene.analysis.Analyzer
| Constructor and Description |
|---|
HanLPAnalyzer() |
HanLPAnalyzer(boolean enablePorterStemming) |
HanLPAnalyzer(Set<String> filter,
boolean enablePorterStemming) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents |
createComponents(String fieldName)
重载Analyzer接口,构造分词组件
|
public HanLPAnalyzer(Set<String> filter, boolean enablePorterStemming)
filter - 停用词enablePorterStemming - 是否分析词干(仅限英文)public HanLPAnalyzer(boolean enablePorterStemming)
enablePorterStemming - 是否分析词干.进行单复数,时态的转换public HanLPAnalyzer()
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName)
createComponents in class org.apache.lucene.analysis.AnalyzerCopyright © 2014–2018 码农场. All rights reserved.