| Class | StanfordParser::FeatureLabel |
| In: |
lib/stanfordparser.rb
|
| Parent: | Rjb::JavaObjectWrapper |
This is a wrapper for edu.stanford.nlp.ling.FeatureLabel objects. It customizes stringification.
# File lib/stanfordparser.rb, line 202 def initialize(obj = "edu.stanford.nlp.ling.FeatureLabel") super end
More verbose stringification with all the fields and their values.
# File lib/stanfordparser.rb, line 216 def inspect toString end
Stringify with just the token and its begin and end position.
# File lib/stanfordparser.rb, line 207 def to_s # BUGBUG The position values come back as java.lang.Integer though I # would expect Rjb to convert them to Ruby integers. begin_position = get(self.BEGIN_POSITION_KEY) end_position = get(self.END_POSITION_KEY) "#{current} [#{begin_position},#{end_position}]" end