Class: StanfordParser::StandoffToken
- Inherits:
-
Struct
- Object
- Struct
- StanfordParser::StandoffToken
- Defined in:
- lib/stanfordparser.rb
Overview
A text token that contains raw and normalized token identity (.e.g “(” and “-LRB-”), an offset span, and the characters immediately preceding and following the token. Given a list of these objects it is possible to recreate the text from which they came verbatim.
Instance Attribute Summary collapse
-
#after ⇒ Object
Returns the value of attribute after.
-
#before ⇒ Object
Returns the value of attribute before.
-
#begin_position ⇒ Object
Returns the value of attribute begin_position.
-
#current ⇒ Object
Returns the value of attribute current.
-
#end_position ⇒ Object
Returns the value of attribute end_position.
-
#word ⇒ Object
Returns the value of attribute word.
Instance Method Summary collapse
Instance Attribute Details
#after ⇒ Object
Returns the value of attribute after
244 245 246 |
# File 'lib/stanfordparser.rb', line 244 def after @after end |
#before ⇒ Object
Returns the value of attribute before
244 245 246 |
# File 'lib/stanfordparser.rb', line 244 def before @before end |
#begin_position ⇒ Object
Returns the value of attribute begin_position
244 245 246 |
# File 'lib/stanfordparser.rb', line 244 def begin_position @begin_position end |
#current ⇒ Object
Returns the value of attribute current
244 245 246 |
# File 'lib/stanfordparser.rb', line 244 def current @current end |
#end_position ⇒ Object
Returns the value of attribute end_position
244 245 246 |
# File 'lib/stanfordparser.rb', line 244 def end_position @end_position end |
#word ⇒ Object
Returns the value of attribute word
244 245 246 |
# File 'lib/stanfordparser.rb', line 244 def word @word end |
Instance Method Details
#to_s ⇒ Object
246 247 248 |
# File 'lib/stanfordparser.rb', line 246 def to_s "#{current} [#{begin_position},#{end_position}]" end |