blob: a803e16df02b0d6bd9ad9abc25fe14392ca4fcd8 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef moses_LMList_h
#define moses_LMList_h
#include <list>
#include "LM/Base.h"
namespace Moses
{
class Phrase;
class ScoreColl;
class ScoreComponentCollection;
//! List of language models
class LMList
{
protected:
typedef std::list < LanguageModel* > CollType;
CollType m_coll;
public:
typedef CollType::iterator iterator;
typedef CollType::const_iterator const_iterator;
//! iterators
const_iterator begin() const {
return m_coll.begin();
}
const_iterator end() const {
return m_coll.end();
}
size_t size() const {
return m_coll.size();
}
LMList()
{}
void CleanUp();
~LMList();
void CalcScore(const Phrase &phrase, float &retFullScore, float &retNGramScore, float &retOOVScore, ScoreComponentCollection* breakdown) const;
void Add(LanguageModel *lm);
};
}
#endif
|