Package org.languagetool.languagemodel
Class MultiLanguageModel
- java.lang.Object
-
- org.languagetool.languagemodel.MultiLanguageModel
-
- All Implemented Interfaces:
AutoCloseable
,LanguageModel
public class MultiLanguageModel extends Object implements LanguageModel
Combines the results of severalLanguageModel
s.- Since:
- 3.2
-
-
Field Summary
-
Fields inherited from interface org.languagetool.languagemodel.LanguageModel
GOOGLE_SENTENCE_END, GOOGLE_SENTENCE_START
-
-
Constructor Summary
Constructors Constructor Description MultiLanguageModel(List<LanguageModel> lms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Probability
getPseudoProbability(List<String> context)
This is not always guaranteed to be a real probability (0.0 to 1.0).String
toString()
-
-
-
Constructor Detail
-
MultiLanguageModel
public MultiLanguageModel(List<LanguageModel> lms)
-
-
Method Detail
-
getPseudoProbability
public Probability getPseudoProbability(List<String> context)
Description copied from interface:LanguageModel
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.- Specified by:
getPseudoProbability
in interfaceLanguageModel
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceLanguageModel
-
-