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

ChartParserCallback.h « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 04cf32e940b18c074863c8df669a7198c29a053d (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
#pragma once

#include "StackVec.h"

#include <list>
#include "TargetPhraseCollection.h"

namespace Moses
{

class TargetPhraseCollection;
class Range;
class TargetPhrase;
class InputPath;
class InputType;
class ChartCellLabel;

class ChartParserCallback
{
public:
  virtual ~ChartParserCallback() {}

  virtual void Add(const TargetPhraseCollection &, const StackVec &, const Range &) = 0;

  virtual bool Empty() const = 0;

  virtual void AddPhraseOOV(TargetPhrase &phrase, std::list<TargetPhraseCollection::shared_ptr > &waste_memory, const Range &range) = 0;

  virtual void EvaluateWithSourceContext(const InputType &input, const InputPath &inputPath) = 0;

  virtual float GetBestScore(const ChartCellLabel *chartCell) const = 0;

};

} // namespace Moses