Package org.lionsoul.jcseg.dic
Class DictionaryFactory
- java.lang.Object
-
- org.lionsoul.jcseg.dic.DictionaryFactory
-
public class DictionaryFactory extends Object
Dictionary Factory to create Dictionary instance a path of the class that has extends the ADictionary class must be given first
- Author:
- chenxin
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ADictionarycreateDefaultDictionary(SegmenterConfig config)create the ADictionary according to the JcsegTaskConfig check and load the lexicon by defaultstatic ADictionarycreateDefaultDictionary(SegmenterConfig config, boolean loadDic)create the ADictionary according to the JcsegTaskConfigstatic ADictionarycreateDefaultDictionary(SegmenterConfig config, boolean sync, boolean loadDic)create a default ADictionary instance: 1.static ADictionarycreateSingletonDictionary(SegmenterConfig config)create a singleton ADictionary object according to the JcsegTaskConfig check and load the lexicon by defaultstatic ADictionarycreateSingletonDictionary(SegmenterConfig config, boolean loadDic)create a singleton ADictionary object according to the SegmentConfig
-
-
-
Method Detail
-
createDefaultDictionary
public static ADictionary createDefaultDictionary(SegmenterConfig config, boolean sync, boolean loadDic)
create a default ADictionary instance: 1. check the lexicon path and load the lexicons if it is null and default to load the lexicon in the classpath 2. check and start the autoload settings of the dictionary- Parameters:
config-sync-loadDic- whether check and load the lexicon- Returns:
- IDictionary
-
createDefaultDictionary
public static ADictionary createDefaultDictionary(SegmenterConfig config)
create the ADictionary according to the JcsegTaskConfig check and load the lexicon by default- Parameters:
config-- Returns:
- ADictionary
-
createDefaultDictionary
public static ADictionary createDefaultDictionary(SegmenterConfig config, boolean loadDic)
create the ADictionary according to the JcsegTaskConfig- Parameters:
config-loadDic-- Returns:
- ADictionary
-
createSingletonDictionary
public static ADictionary createSingletonDictionary(SegmenterConfig config)
create a singleton ADictionary object according to the JcsegTaskConfig check and load the lexicon by default- Parameters:
config-- Returns:
- ADictionary
-
createSingletonDictionary
public static ADictionary createSingletonDictionary(SegmenterConfig config, boolean loadDic)
create a singleton ADictionary object according to the SegmentConfig- Parameters:
config-loadDic-- Returns:
- ADictionary
-
-