Skip to content

Ar-Stemmer is pure Ruby port of ArabicStemmer from Lucene.

License

Notifications You must be signed in to change notification settings

mshka/ar-stemmer

 
 

Repository files navigation

Ar-Stemmer

Build Status

Ar-Stemmer is pure Ruby port of Arabic Stemmer from Lucene.

Installation

Add this line to your application's Gemfile:

gem 'ar-stemmer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ar-stemmer

Usage

require 'ar-stemmer'

ArStemmer.stem("الدونات")
# =>
"دونات"

When you want to turn on/off the specific rules for your own purpose, you can pass the name to only/except option.

ArStemmer.stem(word, only: [:alef_lam, :waw_alef_lam])
ArStemmer.stem(word, except: [:yeh_noon, :waw_noon])

You can find the rule names in the source code.

License

The gem is available as open source under the terms of the MIT License.

About

Ar-Stemmer is pure Ruby port of ArabicStemmer from Lucene.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%