// Normalization factors cache

class normcache{
  dictionary* dict;
  ngramtable *ngt;
  double* cache[2];
  int cachesize[2];
  int maxcache[2];
  int hit;
  int miss;
  
 public:
  normcache(dictionary* d);
  ~normcache(){
    delete [] cache[0];delete [] cache[1]; delete ngt;};

  void expand(int i);
  double get(ngram ng,int size,double& value);
  double put(ngram ng,int size,double value);
  void stat();
};
