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 LanguageDetectorFactory
Instantiates aLanguageDetectorFactory
via a givensubclassName
.void
init()
void
Validates 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 aLanguageDetectorFactory
via a givensubclassName
.- Parameter:
subclassName
- The class name used for instantiation. Ifnull
, an instance ofLanguageDetectorFactory
will be returned per default. Otherwise, theExtensionLoader
mechanism is applied to load the requestedsubclassName
.- Gibt zurück:
- A valid
LanguageDetectorFactory
instance. - Löst aus:
InvalidFormatException
- Thrown if theExtensionLoader
mechanism failed to create the factory associated withsubclassName
.
-
init
public void init() -
validateArtifactMap
Beschreibung aus Klasse kopiert:BaseToolFactory
Validates the parsed artifacts.Note: Subclasses should generally invoke
super.validateArtifactMap
at the beginning of this method.- Angegeben von:
validateArtifactMap
in KlasseBaseToolFactory
- Löst aus:
InvalidFormatException
- Thrown if validation found invalid states.
-