lib/ankusa/hasher.rb in ankusa-0.0.10 vs lib/ankusa/hasher.rb in ankusa-0.0.11
- old
+ new
@@ -17,10 +17,10 @@
text.downcase.to_ascii.tr('-', ' ').gsub(/[^\w\s]/," ").split
end
# word should be only alphanum chars at this point
def self.valid_word?(word)
- return true unless Ankusa::STOPWORDS.include? word || word.length < 3 || word.numeric?
+ not (Ankusa::STOPWORDS.include?(word) || word.length < 3 || word.numeric?)
end
def add_text(text)
if text.instance_of? Array
text.each { |t| add_text t }