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

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

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

namespace Moses
{

class WordLattice;

/** Holds all translation options, for all spans, of a lattice input. NOT confusion networks
 * No legacy phrase-tables, CANNOT be used with Zen's binary phrase-table.
 */
class TranslationOptionCollectionLattice : public TranslationOptionCollection
{
protected:
  /* forcibly create translation option for a 1 word.
  	* call the base class' ProcessOneUnknownWord() for each possible word in the confusion network
  	* at a particular source position
  */
  void ProcessUnknownWord(size_t sourcePos); // do not implement

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

  void CreateTranslationOptions();

  bool
  CreateTranslationOptionsForRange
  (const DecodeGraph &decodeStepList, size_t startPosition, size_t endPosition,
   bool adhereTableLimit, size_t graphInd); // do not implement

protected:
  void Extend(const InputPath &prevPath, const WordLattice &input,
              size_t const maxPhraseLength);

};

}