Sha256: 4e5d748b5400d6f6c9adf26aac95ac7236836c119eec12a9d520983c273c0ee9
Contents?: true
Size: 175 Bytes
Versions: 3
Compression:
Stored size: 175 Bytes
Contents
class KeywordsExtractor def self.extract(text) return if text.blank? text.mb_chars.normalize(:kd).to_s.gsub(/[^\x00-\x7F]/,'').downcase.split(/[\s\.\-_]+/) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongoid_search-0.1.2 | lib/mongoid_search/keywords_extractor.rb |
mongoid_search-0.1.1 | lib/mongoid_search/keywords_extractor.rb |
mongoid_search-0.1.0 | lib/mongoid_search/keywords_extractor.rb |