From 617155fe562652c859a380d85cc5710783d79448 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 1 Feb 2016 09:30:04 -0500 Subject: Added emoji freevar Strings of emojis are tokenized separately from anything else, and added to an emoticon freevar, which is mixed in with regular emoticons like :P. This breaks old-style freevars like $name$ and $noun$ so some legacy support for compatibility is left in but eventually $name$ should be made into an actual new freevar. Emoji data is from gemoji (https://github.com/github/gemoji). --- ebooks.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'ebooks.cpp') diff --git a/ebooks.cpp b/ebooks.cpp index ed1e080..fdbeeab 100644 --- a/ebooks.cpp +++ b/ebooks.cpp @@ -10,7 +10,6 @@ #include #include #include -#include "freevars.h" int main(int argc, char** args) { @@ -29,11 +28,6 @@ int main(int argc, char** args) std::cout << "Preprocessing corpus..." << std::endl; kgramstats* stats = new kgramstats(corpus, 4); - - std::cout << "Preprocessing freevars..." << std::endl; - freevars* vars = new freevars(); - vars->addVar("name", "names.txt"); - vars->addVar("noun", "nouns.txt"); twitCurl twitter; twitter.getOAuth().setConsumerKey(config["consumer_key"].as()); @@ -45,7 +39,7 @@ int main(int argc, char** args) for (;;) { std::string doc = stats->randomSentence(rand() % 45 + 5); - std::string hi = vars->parse(doc); + std::string hi = doc; hi.resize(140); std::string replyMsg; -- cgit 1.4.1