summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-01-22 18:40:37 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-01-22 18:40:37 -0500
commit8837d3ceb8358476f20d71948a1fc9bc91480d57 (patch)
tree045adc1b9a1e2fe38e6831d20c0d1d73f3f40983
parent9423ab7f075afd3e1501a2d1438fc8330811e40e (diff)
downloadverbly-8837d3ceb8358476f20d71948a1fc9bc91480d57.tar.gz
verbly-8837d3ceb8358476f20d71948a1fc9bc91480d57.tar.bz2
verbly-8837d3ceb8358476f20d71948a1fc9bc91480d57.zip
Removed underscores in two-word literal prepositions in verb frames
-rw-r--r--generator/generator.cpp13
1 files 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 {
1367 key = xmlGetProp(syntaxnode, reinterpret_cast<const xmlChar*>("value")); 1367 key = xmlGetProp(syntaxnode, reinterpret_cast<const xmlChar*>("value"));
1368 std::string choicesStr = reinterpret_cast<const char*>(key); 1368 std::string choicesStr = reinterpret_cast<const char*>(key);
1369 xmlFree(key); 1369 xmlFree(key);
1370 1370
1371 split(choicesStr, " ", std::inserter(partChoices, std::end(partChoices))); 1371 for (std::string choice : split<std::list<std::string>>(choicesStr, " "))
1372 {
1373 int chloc;
1374 while ((chloc = choice.find_first_of("_")) != std::string::npos)
1375 {
1376 choice.replace(chloc, 1, " ");
1377 }
1378
1379 partChoices.insert(std::move(choice));
1380 }
1372 } else { 1381 } else {
1373 partLiteral = false; 1382 partLiteral = false;
1374 1383