about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-02-14 12:17:47 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-02-14 12:17:47 -0500
commit1756b9ee3f985365b339706d972e8a2ee14c3ef5 (patch)
tree0e788370a6e2934a241cb15b42942e01b16bec73
parent1971f4936b53bc05765b88a2c76e675a18555237 (diff)
downloadrawr-ebooks-1756b9ee3f985365b339706d972e8a2ee14c3ef5.tar.gz
rawr-ebooks-1756b9ee3f985365b339706d972e8a2ee14c3ef5.tar.bz2
rawr-ebooks-1756b9ee3f985365b339706d972e8a2ee14c3ef5.zip
Fixed incorrect diversity of tokens containing the letters aemnou
-rw-r--r--kgramstats.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kgramstats.cpp b/kgramstats.cpp index f78336e..af24606 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp
@@ -162,7 +162,7 @@ kgramstats::kgramstats(std::string corpus, int maxK)
162 { 162 {
163 if ( 163 if (
164 // Legacy freevars should be distinct from tokens containing similar words 164 // Legacy freevars should be distinct from tokens containing similar words
165 (canonical.find_first_of("$name$") != std::string::npos) || (canonical.find_first_of("$noun$") != std::string::npos) 165 (canonical.find("$name$") != std::string::npos) || (canonical.find("$noun$") != std::string::npos)
166 // Words with no letters will be mangled by the spell checker 166 // Words with no letters will be mangled by the spell checker
167 || (canonical.find_first_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") == std::string::npos) 167 || (canonical.find_first_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") == std::string::npos)
168 ) 168 )