public class JcsegAnalyzer
extends org.apache.lucene.analysis.Analyzer
Constructor and Description |
---|
JcsegAnalyzer(int mode)
initialize the analyzer with the specified mode
And Jcseg will look for the default configuration file
|
JcsegAnalyzer(int mode,
JcsegTaskConfig config)
initialize the analyzer with the specifield mode and configuration
|
JcsegAnalyzer(int mode,
JcsegTaskConfig config,
ADictionary dic)
initialize the analyzer with the specifiled mode, configuration, dictionary
|
JcsegAnalyzer(int mode,
String proFile)
initialize the analyzer with the specified mode
and the jcseg.properties file
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents |
createComponents(String fieldName) |
ADictionary |
getDict() |
JcsegTaskConfig |
getTaskConfig() |
void |
setConfig(JcsegTaskConfig config) |
void |
setDict(ADictionary dic) |
public JcsegAnalyzer(int mode)
mode
- tokenizer modeorg.lionsoul.jcseg.core.JcsegTaskConfig
public JcsegAnalyzer(int mode, String proFile)
mode
- tokenizer modeproFile
- path of jcseg.properties filepublic JcsegAnalyzer(int mode, JcsegTaskConfig config)
mode
- tokenizer modeconfig
- public JcsegAnalyzer(int mode, JcsegTaskConfig config, ADictionary dic)
mode
- config
- dic
- public void setConfig(JcsegTaskConfig config)
public void setDict(ADictionary dic)
public JcsegTaskConfig getTaskConfig()
public ADictionary getDict()
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName)
createComponents
in class org.apache.lucene.analysis.Analyzer
Copyright © 2017. All Rights Reserved.