Skip to content

An English (Porter2) stemming implementation in Elixir.

Notifications You must be signed in to change notification settings

blitzstudios/stemmer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stemmer Travis Coverage Hex.pm

An English (Porter2) stemming implementation in Elixir.

In linguistic morphology and information retrieval, stemming is the process of reducing inflected (or sometimes derived) words to their word stem, base or root form—generally a written word form. The stem need not be identical to the morphological root of the word; it is usually sufficient that related words map to the same stem, even if this stem is not in itself a valid root. - Wikipedia

Usage

The Stemmer.stem/1 function supports stemming a single word (String), a sentence (String) or a list of single words (List of Strings).

Stemmer.stem("capabilities")                    # => "capabl"
Stemmer.stem("extraordinary capabilities")      # => "extraordinari capabl"
Stemmer.stem(["extraordinary", "capabilities"]) # => ["extraordinari", "capabl"]

Compatibility

Stemmer is 100% compatible with the official Porter2 implementation, it is tested against the official diffs.txt which contains more than 29000 words.

Naive Bayes

Stemmer was built to support the Simple Bayes library. ❤️

License

Licensed under MIT.

About

An English (Porter2) stemming implementation in Elixir.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%