about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--kgramstats.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/kgramstats.cpp b/kgramstats.cpp index 7d28c86..9358e80 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp
@@ -60,6 +60,12 @@ kgramstats::kgramstats(std::string corpus, int maxK)
60 freevar fv_emoticons {emoticons, "emoticons.txt"}; 60 freevar fv_emoticons {emoticons, "emoticons.txt"};
61 std::map<std::string, std::string> canonical_form; 61 std::map<std::string, std::string> canonical_form;
62 62
63 // Ensure the old-style freevars exist
64 canonical_form["$name$"] = "$name$";
65 words.emplace("$name$", std::string("$name$"));
66 canonical_form["$noun$"] = "$noun$";
67 words.emplace("$noun$", std::string("$noun$"));
68
63 AspellConfig* spell_config = new_aspell_config(); 69 AspellConfig* spell_config = new_aspell_config();
64 AspellCanHaveError* possible_err = new_aspell_speller(spell_config); 70 AspellCanHaveError* possible_err = new_aspell_speller(spell_config);
65 if (aspell_error_number(possible_err) != 0) 71 if (aspell_error_number(possible_err) != 0)