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:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-11 04:59:26 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-11 04:59:26 +0300
commit40ed3df9cb513681569a2fcde32a5215c38253f3 (patch)
tree00edc16cc3858bed1bde3ddaa470cf58b80da742 /moses/TreeInput.cpp
parent29694af6e43c1cec7a6fd0b157eb44faca706129 (diff)
parent739165c2b05dd3a423fedc6d14afcbf5ffe302e2 (diff)
Merge branch 'master' of https://github.com/moses-smt/mosesdecoder
Conflicts: moses/ChartParser.cpp moses/ChartParser.h moses/ConfusionNet.h moses/FF/CountNonTerms.cpp moses/FF/CountNonTerms.h moses/FF/SoftSourceSyntacticConstraintsFeature.cpp moses/FF/SoftSourceSyntacticConstraintsFeature.h moses/FF/SourceGHKMTreeInputMatchFeature.cpp moses/FF/SourceGHKMTreeInputMatchFeature.h moses/ForestInput.cpp moses/InputType.h moses/MockHypothesis.cpp moses/Sentence.cpp moses/Sentence.h moses/StaticData.cpp moses/StaticData.h moses/Syntax/F2S/GlueRuleSynthesizer.h moses/Syntax/T2S/GlueRuleSynthesizer.cpp moses/Syntax/T2S/GlueRuleSynthesizer.h moses/TreeInput.cpp moses/XmlOption.cpp moses/XmlOption.h
Diffstat (limited to 'moses/TreeInput.cpp')
-rw-r--r--moses/TreeInput.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/moses/TreeInput.cpp b/moses/TreeInput.cpp
index 1c898ea51..a6a7f80d6 100644
--- a/moses/TreeInput.cpp
+++ b/moses/TreeInput.cpp
@@ -245,7 +245,6 @@ Read(std::istream& in)
string line;
if (getline(in, line, '\n').eof())
return 0;
-
m_labelledSpans.clear();
ProcessAndStripXMLTags(*m_options, line, m_labelledSpans, m_xmlOptions);
@@ -265,7 +264,7 @@ Read(std::istream& in)
// do source labels
vector<XMLParseOutput>::const_iterator iterLabel;
- for (iterLabel = m_labelledSpans.begin();
+ for (iterLabel = m_labelledSpans.begin();
iterLabel != m_labelledSpans.end(); ++iterLabel) {
const XMLParseOutput &labelItem = *iterLabel;
const Range &range = labelItem.m_range;
@@ -279,7 +278,7 @@ Read(std::istream& in)
for (size_t endPos = startPos; endPos < sourceSize; ++endPos) {
NonTerminalSet &list = GetLabelSet(startPos, endPos);
if (list.size() == 0 || ! only4empty ) {
- AddChartLabel(startPos, endPos, m_options->syntax.input_default_non_terminal);
+ AddChartLabel(startPos, endPos, m_options->syntax.input_default_non_terminal);
}
}
}
@@ -300,7 +299,7 @@ TranslationOptionCollection* TreeInput::CreateTranslationOptionCollection() cons
return NULL;
}
-void
+void
TreeInput::
AddChartLabel(size_t startPos, size_t endPos, const Word &label)
{
@@ -324,14 +323,14 @@ AddChartLabel(size_t startPos, size_t endPos, const Word &label)
}
}
-void
+void
TreeInput::
AddChartLabel(size_t startPos, size_t endPos, const string &label)
{
const std::vector<FactorType>& fOrder = m_options->input.factor_order;
Word word(true);
- const Factor *factor
- = FactorCollection::Instance().AddFactor(Input, fOrder[0], label, true);
+ const Factor *factor
+ = FactorCollection::Instance().AddFactor(Input, fOrder[0], label, true);
// TODO - no factors
word.SetFactor(0, factor);
AddChartLabel(startPos, endPos, word);