Class: Segment::Index
- Inherits:
-
Object
- Object
- Segment::Index
- Defined in:
- lib/rbbt/ner/segment.rb
Overview
{{{ Index
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#index ⇒ Object
Returns the value of attribute index.
Instance Method Summary collapse
- #[](pos) ⇒ Object
-
#initialize(index, data) ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize(index, data) ⇒ Index
Returns a new instance of Index.
183 184 185 186 |
# File 'lib/rbbt/ner/segment.rb', line 183 def initialize(index, data) @index = index @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
182 183 184 |
# File 'lib/rbbt/ner/segment.rb', line 182 def data @data end |
#index ⇒ Object
Returns the value of attribute index.
182 183 184 |
# File 'lib/rbbt/ner/segment.rb', line 182 def index @index end |
Instance Method Details
#[](pos) ⇒ Object
188 189 190 |
# File 'lib/rbbt/ner/segment.rb', line 188 def [](pos) index[pos].collect{|id| data[id]} end |