File size: 789 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 |
#pragma once
#include "LRState.h"
namespace Moses
{
class BidirectionalReorderingState
: public LRState
{
private:
const LRState *m_backward;
const LRState *m_forward;
public:
BidirectionalReorderingState(const LRModel &config,
const LRState *bw,
const LRState *fw, size_t offset)
: LRState(config,
LRModel::Bidirectional,
offset)
, m_backward(bw)
, m_forward(fw)
{ }
~BidirectionalReorderingState() {
delete m_backward;
delete m_forward;
}
virtual size_t hash() const;
virtual bool operator==(const FFState& other) const;
LRState*
Expand(const TranslationOption& topt, const InputType& input,
ScoreComponentCollection* scores) const;
};
}
|