Sha256: 201b720c587e6dae4b11d5f7497051f86714fd5d39902bd388ab373b77ededa9

Contents?: true

Size: 272 Bytes

Versions: 1

Compression:

Stored size: 272 Bytes

Contents

# encoding: UTF-8

class TextNlp
  class Normalizer    
    def normalize(text)
      text.downcase!
      text.tr!("éèàçîêô","eeacieo")
      text.tr!("!',;?.()/\\_|[]{}\"<>:*$%\-"," ")
      text.gsub!(/\s+/," ")
      text.strip!
      text
    end    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
text_nlp-0.0.3 lib/text_nlp/normalizer.rb