Interface ArrayEncodedLmCache

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    ArrayEncodedDirectMappedLmCache

    public interface ArrayEncodedLmCache
    extends java.io.Serializable
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int capacity()
      How n-grams can be cached (at most).
      void clear()  
      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 Detail

      • 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: