Class: WordsDotDat
- Inherits:
-
Object
- Object
- WordsDotDat
- Defined in:
- lib/wordsdotdat.rb
Class Method Summary collapse
- .adjs ⇒ Object
- .nouns ⇒ Object
- .stopwords ⇒ Object
- .words ⇒ Object (also: list)
Class Method Details
.adjs ⇒ Object
12 |
# File 'lib/wordsdotdat.rb', line 12 def adjs() @adjs ||= load_data 'adjs.dat' end |
.nouns ⇒ Object
13 |
# File 'lib/wordsdotdat.rb', line 13 def nouns() @nouns ||= load_data 'nouns.dat' end |
.stopwords ⇒ Object
15 16 17 18 19 20 |
# File 'lib/wordsdotdat.rb', line 15 def stopwords() @stopwords ||= (File.read \ File.join(File.dirname(__FILE__), '..', 'data', 'stopwords.txt')).strip.lines.map(&:chomp) end |
.words ⇒ Object Also known as: list
22 |
# File 'lib/wordsdotdat.rb', line 22 def words() adjs + nouns end |