Class: TextRazor::Entailment
- Inherits:
-
Object
- Object
- TextRazor::Entailment
- Extended by:
- Util
- Defined in:
- lib/textrazor/entailment.rb
Instance Attribute Summary collapse
-
#context_score ⇒ Object
readonly
Returns the value of attribute context_score.
-
#entailed_tree ⇒ Object
readonly
Returns the value of attribute entailed_tree.
-
#entailed_words ⇒ Object
readonly
Returns the value of attribute entailed_words.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#prior_score ⇒ Object
readonly
Returns the value of attribute prior_score.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#word_positions ⇒ Object
readonly
Returns the value of attribute word_positions.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Entailment
constructor
A new instance of Entailment.
Methods included from Util
Constructor Details
#initialize(params = {}) ⇒ Entailment
Returns a new instance of Entailment.
10 11 12 13 14 15 |
# File 'lib/textrazor/entailment.rb', line 10 def initialize(params = {}) @type = [] params.each do |k, v| instance_variable_set(:"@#{k}", v) if v && self.respond_to?(:"#{k}") end end |
Instance Attribute Details
#context_score ⇒ Object (readonly)
Returns the value of attribute context_score.
7 8 9 |
# File 'lib/textrazor/entailment.rb', line 7 def context_score @context_score end |
#entailed_tree ⇒ Object (readonly)
Returns the value of attribute entailed_tree.
7 8 9 |
# File 'lib/textrazor/entailment.rb', line 7 def entailed_tree @entailed_tree end |
#entailed_words ⇒ Object (readonly)
Returns the value of attribute entailed_words.
7 8 9 |
# File 'lib/textrazor/entailment.rb', line 7 def entailed_words @entailed_words end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/textrazor/entailment.rb', line 7 def id @id end |
#prior_score ⇒ Object (readonly)
Returns the value of attribute prior_score.
7 8 9 |
# File 'lib/textrazor/entailment.rb', line 7 def prior_score @prior_score end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
7 8 9 |
# File 'lib/textrazor/entailment.rb', line 7 def score @score end |
#word_positions ⇒ Object (readonly)
Returns the value of attribute word_positions.
7 8 9 |
# File 'lib/textrazor/entailment.rb', line 7 def word_positions @word_positions end |
Class Method Details
.create_from_hash(params) ⇒ Object
17 18 19 20 |
# File 'lib/textrazor/entailment.rb', line 17 def self.create_from_hash(params) params = Hash[params.map {|k, v| [standardize(k), v] }] new(params) end |