Package opennlp.tools.langdetect
Klasse 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:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic LanguageDetectorFactoryInstantiates aLanguageDetectorFactoryvia a givensubclassName.voidinit()voidValidates the parsed artifacts.Von Klasse geerbte Methoden opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
-
Konstruktordetails
-
LanguageDetectorFactory
public LanguageDetectorFactory()
-
-
Methodendetails
-
getContextGenerator
- Gibt zurück:
- Retrieves a
LanguageDetectorContextGenerator.
-
create
Instantiates aLanguageDetectorFactoryvia a givensubclassName.- Parameter:
subclassName- The class name used for instantiation. Ifnull, an instance ofLanguageDetectorFactorywill be returned per default. Otherwise, theExtensionLoadermechanism is applied to load the requestedsubclassName.- Gibt zurück:
- A valid
LanguageDetectorFactoryinstance. - Löst aus:
InvalidFormatException- Thrown if theExtensionLoadermechanism failed to create the factory associated withsubclassName.
-
init
public void init() -
validateArtifactMap
Beschreibung aus Klasse kopiert:BaseToolFactoryValidates the parsed artifacts.Note: Subclasses should generally invoke
super.validateArtifactMapat the beginning of this method.- Angegeben von:
validateArtifactMapin KlasseBaseToolFactory- Löst aus:
InvalidFormatException- Thrown if validation found invalid states.
-