mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
39 lines
789 B
C++
39 lines
789 B
C++
#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;
|
|
};
|
|
|
|
}
|
|
|