diff options
author | Michael Denkowski <mdenkows@amazon.com> | 2016-08-11 10:21:51 +0300 |
---|---|---|
committer | Michael Denkowski <mdenkows@amazon.com> | 2016-08-12 13:05:12 +0300 |
commit | 3aedc0bf68dfd204a5ae88bcf9d3e0da7c4028d5 (patch) | |
tree | e07d34536ccbcb509d956cee55a0255b6a496dba /moses/XmlOption.cpp | |
parent | ae1e51d81ad450f7ee497386eea16ebe3792f68b (diff) |
Standalone phrase distance feature
(Uses input coordinates populated by XML input and target phrase coordinates
populated by phrase dictionary implementation)
Diffstat (limited to 'moses/XmlOption.cpp')
-rw-r--r-- | moses/XmlOption.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/moses/XmlOption.cpp b/moses/XmlOption.cpp index b7969ae51..6e089c774 100644 --- a/moses/XmlOption.cpp +++ b/moses/XmlOption.cpp @@ -405,7 +405,8 @@ ProcessAndStripXMLTags(AllOptions const& opts, string &line, // Coord: coordinates of the input sentence in a user-defined space // <coord space="NAME" coord="X Y Z ..." /> // where NAME is the name of the space and X Y Z ... are floats. See - // TODO for an example of using this information for feature scoring. + // PhraseDistanceFeature for an example of using this information for + // feature scoring. else if (tagName == "coord") { // Parse tag string space = ParseXmlTagAttribute(tagContent, "space"); @@ -416,7 +417,7 @@ ProcessAndStripXMLTags(AllOptions const& opts, string &line, } else { // Init if needed if (!input.m_coordMap) { - input.m_coordMap.reset(new std::map<size_t const, std::vector<float> >); + input.m_coordMap.reset(new map<size_t const, vector<float> >); } vector<float>& coord = (*input.m_coordMap)[id]; Scan<float>(coord, tok); |