A Ruby based string stemming utility.
Bob Nadler, Jr.
- Website
-
thethirdswitch [at] gmail [dot] com
- Docs
git clone [http://bnadlerjr.github.com/stemmer]
gem install stemmer
Stemming is the process for reducing inflected (or sometimes derived) words to their 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. The algorithm has been a long-standing problem in computer science; the first paper on the subject was published in 1968. The process of stemming, often called conflation, is useful in search engines for query expansion or indexing and other natural language processing problems. – Wikipedia
This gem mixes in a stem
method to the String class allowing you to get the stem of a string.
require 'stemmer'
'plastered'.stem => 'plaster'
Right now the only algorithm supported is the Porter stemming algorithm. See Stemmer for details.
Use Github issues for reporting bug and feature requests.
-
Fork the project.
-
Create a separate branch for each feature addition or bug fix.
-
Make your feature addition or bug fix.
-
Add tests; contributions without tests won’t be accepted.
-
Do not touch VERSION.
-
Send pull request.
- /lib
-
Main project source code.
- /test
-
All test source code and data samples.
- rakefile
-
Rake tasks for the project.
- README.rdoc
-
This file.
- HISTORY.txt
-
History of release notes, patches, bug fixes, etc.
(The MIT License)
Copyright © 2010 Bob Nadler, Jr.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.