LMFeedPluralize class

A class to pluralize or singularize a word.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addIrregularRule(String singleParam, String pluralParam) → void
Add an irregular word definition.
addPluralRule(dynamic rule, String replacement) → void
Add a pluralization rule to the collection.
addSingularRule(dynamic rule, String replacement) → void
Add a singularization rule to the collection.
addUncountableRule(dynamic word) → void
Add an uncountable word rule.
capitalizeFirstLetter(String word) String
checkWord(Map<String, String> replaceMap, Map<String, String> keepMap, List<List> rules, String word) bool
Check if a word is part of the map.
init() → void
Initialize the collection of pluralization and singularization rules.
initIrregularRules() → void
initPluralRules() → void
initSingularRules() → void
initUncountableRules() → void
isPlural(String word) bool
Check if a word is plural.
isSingular(String word) bool
Check if a word is singular.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
plural(String word) String
Pluralize a word.
pluralize(String word, int count, bool inclusive) String
Pluralize or singularize a word based on the passed in count.
pluralizeOrCapitalize(String word, LMFeedPluralizeWordAction action) String
Pluralize or singularize a word based on the passed in action. word The word to pluralize or singularize. action The action to perform on the word.
replaceWord(Map<String, String> replaceMap, Map<String, String> keepMap, List<List> rules, String word) String
Replace a word with the updated word.
sanitizeWord(String token, String word, List<List> rules) String
Sanitize a word by passing in the word and sanitization rules.
singular(String word) String
Singularize a word.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance LMFeedPluralize
no setter