blob: 43ca616252aaaa6dd6d60f0476443fe536b405fd (
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__
|