Schnittstelle LanguageModel

Alle bekannten Implementierungsklassen:
NGramLanguageModel

public interface LanguageModel
A language model can calculate the probability p (between 0 and 1) of a certain sequence of tokens, given its underlying vocabulary.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    double
    Calculate the probability of a series of tokens (e.g. a sentence), given a vocabulary.
    Predict the most probable output sequence of tokens, given an input sequence of tokens.
  • Methodendetails

    • calculateProbability

      double calculateProbability(String... tokens)
      Calculate the probability of a series of tokens (e.g. a sentence), given a vocabulary.
      Parameter:
      tokens - the text tokens to calculate the probability for.
      Gibt zurück:
      the probability of the given text tokens in the vocabulary
    • predictNextTokens

      String[] predictNextTokens(String... tokens)
      Predict the most probable output sequence of tokens, given an input sequence of tokens.
      Parameter:
      tokens - a sequence of tokens
      Gibt zurück:
      the most probable subsequent token sequence