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

PhraseBasedReorderingState.h « LexicalReordering « FF « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1ab5bc9b61bfd69013b3f0d418ea7104950ed13c (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
#pragma once
#include "LRState.h"

namespace Moses
{
//! State for the standard Moses implementation of lexical reordering models
//! (see Koehn et al, Edinburgh System Description for the 2005 NIST MT
//! Evaluation)
class PhraseBasedReorderingState
  : public LRState
{
private:
  Range m_prevRange;
  bool m_first;
public:
  static bool m_useFirstBackwardScore;
  PhraseBasedReorderingState(const LRModel &config,
                             LRModel::Direction dir,
                             size_t offset);
  PhraseBasedReorderingState(const PhraseBasedReorderingState *prev,
                             const TranslationOption &topt);

  virtual size_t hash() const;
  virtual bool operator==(const FFState& other) const;

  virtual
  LRState*
  Expand(const TranslationOption& topt,const InputType& input,
         ScoreComponentCollection*  scores) const;
};

}