2010-04-08 21:16:10 +04:00
|
|
|
/*
|
|
|
|
* ReorderingStack.h
|
|
|
|
** Author: Ankit K. Srivastava
|
2011-02-24 16:14:42 +03:00
|
|
|
** Date: Jan 26, 2010
|
2010-04-08 21:16:10 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
//#include <string>
|
|
|
|
#include <vector>
|
|
|
|
//#include "Factor.h"
|
|
|
|
//#include "Phrase.h"
|
|
|
|
//#include "TypeDef.h"
|
|
|
|
//#include "Util.h"
|
|
|
|
#include "WordsRange.h"
|
|
|
|
//#include "ScoreProducer.h"
|
|
|
|
//#include "FeatureFunction.h"
|
|
|
|
|
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
|
2012-06-29 02:29:46 +04:00
|
|
|
/** @todo what is this?
|
|
|
|
*/
|
2011-02-24 16:14:42 +03:00
|
|
|
class ReorderingStack
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
std::vector<WordsRange> m_stack;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
int Compare(const ReorderingStack& o) const;
|
|
|
|
int ShiftReduce(WordsRange input_span);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void Reduce(WordsRange input_span);
|
|
|
|
};
|
2010-04-08 21:16:10 +04:00
|
|
|
|
|
|
|
|
|
|
|
}
|