make KenLM non-batch

This commit is contained in:
Hieu Hoang 2015-11-23 15:00:00 +00:00
parent 28033e137f
commit 3452e2fbfe

View File

@ -29,6 +29,9 @@ public:
//! return the state associated with the empty hypothesis for a given sentence
virtual void EmptyHypothesisState(FFState &state, const Manager &mgr, const PhraseImpl &input) const;
virtual void EvaluateWhenApplied(const Recycler<Hypothesis*> &hypos) const
{}
virtual void
EvaluateInIsolation(const System &system,
const Phrase &source, const TargetPhrase &targetPhrase,
@ -41,6 +44,15 @@ public:
Scores &scores,
FFState &state) const;
virtual void EvaluateWhenAppliedNonBatch(const Manager &mgr,
const Hypothesis &hypo,
const FFState &prevState,
Scores &scores,
FFState &state) const
{
EvaluateWhenApplied(mgr, hypo, prevState, scores, state);
}
void SetParameter(const std::string& key, const std::string& value);
size_t HasVocabInd() const