Package org.languagetool.languagemodel
Interface LanguageModel
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
BaseLanguageModel
,LuceneLanguageModel
,LuceneSingleIndexLanguageModel
,MockLanguageModel
,MultiLanguageModel
A language model that provides information about ngram probabilities.
The implementations don't necessarily deal well with the occurrence = 0 case.
- Since:
- 2.7
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getPseudoProbability
(List<String> context) This is not always guaranteed to be a real probability (0.0 to 1.0).
-
Field Details
-
GOOGLE_SENTENCE_START
ngram sentence start marker - note: this is not in the v1 data from Google- See Also:
-
GOOGLE_SENTENCE_END
ngram sentence end marker - note: this is not in the v1 data from Google- See Also:
-
-
Method Details
-
getPseudoProbability
This is not always guaranteed to be a real probability (0.0 to 1.0). Throws exception if context is longer than the ngram index supports.- Since:
- 3.2
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
-