diff options
-rw-r--r-- | generator/generator.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generator/generator.cpp b/generator/generator.cpp index e2ebfa1..3201154 100644 --- a/generator/generator.cpp +++ b/generator/generator.cpp | |||
@@ -1103,7 +1103,7 @@ int main(int argc, char** argv) | |||
1103 | { | 1103 | { |
1104 | ppgs.update(); | 1104 | ppgs.update(); |
1105 | 1105 | ||
1106 | std::regex relation("^s\\(([134]\\d{8}),(\\d+),'([\\w ]+)',"); | 1106 | std::regex relation("^s\\(([134]\\d{8}),(\\d+),'(.+)',\\w,\\d+,\\d+\\)\\.$"); |
1107 | std::smatch relation_data; | 1107 | std::smatch relation_data; |
1108 | if (!std::regex_search(line, relation_data, relation)) | 1108 | if (!std::regex_search(line, relation_data, relation)) |
1109 | { | 1109 | { |
@@ -1113,6 +1113,11 @@ int main(int argc, char** argv) | |||
1113 | int synset_id = stoi(relation_data[1]); | 1113 | int synset_id = stoi(relation_data[1]); |
1114 | int wnum = stoi(relation_data[2]); | 1114 | int wnum = stoi(relation_data[2]); |
1115 | std::string word = relation_data[3]; | 1115 | std::string word = relation_data[3]; |
1116 | size_t word_it; | ||
1117 | while ((word_it = word.find("''")) != std::string::npos) | ||
1118 | { | ||
1119 | word.erase(word_it, 1); | ||
1120 | } | ||
1116 | 1121 | ||
1117 | std::string query; | 1122 | std::string query; |
1118 | switch (synset_id / 100000000) | 1123 | switch (synset_id / 100000000) |