Class: StanfordParser::Word
- Inherits:
-
Rjb::JavaObjectWrapper
- Object
- Rjb::JavaObjectWrapper
- StanfordParser::Word
- Defined in:
- lib/stanfordparser.rb
Overview
This is a wrapper for edu.stanford.nlp.ling.Word
objects. It customizes stringification and adds an equivalence operator.
Instance Attribute Summary
Attributes inherited from Rjb::JavaObjectWrapper
Instance Method Summary collapse
-
#==(other) ⇒ Object
Equivalence is defined relative to the word value.
-
#initialize(obj = "edu.stanford.nlp.ling.Word", *args) ⇒ Word
constructor
A new instance of Word.
-
#inspect ⇒ Object
See the word values.
Methods inherited from Rjb::JavaObjectWrapper
Constructor Details
#initialize(obj = "edu.stanford.nlp.ling.Word", *args) ⇒ Word
Returns a new instance of Word.
177 178 179 |
# File 'lib/stanfordparser.rb', line 177 def initialize(obj = "edu.stanford.nlp.ling.Word", *args) super(obj, *args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rjb::JavaObjectWrapper
Instance Method Details
#==(other) ⇒ Object
Equivalence is defined relative to the word value.
187 188 189 |
# File 'lib/stanfordparser.rb', line 187 def ==(other) word == other end |
#inspect ⇒ Object
See the word values.
182 183 184 |
# File 'lib/stanfordparser.rb', line 182 def inspect to_s end |