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

TranslationOptionCollectionConfusionNet.h « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3dc605ec72341592b3b6726082d498a3336ec529 (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
50
51
52
53
54
55
56
// $Id$
#ifndef moses_TranslationOptionCollectionConfusionNet_h
#define moses_TranslationOptionCollectionConfusionNet_h

#include "TranslationOptionCollection.h"
#include "InputPath.h"

namespace Moses
{

class ConfusionNet;

/** Holds all translation options, for all spans, of a particular confusion network input
 * Inherited from TranslationOptionCollection.
 */
class TranslationOptionCollectionConfusionNet : public TranslationOptionCollection
{
public:
  typedef std::vector< std::vector<InputPathList> > InputPathMatrix;

protected:
  InputPathMatrix	m_inputPathMatrix; /*< contains translation options */

  InputPathList &GetInputPathList(size_t startPos, size_t endPos);
  bool CreateTranslationOptionsForRangeNew(const DecodeGraph &decodeStepList
      , size_t startPosition
      , size_t endPosition
      , bool adhereTableLimit
      , size_t graphInd);

  bool CreateTranslationOptionsForRangeLEGACY(const DecodeGraph &decodeStepList
      , size_t startPosition
      , size_t endPosition
      , bool adhereTableLimit
      , size_t graphInd);

public:
  TranslationOptionCollectionConfusionNet
  (ttasksptr const& ttask, const ConfusionNet &source);
  // , size_t maxNoTransOptPerCoverage, float translationOptionThreshold);

  void ProcessUnknownWord(size_t sourcePos);
  void CreateTranslationOptions();

  bool
  CreateTranslationOptionsForRange
  (const DecodeGraph &decodeStepList, size_t spos, size_t epos,
   bool adhereTableLimit, size_t graphInd);

protected:

};

}
#endif