Class: TokenProbability
- Inherits:
-
Object
- Object
- TokenProbability
- Defined in:
- lib/engine/classification_result.rb
Instance Attribute Summary collapse
-
#negative_matches ⇒ Object
Returns the value of attribute negative_matches.
-
#negative_total ⇒ Object
Returns the value of attribute negative_total.
-
#positive_matches ⇒ Object
Returns the value of attribute positive_matches.
-
#positive_total ⇒ Object
Returns the value of attribute positive_total.
-
#probability ⇒ Object
Returns the value of attribute probability.
-
#sentiment ⇒ Object
Returns the value of attribute sentiment.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, probability, sentiment, positive_total, positive_matches, negative_total, negative_matches) ⇒ TokenProbability
constructor
A new instance of TokenProbability.
Constructor Details
#initialize(token, probability, sentiment, positive_total, positive_matches, negative_total, negative_matches) ⇒ TokenProbability
Returns a new instance of TokenProbability.
25 26 27 |
# File 'lib/engine/classification_result.rb', line 25 def initialize token, probability, sentiment, positive_total, positive_matches, negative_total, negative_matches @token, @probability, @sentiment, @positive_total, @positive_matches, @negative_total, @negative_matches = token, probability, sentiment, positive_total, positive_matches, negative_total, negative_matches end |
Instance Attribute Details
#negative_matches ⇒ Object
Returns the value of attribute negative_matches.
22 23 24 |
# File 'lib/engine/classification_result.rb', line 22 def negative_matches @negative_matches end |
#negative_total ⇒ Object
Returns the value of attribute negative_total.
22 23 24 |
# File 'lib/engine/classification_result.rb', line 22 def negative_total @negative_total end |
#positive_matches ⇒ Object
Returns the value of attribute positive_matches.
22 23 24 |
# File 'lib/engine/classification_result.rb', line 22 def positive_matches @positive_matches end |
#positive_total ⇒ Object
Returns the value of attribute positive_total.
22 23 24 |
# File 'lib/engine/classification_result.rb', line 22 def positive_total @positive_total end |
#probability ⇒ Object
Returns the value of attribute probability.
22 23 24 |
# File 'lib/engine/classification_result.rb', line 22 def probability @probability end |
#sentiment ⇒ Object
Returns the value of attribute sentiment.
22 23 24 |
# File 'lib/engine/classification_result.rb', line 22 def sentiment @sentiment end |
#token ⇒ Object
Returns the value of attribute token.
22 23 24 |
# File 'lib/engine/classification_result.rb', line 22 def token @token end |