Class: Treat::Workers::Inflectors::Stemmers::UEA
- Inherits:
-
Object
- Object
- Treat::Workers::Inflectors::Stemmers::UEA
- Defined in:
- lib/treat/workers/inflectors/stemmers/uea.rb
Overview
Stemming using the UEA algorithm, a stemmer that operates on a set of rules which are used as steps. There are two groups of rules: the first to clean the tokens, and the second to alter suffixes.
Original paper: Jenkins, Marie-Claire, Smith, Dan, Conservative stemming for search and indexing, 2005.
Constant Summary collapse
- @@stemmer =
Keep only one copy of the stemmer.
nil
Class Method Summary collapse
-
.stem(entity, options = {}) ⇒ Object
Stems a word using the UEA algorithm, implemented by the ‘uea-stemmer’ gem.
Class Method Details
.stem(entity, options = {}) ⇒ Object
Stems a word using the UEA algorithm, implemented by the ‘uea-stemmer’ gem.
18 19 20 21 |
# File 'lib/treat/workers/inflectors/stemmers/uea.rb', line 18 def self.stem(entity, = {}) @@stemmer ||= ::UEAStemmer.new @@stemmer.stem(entity.to_s).strip end |