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

rule.hh « search - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dc45f6634c2e847a5d557bd9431a85bceccad5eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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__