Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-11-15 22:04:07 +0400
committerKenneth Heafield <github@kheafield.com>2012-11-15 22:04:07 +0400
commit9340f9f465a29e7653f9285963bcad0fe4a60ec6 (patch)
tree19d3503d6e0bf7a3dc2f8db744e1083b4c7d2419 /search/rule.hh
parent877ade5327f7a736345f3b88c4294faa061826d6 (diff)
Update incremental search
Diffstat (limited to 'search/rule.hh')
-rw-r--r--search/rule.hh11
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