Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Williams <philip.williams@mac.com>2015-02-02 20:00:42 +0300
committerPhil Williams <philip.williams@mac.com>2015-02-02 20:07:54 +0300
commitac8f01bc3d2eae44c945d2da8d5fcd7a951fe009 (patch)
tree0454f784b8e787ce0f1bb46cee50be7b4c47ba01 /moses/TreeInput.cpp
parentc8ad84fa55f1f136d99fc4ff712e2aa421867c5d (diff)
Partial merge of t2s branch (implements t2s and f2s algorithms)
Implements search algorithms 7, 8, and 9: -search-algorithm 7 tree-to-string (STSG-based, currently a special-case of forest-to-string) -search-algorithm 8 tree-to-string (SCFG-based) -search-algorithm 9 forest-to-string (STSG-based)
Diffstat (limited to 'moses/TreeInput.cpp')
-rw-r--r--moses/TreeInput.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/moses/TreeInput.cpp b/moses/TreeInput.cpp
index 3fef029ad..81a76507e 100644
--- a/moses/TreeInput.cpp
+++ b/moses/TreeInput.cpp
@@ -247,8 +247,8 @@ int TreeInput::Read(std::istream& in,const std::vector<FactorType>& factorOrder)
// remove extra spaces
//line = Trim(line);
- std::vector<XMLParseOutput> sourceLabels;
- ProcessAndStripXMLTags(line, sourceLabels, m_xmlOptions);
+ m_labelledSpans.clear();
+ ProcessAndStripXMLTags(line, m_labelledSpans, m_xmlOptions);
// do words 1st - hack
stringstream strme;
@@ -266,7 +266,7 @@ int TreeInput::Read(std::istream& in,const std::vector<FactorType>& factorOrder)
// do source labels
vector<XMLParseOutput>::const_iterator iterLabel;
- for (iterLabel = sourceLabels.begin(); iterLabel != sourceLabels.end(); ++iterLabel) {
+ for (iterLabel = m_labelledSpans.begin(); iterLabel != m_labelledSpans.end(); ++iterLabel) {
const XMLParseOutput &labelItem = *iterLabel;
const WordsRange &range = labelItem.m_range;
const string &label = labelItem.m_label;