Interface ArrayEncodedLmCache

All Superinterfaces:
Serializable
All Known Implementing Classes:
ArrayEncodedDirectMappedLmCache

public interface ArrayEncodedLmCache extends Serializable
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    How n-grams can be cached (at most).
    void
     
    float
    getCached(int[] ngram, int startPos, int endPos, int hash)
    Should return Float.NaN if the requested n-gram is not in the cache
    void
    putCached(int[] ngram, int startPos, int endPos, float f, int hash)
     
  • Method Details

    • getCached

      float getCached(int[] ngram, int startPos, int endPos, int hash)
      Should return Float.NaN if the requested n-gram is not in the cache
      Parameters:
      ngram -
      startPos -
      endPos -
      shortHash -
      Returns:
    • clear

      void clear()
    • putCached

      void putCached(int[] ngram, int startPos, int endPos, float f, int hash)
    • capacity

      int capacity()
      How n-grams can be cached (at most).
      Returns: