diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-11-15 22:04:07 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-11-15 22:04:07 +0400 |
commit | 9340f9f465a29e7653f9285963bcad0fe4a60ec6 (patch) | |
tree | 19d3503d6e0bf7a3dc2f8db744e1083b4c7d2419 /search/rule.hh | |
parent | 877ade5327f7a736345f3b88c4294faa061826d6 (diff) |
Update incremental search
Diffstat (limited to 'search/rule.hh')
-rw-r--r-- | search/rule.hh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/search/rule.hh b/search/rule.hh index 0ce2794db..43ca61625 100644 --- a/search/rule.hh +++ b/search/rule.hh @@ -9,11 +9,16 @@ namespace search { -template <class Model> class Context; - const lm::WordIndex kNonTerminal = lm::kMaxWordIndex; -template <class Model> float ScoreRule(const Context<Model> &context, const std::vector<lm::WordIndex> &words, bool prepend_bos, lm::ngram::ChartState *state_out); +struct ScoreRuleRet { + Score prob; + unsigned int oov; +}; + +// Pass <s> and </s> normally. +// Indicate non-terminals with kNonTerminal. +template <class Model> ScoreRuleRet ScoreRule(const Model &model, const std::vector<lm::WordIndex> &words, lm::ngram::ChartState *state_out); } // namespace search |