module Text::Stemmer

Direct including types

Defined in:

text/stemmer.cr

Constant Summary

C = "[^aeiou]"
CC = "#{C}(?>[^aeiouy]*)"
MEQ1 = /^(#{CC})?#{VV}#{CC}(#{VV})?$/
MGR0 = /^(#{CC})?#{VV}#{CC}/
MGR1 = /^(#{CC})?#{VV}#{CC}#{VV}#{CC}/
STEP_2_LIST = {"ational" => "ate", "tional" => "tion", "enci" => "ence", "anci" => "ance", "izer" => "ize", "bli" => "ble", "alli" => "al", "entli" => "ent", "eli" => "e", "ousli" => "ous", "ization" => "ize", "ation" => "ate", "ator" => "ate", "alism" => "al", "iveness" => "ive", "fulness" => "ful", "ousness" => "ous", "aliti" => "al", "iviti" => "ive", "biliti" => "ble", "logi" => "log"}
STEP_3_LIST = {"icate" => "ic", "ative" => "", "alize" => "al", "iciti" => "ic", "ical" => "ic", "ful" => "", "ness" => ""}
SUFFIX_1_REGEXP = /( ational | tional | enci | anci | izer | bli | alli | entli | eli | ousli | ization | ation | ator | alism | iveness | fulness | ousness | aliti | iviti | biliti | logi)$/x
SUFFIX_2_REGEXP = /( al | ance | ence | er | ic | able | ible | ant | ement | ment | ent | ou | ism | ate | iti | ous | ive | ize)$/x
V = "[aeiouy]"
VOWEL_IN_STEM = /^(#{CC})?#{V}/
VV = "#{V}(?>[aeiou]*)"

Instance Method Summary

Instance Method Detail

def stem #

[View source]