Project

ar-stemmer

0.0
No commit activity in last 3 years
No release in over 3 years
Ar-Stemmer is a Ruby port of Arabic Stemmer from Lucene with extensions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 5.0
>= 0
~> 10.0
 Project Readme

Ar-Stemmer

Build Status

Ar-Stemmer is a Ruby port of Arabic Stemmer from Lucene with some extensions.

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.