Porter2StemmerMixin class abstract

Implements the Porter2Stemmer.stem method.

Implemented types
Implementers

Constructors

Porter2StemmerMixin()

Properties

exceptions Map<String, String>
A hashmap of terms (keys) with their stem values that will be returned rather than being processed by the stemmer.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
invariantExceptions Map<String, String>
Collection of terms that have no stem but do not fit the algorithm.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
step1AExceptions Map<String, String>
Collection of terms that have no stem at the end of Step 1(a).
no setter
step1BSuffixes Map<String, String>
Suffix hasmap for Step 1B.
no setter
step2Suffixes Map<String, String>
Suffix hasmap for Step 2.
no setter
step3Suffixes Map<String, String>
Suffix hasmap for Step 3.
no setter
step4Suffixes Map<String, String>
Suffix hasmap for Step 4.
no setter

Methods

exception(String term) String?
If the String term.isIdentifier], it is returned as an exception to the algorithm.
normalizeQuotesAndApostrophes(String term) String
Replace all forms of apostrophe or quotation mar with U+0027.
normalizeYs(String term) String
Set initial y, or y after a vowel, to Y.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEnclosingQuotes(String term) String
Trims all quotation marks from start and end of String.
replaceYs(String term) String
Set initial y, or y after a vowel, to Y.
stem(String term) String
Reduces the String to its word stem, base or root form using the Porter2StemmerMixin English language stemming algorithm.
override
step0(String term) String
Remove longest of "'", "'s" or "'s'" from end of term.
step1A(String term) String
Search for the longest among the following suffixes, and perform the action indicated.
step1AException(String term) String?
Look up the String in step1AExceptions and return the value or null.
step1B(String term) String
Search for the longest among the following suffixes, and perform the action indicated.
step1C(String term) String
Replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say
step2(String term) String
Search for the longest key in step2Suffixes, and, if found and in R1, replace with the corresponding value from step2Suffixes.
step3(String term) String
Search for the longest key in step3Suffixes, and, if found and in R1, replace with the corresponding value from step3Suffixes.
step4(String term) String
Search for the longest key in step4Suffixes, and, if found and in R2, replace with the corresponding value from step4Suffixes.
step5(String term) String
Search for the the following suffixes, and, if found:
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

kStep2Suffixes → const Map<String, String>
Suffix hasmap for Step 2.