blob: a8af3c4ae2cbbefa2071c6f282a284be8c5d0074 (
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
|
#pragma once
#include <vector>
#include "ChartCell.h"
#include "ChartTranslationOptionCollection.h"
#include "ChartCellCollection.h"
#include "../../moses/src/InputType.h"
#include "../../moses/src/WordsRange.h"
#include "../../moses/src/TrellisPathList.h"
namespace MosesChart
{
class Hypothesis;
class TrellisPathList;
class Manager
{
protected:
Moses::InputType const& m_source; /**< source sentence to be translated */
ChartCellCollection m_hypoStackColl;
TranslationOptionCollection m_transOptColl; /**< pre-computed list of translation options for the phrases in this sentence */
public:
Manager(Moses::InputType const& source);
~Manager();
void ProcessSentence();
const Hypothesis *GetBestHypothesis() const;
void CalcNBest(size_t count, MosesChart::TrellisPathList &ret,bool onlyDistinct=0) const;
/***
* to be called after processing a sentence (which may consist of more than just calling ProcessSentence() )
*/
void CalcDecoderStatistics() const;
void EnumerateTrellis(size_t count, TrellisPathList &ret) const;
};
}
|