pluralizer

package
v1.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inflector

type Inflector interface {
	Language() Language
	Plural(word string) string
	SetLanguage(language Language) Inflector
	Singular(word string) string
}

type Language

type Language interface {
	Name() string
	SingularRuleset() Ruleset
	PluralRuleset() Ruleset
}

type Pattern

type Pattern interface {
	Matches(word string) bool
}

type Patterns

type Patterns []Pattern

type Ruleset

type Ruleset interface {
	AddIrregular(substitutions ...Substitution) Ruleset
	AddUninflected(words ...string) Ruleset
	Regular() Transformations
	Uninflected() Patterns
	Irregular() Substitutions
}

type Substitution

type Substitution interface {
	From() string
	To() string
}

type Substitutions

type Substitutions []Substitution

type Transformation

type Transformation interface {
	Apply(word string) string
}

type Transformations

type Transformations []Transformation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL