Class: TweetToSounds::KeywordExtractor
- Inherits:
-
Object
- Object
- TweetToSounds::KeywordExtractor
- Defined in:
- lib/tweet_to_sounds/keyword_extractor.rb
Constant Summary collapse
- STOPWORDS =
%w( a an and are as at be but by for if in into is it no not of on or such that the their then there these they this to was will with )
- TWO_LETTERS =
%w( ab ad ah am aw ax ay bi by do ed eh el er es et ex fa go ha he hi hm ho id jo la lo ma me mi mm my no oh om ow ox oy pa pe pi re sh si so ta ti uh um un up us we wo ya ye yo )
Instance Attribute Summary collapse
-
#keywords ⇒ Object
readonly
Returns the value of attribute keywords.
Instance Method Summary collapse
-
#initialize(tweet) ⇒ KeywordExtractor
constructor
A new instance of KeywordExtractor.
Constructor Details
#initialize(tweet) ⇒ KeywordExtractor
Returns a new instance of KeywordExtractor.
16 17 18 19 |
# File 'lib/tweet_to_sounds/keyword_extractor.rb', line 16 def initialize(tweet) @tweet = tweet @keywords = extract_keywords end |
Instance Attribute Details
#keywords ⇒ Object (readonly)
Returns the value of attribute keywords.
14 15 16 |
# File 'lib/tweet_to_sounds/keyword_extractor.rb', line 14 def keywords @keywords end |