Hash
# File lib/ankusa/hasher.rb, line 15 def self.atomize(text) text.downcase.to_ascii.tr('-', ' ').gsub(/[^\w\s]/," ").split end
# File lib/ankusa/hasher.rb, line 24 def add_text(text) if text.instance_of? Array text.each { |t| add_text t } else # replace dashes with spaces, then get rid of non-word/non-space characters, # then split by space to get words words = TextHash.atomize text words.each { |word| add_word(word) if TextHash.valid_word?(word) } end self end
Generated with the Darkfish Rdoc Generator 2.