class UtteranceParser::Utterance
Constants
- TAG_RE
Attributes
text[R]
Public Class Methods
new(text)
click to toggle source
# File lib/utterance_parser/utterance.rb, line 7 def initialize(text) @text = text end
Public Instance Methods
==(other)
click to toggle source
# File lib/utterance_parser/utterance.rb, line 11 def ==(other) other.class == self.class && other.text == @text end
pos_tokens()
click to toggle source
# File lib/utterance_parser/utterance.rb, line 15 def pos_tokens PosTagger.add_tags(@text).scan(TAG_RE).map { |tag, word| [word, tag.upcase] } end