// Path: src/main/java/edu/berkeley/nlp/lm/ContextEncodedNgramLanguageModel.java
// public static class LmContextInfo
// {
// 
// 	/**
// 	 * Offset of context (prefix) of an n-gram
// 	 */
// 	public long offset = -1L;
// 
// 	/**
// 	 * The (0-based) length of <code>context</code> (i.e.
// 	 * <code>order == 0</code> iff <code>context</code> refers to a
// 	 * unigram).
// 	 * 
// 	 * Use -1 for an empty context.
// 	 */
// 	public int order = -1;
// 
// }


import java.io.Serializable;
import edu.berkeley.nlp.lm.ContextEncodedNgramLanguageModel.LmContextInfo;
import edu.berkeley.nlp.lm.util.Annotations.OutputParameter;
package edu.berkeley.nlp.lm.cache;



public interface ContextEncodedLmCache extends Serializable
{
	/**
	 * Should return Float.NaN if requested n-gram is not in the cache.
	 * 
	 * @param contextOffset
	 * @param contextOrder
	 * @param word
	 * @param hash
	 * @param outputPrefix
	 * @return
	 */
// Path: src/main/java/edu/berkeley/nlp/lm/ContextEncodedNgramLanguageModel.java
// public static class LmContextInfo
// {
// 
// 	/**
// 	 * Offset of context (prefix) of an n-gram
// 	 */
// 	public long offset = -1L;
// 
// 	/**
// 	 * The (0-based) length of <code>context</code> (i.e.
// 	 * <code>order == 0</code> iff <code>context</code> refers to a
// 	 * unigram).
// 	 * 
// 	 * Use -1 for an empty context.
// 	 */
// 	public int order = -1;
// 
// }


// Path: src/main/java/edu/berkeley/nlp/lm/cache/ContextEncodedLmCache.java
import java.io.Serializable;
import edu.berkeley.nlp.lm.ContextEncodedNgramLanguageModel.LmContextInfo;
import edu.berkeley.nlp.lm.util.Annotations.OutputParameter;

package edu.berkeley.nlp.lm.cache;



public interface ContextEncodedLmCache extends Serializable
{
	/**
	 * Should return Float.NaN if requested n-gram is not in the cache.
	 * 
	 * @param contextOffset
	 * @param contextOrder
	 * @param word
	 * @param hash
	 * @param outputPrefix
	 * @return
	 */
	public float getCached(long contextOffset, int contextOrder, int word, int hash, @OutputParameter LmContextInfo outputPrefix);