Method: Clarifier::StopWords#initialize
- Defined in:
- lib/clarifier/stop_words.rb
#initialize(desired_stopwords = nil, training_threshold = 0.8) ⇒ StopWords
Returns a new instance of StopWords.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/clarifier/stop_words.rb', line 12 def initialize(desired_stopwords = nil, training_threshold = 0.8) if desired_stopwords.kind_of?(Array) @stopwords = desired_stopwords elsif @@lists[desired_stopwords] @stopwords = @@lists[desired_stopwords] else @stopwords = @@lists[:en_gb_basic] end @training_threshold = training_threshold end |