Package net.ontopia.topicmaps.classify
Class Language
java.lang.Object
net.ontopia.topicmaps.classify.Language
INTERNAL: Object representing a particular language. The object is
really just a container for a stemmer, a stop list, and a frequency
analyzer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FrequencyAnalyzerprotected Stringprotected TermStemmerIFprotected StopList -
Constructor Summary
ConstructorsConstructorDescriptionLanguage(String id, TermStemmerIF stemmer, StopList stoplist, FrequencyAnalyzer frequency) INTERNAL: Used to add additional languages by passing in all parameters explicitly. -
Method Summary
Modifier and TypeMethodDescriptionstatic LanguagedetectLanguage(Document doc) INTERNAL: Detects the language of the document based on the built-in languages and new languages registered.static LanguagegetLanguage(String lang) intstatic voidregisterLanguage(Language lang) INTERNAL: Registers a new language for use by detectLanguage.toString()
-
Field Details
-
id
-
stemmer
-
stoplist
-
frequency
-
-
Constructor Details
-
Language
INTERNAL: Used to add additional languages by passing in all parameters explicitly.
-
-
Method Details
-
getStemmer
-
getStopListAnalyzer
-
getFrequencyAnalyzer
-
getScore
-
toString
-
getLanguage
-
registerLanguage
INTERNAL: Registers a new language for use by detectLanguage. Warning: this method is not idempotent. -
detectLanguage
INTERNAL: Detects the language of the document based on the built-in languages and new languages registered.
-