Package opennlp.tools.langdetect
Class LanguageDetectorFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.langdetect.LanguageDetectorFactory
Default factory used by 
LanguageDetector.
 
 Extend this class to change the Language Detector behaviour,
 such as the LanguageDetectorContextGenerator.
 The default DefaultLanguageDetectorContextGenerator will use char n-grams of
 size 1 to 3 and the following normalizers:
 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic LanguageDetectorFactoryInstantiates aLanguageDetectorFactoryvia a givensubclassName.voidinit()voidValidates the parsed artifacts.Methods inherited from class opennlp.tools.util.BaseToolFactorycreate, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
- 
Constructor Details- 
LanguageDetectorFactorypublic LanguageDetectorFactory()
 
- 
- 
Method Details- 
getContextGenerator- Returns:
- Retrieves a LanguageDetectorContextGenerator.
 
- 
createInstantiates aLanguageDetectorFactoryvia a givensubclassName.- Parameters:
- subclassName- The class name used for instantiation. If- null, an instance of- LanguageDetectorFactorywill be returned per default. Otherwise, the- ExtensionLoadermechanism is applied to load the requested- subclassName.
- Returns:
- A valid LanguageDetectorFactoryinstance.
- Throws:
- InvalidFormatException- Thrown if the- ExtensionLoadermechanism failed to create the factory associated with- subclassName.
 
- 
initpublic void init()
- 
validateArtifactMapDescription copied from class:BaseToolFactoryValidates the parsed artifacts.Note: Subclasses should generally invoke super.validateArtifactMapat the beginning of this method.- Specified by:
- validateArtifactMapin class- BaseToolFactory
- Throws:
- InvalidFormatException- Thrown if validation found invalid states.
 
 
-