From 8837d3ceb8358476f20d71948a1fc9bc91480d57 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 22 Jan 2017 18:40:37 -0500 Subject: Removed underscores in two-word literal prepositions in verb frames --- generator/generator.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/generator/generator.cpp b/generator/generator.cpp index 16183a2..3dd2ce7 100644 --- a/generator/generator.cpp +++ b/generator/generator.cpp @@ -1367,8 +1367,17 @@ namespace verbly { key = xmlGetProp(syntaxnode, reinterpret_cast("value")); std::string choicesStr = reinterpret_cast(key); xmlFree(key); - - split(choicesStr, " ", std::inserter(partChoices, std::end(partChoices))); + + for (std::string choice : split>(choicesStr, " ")) + { + int chloc; + while ((chloc = choice.find_first_of("_")) != std::string::npos) + { + choice.replace(chloc, 1, " "); + } + + partChoices.insert(std::move(choice)); + } } else { partLiteral = false; -- cgit 1.4.1