Class: Term
- Inherits:
-
Object
- Object
- Term
- Defined in:
- lib/term-extractor.rb
Instance Attribute Summary collapse
-
#chunks ⇒ Object
Returns the value of attribute chunks.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#sentence ⇒ Object
Returns the value of attribute sentence.
-
#tokens ⇒ Object
Returns the value of attribute tokens.
Instance Method Summary collapse
-
#initialize(tokens) {|_self| ... } ⇒ Term
constructor
A new instance of Term.
- #to_s ⇒ Object
Constructor Details
#initialize(tokens) {|_self| ... } ⇒ Term
Returns a new instance of Term.
6 7 8 9 |
# File 'lib/term-extractor.rb', line 6 def initialize(tokens) @tokens = tokens yield self if block_given? end |
Instance Attribute Details
#chunks ⇒ Object
Returns the value of attribute chunks.
4 5 6 |
# File 'lib/term-extractor.rb', line 4 def chunks @chunks end |
#pos ⇒ Object
Returns the value of attribute pos.
4 5 6 |
# File 'lib/term-extractor.rb', line 4 def pos @pos end |
#sentence ⇒ Object
Returns the value of attribute sentence.
4 5 6 |
# File 'lib/term-extractor.rb', line 4 def sentence @sentence end |
#tokens ⇒ Object
Returns the value of attribute tokens.
4 5 6 |
# File 'lib/term-extractor.rb', line 4 def tokens @tokens end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/term-extractor.rb', line 11 def to_s @to_s ||= TermExtractor.recombobulate_term(@tokens) end |