mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 21:03:22 +03:00
26 lines
547 B
C++
26 lines
547 B
C++
#ifndef SEARCH_RULE__
|
|
#define SEARCH_RULE__
|
|
|
|
#include "lm/left.hh"
|
|
#include "lm/word_index.hh"
|
|
#include "search/types.hh"
|
|
|
|
#include <vector>
|
|
|
|
namespace search {
|
|
|
|
const lm::WordIndex kNonTerminal = lm::kMaxWordIndex;
|
|
|
|
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
|
|
|
|
#endif // SEARCH_RULE__
|