Class: LangExtract::Core::Token
- Inherits:
-
Data
- Object
- Data
- LangExtract::Core::Token
- Defined in:
- lib/langextract/core/tokenizer.rb
Instance Attribute Summary collapse
-
#char_interval ⇒ Object
readonly
Returns the value of attribute char_interval.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
Instance Attribute Details
#char_interval ⇒ Object (readonly)
Returns the value of attribute char_interval
7 8 9 |
# File 'lib/langextract/core/tokenizer.rb', line 7 def char_interval @char_interval end |
#index ⇒ Object (readonly)
Returns the value of attribute index
7 8 9 |
# File 'lib/langextract/core/tokenizer.rb', line 7 def index @index end |
#text ⇒ Object (readonly)
Returns the value of attribute text
7 8 9 |
# File 'lib/langextract/core/tokenizer.rb', line 7 def text @text end |
Instance Method Details
#to_h ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/langextract/core/tokenizer.rb', line 8 def to_h { "text" => text, "char_interval" => char_interval.to_h, "index" => index } end |