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). --- gen.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'gen.cpp') diff --git a/gen.cpp b/gen.cpp index a0ef8e3..26edd21 100644 --- a/gen.cpp +++ b/gen.cpp @@ -7,7 +7,6 @@ #include #include #include -#include "freevars.h" int main(int argc, char** args) { @@ -44,16 +43,11 @@ 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"); - std::cout << "Generating..." << std::endl; for (;;) { std::string doc = stats->randomSentence(rand() % 35 + 15); - std::string hi = vars->parse(doc); + std::string hi = doc; hi.resize(140); std::cout << hi << std::endl; -- cgit 1.4.1