module Cadmium::StringExtension

Defined in:

cadmium/inflectors.cr
cadmium/phonetics.cr
cadmium/sentiment.cr
cadmium/stemmer.cr
cadmium/tokenizer.cr

Instance Method Summary

Instance Method Detail

def is_negative? #

Determines if a string is more negative than positive. Returns Bool.


[View source]
def is_positive? #

Determines if a string is more positive than negative. Returns Bool.


[View source]
def phonetics(max_length = nil, phonetics = Cadmium::Metaphone) #

[View source]
def pluralize(noun = true) #

[View source]
def sentiment(inject = nil) #

Get the sentiment of a string. Same as running Cadmium::Sentiment.analyze(STRING).


[View source]
def singularize(noun = true) #

[View source]
def sounds_like(word, phonetics = Cadmium::Metaphone) #

[View source]
def stem(stemmer = Cadmium::PorterStemmer) #

[View source]
def tokenize(tokenizer = Cadmium::WordPunctuationTokenizer, *args, **kwargs) #

[View source]
def tokenize_and_phoneticize(keep_stops = false, phonetics = Cadmium::Metaphone) #

[View source]
def tokenize_and_stem(stemmer = Cadmium::PorterStemmer, keep_stops = false) #

[View source]