Class: Plino::Classifier
- Inherits:
-
Object
- Object
- Plino::Classifier
- Defined in:
- lib/plino/classifier.rb
Overview
This class is used for classification of texts as spam or ham
Constant Summary collapse
- SPAM =
'spam'.freeze
- HAM =
'ham'.freeze
Instance Method Summary collapse
Instance Method Details
#ham?(text) ⇒ Boolean
12 13 14 |
# File 'lib/plino/classifier.rb', line 12 def ham?(text) !spam?(text) end |
#spam?(text) ⇒ Boolean
8 9 10 |
# File 'lib/plino/classifier.rb', line 8 def spam?(text) classifies_as?(SPAM, text) end |