Permalink
Browse files

Ignore unspecified values

  • Loading branch information...
1 parent 3025d92 commit eb958345998efb59d34c506a4a26df5a48249a31 @chrisdone committed Dec 5, 2016
Showing with 9 additions and 3 deletions.
  1. +9 −2 src/Hpaste/Model/Spam.hs
  2. +0 −1 src/Spam.hs
@@ -75,8 +75,15 @@ queryCorpus q ps = do
(messages + 1)
(insertTokens
t
- (insertTokens a (insertTokens p histogram paste) author)
- title))))))
+ (insertTokens
+ a
+ (insertTokens p histogram paste)
+ (if author == "Anonymous Coward"
+ then ""
+ else author))
+ (if title == "No title"
+ then ""
+ else title)))))))
where
t = 116
p = 112
View
@@ -141,7 +141,6 @@ insertTokens category trie bytes =
where star = 42
{-# INLINE insertTokens #-}
-
-- We don't nub the tokens yet. But we will later.
--
-- [11] In general, spams are more repetitive than regular email. They

0 comments on commit eb95834

Please sign in to comment.