Class: TokenProbability

Inherits:
Object
  • Object
show all
Defined in:
lib/engine/classification_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_matchesObject

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_totalObject

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_matchesObject

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_totalObject

Returns the value of attribute positive_total.



22
23
24
# File 'lib/engine/classification_result.rb', line 22

def positive_total
  @positive_total
end

#probabilityObject

Returns the value of attribute probability.



22
23
24
# File 'lib/engine/classification_result.rb', line 22

def probability
  @probability
end

#sentimentObject

Returns the value of attribute sentiment.



22
23
24
# File 'lib/engine/classification_result.rb', line 22

def sentiment
  @sentiment
end

#tokenObject

Returns the value of attribute token.



22
23
24
# File 'lib/engine/classification_result.rb', line 22

def token
  @token
end