class Cadmium::PorterStemmer

Defined in:

cadmium/stemmer/stemmer/porter_stemmer.cr

Class Method Summary

Class methods inherited from class Cadmium::Stemmer

add_stop_word(word) add_stop_word, add_stop_words(words) add_stop_words, remove_stop_word(word) remove_stop_word, remove_stop_words(words) remove_stop_words, stem(token) stem, tokenize_and_stem(text, keep_stops = false) tokenize_and_stem

Class Method Detail

def self.attempt_replace(token : String, pattern : String | Regex, replacement : String) #

Attempt to replace a pattern in a word. if a replacement occurs the replacement is returned. Otherwise nil is returned.


[View source]
def self.attempt_replace(token : String, pattern : String | Regex, replacement : String, &) #

Attempt to replae a pattern in a word. If a replacement occurs the replacement is yielded to a block. Otherwise nil is returned


[View source]
def self.attempt_replace_patterns(token, replacements, measure_threshold = nil) #

Attempt to replace a list of patterns/replacements on a token for a minimum measure M


[View source]
def self.categorize_chars(token : String) #

[View source]
def self.categorize_groups(token : String) #

[View source]
def self.ends_with_double_cons(token : String) #

[View source]
def self.measure(token : String | Nil) #

[View source]
def self.replace_patterns(token, replacements, measure_threshold = nil) #

[View source]
def self.replace_regex(token, regex, include_parts, minimum_measure) #

[View source]
def self.stem(token : String) #

[View source]
def self.step1a(token : String) #

[View source]
def self.step1b(token : String) #

[View source]
def self.step1c(token : String) #

[View source]
def self.step2(token : String) #

[View source]
def self.step3(token : String) #

[View source]
def self.step4(token : String) #

[View source]
def self.step5a(token : String) #

[View source]
def self.step5b(token : String) #

[View source]