The bad_words gem removes offensives words of texts. The actual configuration removes offensives words to pt-br, but you can make the configuration to all languages.
The binary input files can be generated using the gen rake task:
$ cd shared
$ bundle update
$ bundle exec rake gen