File size: 920 Bytes
158b61b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/*
 * BidirectionalReorderingState.h
 *
 *  Created on: 22 Mar 2016
 *      Author: hieu
 */
#pragma once
#include "LRState.h"

namespace Moses2
{

class BidirectionalReorderingState: public LRState
{
public:
  BidirectionalReorderingState(const LRModel &config, LRState *bw, LRState *fw,
                               size_t offset);

  virtual ~BidirectionalReorderingState();

  void Init(const LRState *prev, const TargetPhrase<Moses2::Word> &topt,
            const InputPathBase &path, bool first, const Bitmap *coverage);

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

  virtual std::string ToString() const;

  void Expand(const ManagerBase &mgr, const LexicalReordering &ff,
              const Hypothesis &hypo, size_t phraseTableInd, Scores &scores,
              FFState &state) const;

protected:
  LRState *m_backward;
  LRState *m_forward;

};

} /* namespace Moses2 */