Class MultiLanguageModel

  • All Implemented Interfaces:
    java.lang.AutoCloseable, LanguageModel

    public class MultiLanguageModel
    extends java.lang.Object
    implements LanguageModel
    Combines the results of several LanguageModels.
    Since:
    3.2
    • Constructor Detail

      • MultiLanguageModel

        public MultiLanguageModel​(java.util.List<LanguageModel> lms)
    • Method Detail

      • getPseudoProbability

        public Probability getPseudoProbability​(java.util.List<java.lang.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 interface LanguageModel
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface LanguageModel
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object