Package opennlp.tools.langdetect
Class LanguageDetectorModel
java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.langdetect.LanguageDetectorModel
- All Implemented Interfaces:
- Serializable,- ArtifactProvider
The 
LanguageDetectorModel is the model used by a learnable LanguageDetector.- See Also:
- 
Field SummaryFields inherited from class opennlp.tools.util.model.BaseModelTRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
- 
Constructor SummaryConstructorsConstructorDescriptionLanguageDetectorModel(File modelFile) Initializes aLanguageDetectorModelinstance via a validFile.Initializes aLanguageDetectorModelinstance via a validInputStream.LanguageDetectorModel(URL modelURL) Initializes aLanguageDetectorModelinstance via a validURL.LanguageDetectorModel(MaxentModel langdetectModel, Map<String, String> manifestInfoEntries, LanguageDetectorFactory factory) Initializes aLanguageDetectorModelinstance via given parameters.
- 
Method SummaryModifier and TypeMethodDescriptionMethods inherited from class opennlp.tools.util.model.BaseModelgetArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize
- 
Constructor Details- 
LanguageDetectorModelpublic LanguageDetectorModel(MaxentModel langdetectModel, Map<String, String> manifestInfoEntries, LanguageDetectorFactory factory) Initializes aLanguageDetectorModelinstance via given parameters.- Parameters:
- langdetectModel- A valid- MaxentModel.
- manifestInfoEntries- Additional information kept in the manifest.
- factory- The- LanguageDetectorFactoryfor creating related objects.
 
- 
LanguageDetectorModelInitializes aLanguageDetectorModelinstance via a validInputStream.- Parameters:
- in- The- InputStreamused for loading the model.
- Throws:
- IOException- Thrown if IO errors occurred during initialization.
 
- 
LanguageDetectorModelInitializes aLanguageDetectorModelinstance via a validFile.- Parameters:
- modelFile- The- Fileused for loading the model.
- Throws:
- IOException- Thrown if IO errors occurred during initialization.
 
- 
LanguageDetectorModelInitializes aLanguageDetectorModelinstance via a validURL.- Parameters:
- modelURL- The- URLused for loading the model.
- Throws:
- IOException- Thrown if IO errors occurred during initialization.
 
 
- 
- 
Method Details- 
getFactory- Returns:
- Retrieves the active LanguageDetectorFactory.
 
- 
getMaxentModel- Returns:
- Retrieves a MaxentModel.
 
 
-