stemmer

Version, currently master branch1 version
  • master branchlatestAug 9, 2017

github.com/hugoabonizio/stemmer.cr

:scissors: English language stemmer for Crystal

4 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  stemmer:
    github: hugoabonizio/stemmer.cr
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.23.1
License
MIT
Author
Hugo Abonizio

Dependencies

This version declares no dependencies.

README

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.