Module: Classifier::StopWords
- Defined in:
- lib/classifier/stopwords.rb
Class Method Summary collapse
Class Method Details
.for(language, lang_dir = nil) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/classifier/stopwords.rb', line 5 def self.for(language, lang_dir=nil) unless STOP_WORDS.has_key?(language) STOP_WORDS[language] = load_stopwords(language, lang_dir) || [] end STOP_WORDS[language] end |
.reset ⇒ Object
12 13 14 |
# File 'lib/classifier/stopwords.rb', line 12 def self.reset STOP_WORDS.clear end |