<commit_before>Heroku buildpack: MeCab
======================

This is a buildpack that enables using the [mecab gem](https://rubygems.org/gems/mecab) on Heroku Cedar. This buildpack was forked from [heroku-buildpack-gsl-ruby](https://github.com/tomwolfe/heroku-buildpack-gsl-ruby). A big thank you to [jkatzer](https://github.com/jkatzer) who did 99.9% of the work to adapt the fork to get MeCab working on Heroku. Any mistakes are purely my own. 

To get MeCab working on Heroku follow these steps:

1) Add the [mecab gem](https://rubygems.org/gems/mecab) to your Gemfile and run bundle install  
`gem 'mecab', '0.996'`  
`$ bundle install`  

2) Add the following config variables to your Heroku app  
`$ heroku config:set BUILDPACK_URL=https://github.com/diasks2/heroku-buildpack-mecab.git`  
`$ heroku config:set LD_LIBRARY_PATH=/app/vendor/mecab/lib`  

3) Push your app to Heroku  
`$ git push heroku master`  

N.B. This buildpack points to the file `libmecab-heroku.tar.gz` which is currently stored on S3. There is no guarantee that this file will always be available at this location. Thus, if you have trouble getting this buildpack to work, take the `libmecab-heroku.tar.gz` file which is stored in this repo at [mecab/libmecab-heroku.tar.gz](https://github.com/diasks2/heroku-buildpack-mecab/tree/master/mecab) and store it on S3. Make sure it is set to public. Then fork this repo and change line 12 in [lib/language_pack/ruby.rb](https://github.com/diasks2/heroku-buildpack-mecab/blob/master/lib/language_pack/ruby.rb#L13) to link to the new location of the file on S3.<commit_msg>Update README with correct line number<commit_after>Heroku buildpack: MeCab
======================

This is a buildpack that enables using the [mecab gem](https://rubygems.org/gems/mecab) on Heroku Cedar. This buildpack was forked from [heroku-buildpack-gsl-ruby](https://github.com/tomwolfe/heroku-buildpack-gsl-ruby). A big thank you to [jkatzer](https://github.com/jkatzer) who did 99.9% of the work to adapt the fork to get MeCab working on Heroku. Any mistakes are purely my own. 

To get MeCab working on Heroku follow these steps:

1) Add the [mecab gem](https://rubygems.org/gems/mecab) to your Gemfile and run bundle install  
`gem 'mecab', '0.996'`  
`$ bundle install`  

2) Add the following config variables to your Heroku app  
`$ heroku config:set BUILDPACK_URL=https://github.com/diasks2/heroku-buildpack-mecab.git`  
`$ heroku config:set LD_LIBRARY_PATH=/app/vendor/mecab/lib`  

3) Push your app to Heroku  
`$ git push heroku master`  

N.B. This buildpack points to the file `libmecab-heroku.tar.gz` which is currently stored on S3. There is no guarantee that this file will always be available at this location. Thus, if you have trouble getting this buildpack to work, take the `libmecab-heroku.tar.gz` file which is stored in this repo at [mecab/libmecab-heroku.tar.gz](https://github.com/diasks2/heroku-buildpack-mecab/tree/master/mecab) and store it on S3. Make sure it is set to public. Then fork this repo and change line 12 in [lib/language_pack/ruby.rb](https://github.com/diasks2/heroku-buildpack-mecab/blob/master/lib/language_pack/ruby.rb#L12) to link to the new location of the file on S3.
{'fraction_non_alphanumeric': 0.11059335197266232, 'fraction_numerical': 0.012426219322771047, 'mean_word_length': 4.348837209302325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '548970', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1071, 'n_words': 374}