Module: ClassifierReborn::TokenFilter::Stemmer
- Defined in:
- lib/classifier-reborn/extensions/token_filter/stemmer.rb
Overview
This filter converts given tokens to their stemmed versions.
Class Method Summary collapse
Class Method Details
.call(tokens) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/classifier-reborn/extensions/token_filter/stemmer.rb', line 13 def call(tokens) tokens.collect do |token| if token.stemmable? token.stem else token end end end |