2008-06-11 14:52:57 +04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
2008-12-13 16:12:54 +03:00
|
|
|
#include "WordsRange.h"
|
|
|
|
#include "TargetPhrase.h"
|
2008-12-15 15:52:38 +03:00
|
|
|
#include "ReorderingConstraint.h"
|
2008-06-11 14:52:57 +04:00
|
|
|
|
2008-10-09 03:51:26 +04:00
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
|
2008-10-30 21:43:17 +03:00
|
|
|
class TranslationOption;
|
|
|
|
|
2008-06-11 14:52:57 +04:00
|
|
|
/** This struct is used for storing XML force translation data for a given range in the sentence
|
|
|
|
*/
|
|
|
|
struct XmlOption {
|
|
|
|
|
2008-12-13 16:12:54 +03:00
|
|
|
WordsRange range;
|
|
|
|
TargetPhrase targetPhrase;
|
|
|
|
std::vector<XmlOption*> linkedOptions;
|
2008-06-11 14:52:57 +04:00
|
|
|
|
2008-12-13 16:12:54 +03:00
|
|
|
XmlOption(const WordsRange &r, const TargetPhrase &tp): range(r), targetPhrase(tp), linkedOptions(0) {}
|
2008-06-11 14:52:57 +04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2008-12-15 15:52:38 +03:00
|
|
|
bool ProcessAndStripXMLTags(std::string &line,std::vector<std::vector<XmlOption*> > &res, ReorderingConstraint &reorderingConstraint, std::vector< size_t > &walls );
|
2008-06-11 14:52:57 +04:00
|
|
|
|
2008-10-09 03:51:26 +04:00
|
|
|
}
|
|
|
|
|
2008-06-11 14:52:57 +04:00
|
|
|
|