diff options
author | Rico Sennrich <rico.sennrich@gmx.ch> | 2014-03-21 14:53:15 +0400 |
---|---|---|
committer | Rico Sennrich <rico.sennrich@gmx.ch> | 2014-03-21 15:12:24 +0400 |
commit | 45630a5851fad3bdd6953e88727e4b7c8d0c4c18 (patch) | |
tree | cd95a3175eb7fc4bb1027cf92d2fa880112b3fee /moses/ChartParserCallback.h | |
parent | 1c6061e78174d09ea4a7a8125ee0df7f41d88ae5 (diff) |
various optimizations to make CYK+ parser several times faster and eat less memory.
speed-up of decoding depends on how much time is spent in parser:
10-50% speed-up for string-to-tree systems observed (more on long sentences and with high max-chart-span).
if you only use hiero or string-to-tree models (but none with source syntax), use compile-option --unlabelled-source for (small) efficiency gains.
Diffstat (limited to 'moses/ChartParserCallback.h')
-rw-r--r-- | moses/ChartParserCallback.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/moses/ChartParserCallback.h b/moses/ChartParserCallback.h index 25953ff9c..bee69f3d7 100644 --- a/moses/ChartParserCallback.h +++ b/moses/ChartParserCallback.h @@ -25,6 +25,9 @@ public: virtual void AddPhraseOOV(TargetPhrase &phrase, std::list<TargetPhraseCollection*> &waste_memory, const WordsRange &range) = 0; virtual void Evaluate(const InputType &input, const InputPath &inputPath) = 0; + + virtual float CalcEstimateOfBestScore(const TargetPhraseCollection &, const StackVec &) const = 0; + }; } // namespace Moses |