inflect.go
func (rs *Ruleset) Pluralize(word string) string {
	if len(word) == 0 {
		return word
	}
	if rs.isUncountable(word) {
		return word
	}
	for _, rule := range rs.plurals {
		if rule.exact {
			if word == rule.suffix {
				return rule.replacement
			}
		} else {
			if strings.HasSuffix(word, rule.suffix) {
				return replaceLast(word, rule.suffix, rule.replacement)
			}
		}
	}
	return word + "s"
}
func (rs *Ruleset) Pluralize(word string) string {
	if len(word) == 0 {
		return word
	}
	if rs.isUncountable(word) {
		return word
	}
	for _, rule := range rs.plurals {
		if rule.exact {
			if word == rule.suffix {
				return rule.replacement
			}
		} else {
			if strings.HasSuffix(word, rule.suffix) {
				return replaceLast(word, rule.suffix, rule.replacement)
			}
		}
	}
	return word + "s"
}
func ( rs * Ruleset ) Pluralize ( word string ) string { if len ( word ) == 0 { return word } if rs . isUncountable ( word ) { return word } for _ , rule := range rs . plurals { if rule . exact { if word == rule . suffix { return rule . replacement } } else { if strings . HasSuffix ( word , rule . suffix ) { return replaceLast ( word , rule . suffix , rule . replacement ) } } } return word + " " }
// returns the plural form of a singular word
returns the plural form of a singular word