stemmer.cr

✂️ English language stemmer for Crystal

Stemmer Build Status

Stemmer shard for Crystal that uses Porter stemming algorithm.

The Porter stemming algorithm (or ‘Porter stemmer’) is a process for removing the commoner morphological and inflexional endings from words in English. Its main use is as part of a term normalisation process that is usually done when setting up Information Retrieval systems.

Installation

Add this to your application's shard.yml:

dependencies:
  stemmer:
    github: hugoabonizio/stemmer.cr

Usage

The method String#stem or String#stem_porter returns the stemmed word.

require "stemmer"

"computer".stem # => "comput"
"computation".stem # => "comput"
"computating".stem # => "comput"

"check".stem # => "check"
"checked".stem # => "check"
"checking".stem # => "check"
"checks".stem # => "check"

Contributing

  1. Fork it ( https://github.com/hugoabonizio/stemmer.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

This Crystal code was based on stemmify Ruby gem, so thanks to its contributors.

Repository

stemmer.cr

Owner
Statistic
  • 3
  • 0
  • 0
  • 1
  • 0
  • over 6 years ago
  • August 9, 2017
License

MIT License

Links
Synced at

Sat, 04 May 2024 11:45:19 GMT

Languages