rules

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlippedSubstitutions

func GetFlippedSubstitutions(substitutions ...pluralizer.Substitution) []pluralizer.Substitution

Types

type Pattern

type Pattern struct {
	// contains filtered or unexported fields
}

func NewPattern

func NewPattern(pattern string) *Pattern

func (*Pattern) Matches

func (r *Pattern) Matches(word string) bool

type Ruleset

type Ruleset struct {
	// contains filtered or unexported fields
}

func NewRuleset

func NewRuleset(regular pluralizer.Transformations, uninflected pluralizer.Patterns, irregular pluralizer.Substitutions) *Ruleset

func (*Ruleset) AddIrregular

func (r *Ruleset) AddIrregular(substitutions ...pluralizer.Substitution) pluralizer.Ruleset

func (*Ruleset) AddUninflected

func (r *Ruleset) AddUninflected(words ...string) pluralizer.Ruleset

func (*Ruleset) Irregular

func (r *Ruleset) Irregular() pluralizer.Substitutions

func (*Ruleset) Regular

func (r *Ruleset) Regular() pluralizer.Transformations

func (*Ruleset) Uninflected

func (r *Ruleset) Uninflected() pluralizer.Patterns

type Substitution

type Substitution struct {
	// contains filtered or unexported fields
}

func NewSubstitution

func NewSubstitution(from, to string) *Substitution

func (*Substitution) From

func (r *Substitution) From() string

func (*Substitution) To

func (r *Substitution) To() string

type Transformation

type Transformation struct {
	// contains filtered or unexported fields
}

func NewTransformation

func NewTransformation(pattern, replacement string) *Transformation

func (*Transformation) Apply

func (r *Transformation) Apply(word string) string

Jump to

Keyboard shortcuts

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