src/lmmacro.cpp
const char *lmmacro::maxsuffptr(ngram micro_ng, unsigned int* size)
{
  ngram macro_ng(lmtable::getDict());

  if (micro_ng.dict ==  macro_ng.dict)
    macro_ng.trans(micro_ng);  // micro to macro mapping already done
  else
    map(&micro_ng, &macro_ng); // mapping required

  VERBOSE(2,"lmmacro::lprob: micro_ng = " << micro_ng << "\n"
          << "lmmacro::lprob: macro_ng = " << macro_ng << "\n");

  return lmtable::maxsuffptr(macro_ng,size);
}
//maxsuffptr returns the largest suffix of an n-gram that is contained
//in the LM table. This can be used as a compact representation of the
//(n-1)-gram state of a n-gram LM. if the input k-gram has k>=n then it
//is trimmed to its n-1 suffix.
maxsuffptr returns the largest suffix of an n-gram that is contained
in the LM table. This can be used as a compact representation of the
(n-1)-gram state of a n-gram LM. if the input k-gram has k>=n then it
is trimmed to its n-1 suffix.
maxsuffptr returns the largest suffix of an n - gram that is contained in the LM table . This can be used as a compact representation of the ( n - 1 ) - gram state of a n - gram LM . if the input k - gram has k > = n then it is trimmed to its n - 1 suffix .
const char *lmmacro::maxsuffptr(ngram micro_ng, unsigned int* size)
{
  ngram macro_ng(lmtable::getDict());
  if (micro_ng.dict ==  macro_ng.dict)
    macro_ng.trans(micro_ng);  
  else
    map(&micro_ng, &macro_ng); 
  VERBOSE(2,"lmmacro::lprob: micro_ng = " << micro_ng << "\n"
          << "lmmacro::lprob: macro_ng = " << macro_ng << "\n");
  return lmtable::maxsuffptr(macro_ng,size);
}
const char * lmmacro :: maxsuffptr ( ngram micro_ng , unsigned int * size ) { ngram macro_ng ( lmtable :: getDict ( ) ) ; if ( micro_ng . dict == macro_ng . dict ) macro_ng . trans ( micro_ng ) ; else map ( & micro_ng , & macro_ng ) ; VERBOSE ( 2 , " " << micro_ng << " \n " << " " << macro_ng << " \n " ) ; return lmtable :: maxsuffptr ( macro_ng , size ) ; }
maxsuffptr returns the largest suffix of an n-gram that is contained
in the LM table.
maxsuffptr returns the largest suffix of an n - gram that is contained in the LM table .
// micro to macro mapping already done // mapping required