Class: Words2DotDat
- Inherits:
-
Object
- Object
- Words2DotDat
- Defined in:
- lib/words2dotdat.rb
Class Method Summary collapse
Class Method Details
.stopwords ⇒ Object
12 13 14 15 16 17 |
# File 'lib/words2dotdat.rb', line 12 def stopwords() @stopwords ||= (File.read \ File.join(File.dirname(__FILE__), '..', 'data', 'stopwords.txt')).strip.lines.map(&:chomp) end |
.words ⇒ Object
19 20 21 22 |
# File 'lib/words2dotdat.rb', line 19 def words() filepath = File.join(File.dirname(__FILE__), '..', 'data', 'words2.dat') File.open(filepath){|f| Marshal.load(f)} end |