diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-11-03 22:36:43 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-11-03 22:36:43 +0300 |
commit | d773ad428ec65a8496dee51a3f398843fa90cf39 (patch) | |
tree | e683cf12e6a5c60fe311e936772d217aeac87caa /moses/TreeInput.cpp | |
parent | 9dc31e197be697582cfe724c8292c0e631841570 (diff) |
More options cleanup.
Diffstat (limited to 'moses/TreeInput.cpp')
-rw-r--r-- | moses/TreeInput.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/moses/TreeInput.cpp b/moses/TreeInput.cpp index 37cf76bf2..cbbdb0d45 100644 --- a/moses/TreeInput.cpp +++ b/moses/TreeInput.cpp @@ -22,7 +22,11 @@ namespace Moses * \param reorderingConstraint reordering constraint zones specified by xml * \param walls reordering constraint walls specified by xml */ -bool TreeInput::ProcessAndStripXMLTags(string &line, std::vector<XMLParseOutput> &sourceLabels, std::vector<XmlOption*> &xmlOptions) +bool +TreeInput:: +ProcessAndStripXMLTags(AllOptions const& opts, string &line, + std::vector<XMLParseOutput> &sourceLabels, + std::vector<XmlOption*> &xmlOptions) { //parse XML markup in translation line @@ -172,7 +176,7 @@ bool TreeInput::ProcessAndStripXMLTags(string &line, std::vector<XMLParseOutput> } // specified translations -> vector of phrases, separated by "||" - if (translation.length() > 0 && StaticData::Instance().GetXmlInputType() != XmlIgnore) { + if (translation.length() > 0 && opts.input.xml_policy != XmlIgnore) { vector<string> altTexts = TokenizeMultiCharSeparator(translation, "||"); vector<string> altLabel = TokenizeMultiCharSeparator(label, "||"); vector<string> altProbs = TokenizeMultiCharSeparator(ParseXmlTagAttribute(tagContent,"prob"), "||"); @@ -251,7 +255,7 @@ Read(std::istream& in, const std::vector<FactorType>& factorOrder, //line = Trim(line); m_labelledSpans.clear(); - ProcessAndStripXMLTags(line, m_labelledSpans, m_xmlOptions); + ProcessAndStripXMLTags(opts, line, m_labelledSpans, m_xmlOptions); // do words 1st - hack stringstream strme; |