Package opennlp.tools.langdetect
Class LanguageDetectorFactory
- java.lang.Object
-
- opennlp.tools.util.BaseToolFactory
-
- opennlp.tools.langdetect.LanguageDetectorFactory
-
public class LanguageDetectorFactory extends BaseToolFactory
Default factory used by Language Detector. Extend this class to change the Language Detector behaviour, such as theLanguageDetectorContextGenerator. The defaultDefaultLanguageDetectorContextGeneratorwill use char n-grams of size 1 to 3 and the following normalizers:
-
-
Constructor Summary
Constructors Constructor Description LanguageDetectorFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LanguageDetectorFactorycreate(String subclassName)LanguageDetectorContextGeneratorgetContextGenerator()voidinit()voidvalidateArtifactMap()Validates the parsed artifacts.-
Methods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
-
-
-
-
Method Detail
-
getContextGenerator
public LanguageDetectorContextGenerator getContextGenerator()
-
create
public static LanguageDetectorFactory create(String subclassName) throws InvalidFormatException
- Throws:
InvalidFormatException
-
init
public void init()
-
validateArtifactMap
public void validateArtifactMap() throws InvalidFormatExceptionDescription copied from class:BaseToolFactoryValidates the parsed artifacts. If something is not valid subclasses should throw anInvalidFormatException. Note: Subclasses should generally invoke super.validateArtifactMap at the beginning of this method.- Specified by:
validateArtifactMapin classBaseToolFactory- Throws:
InvalidFormatException
-
-