Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HeHim = Pronoun{"he", "him", "his", "his", "himself"} SheHer = Pronoun{"she", "her", "her", "hers", "herself"} TheyThem = Pronoun{"they", "them", "their", "theirs", "themself"} ItIts = Pronoun{"it", "it", "its", "its", "itself"} OneOnes = Pronoun{"one", "one", "one's", "one's", "oneself"} )
Binary and normative-ish forms from https://en.pronouns.page/pronouns
View Source
var ErrInvalidPronounString = errors.New("invalid pronoun string")
Functions ¶
This section is empty.
Types ¶
type Pronoun ¶
type Pronoun struct {
Subject, Object, Possessive, PossessivePronoun, Reflexive string
}
Pronoun holds the 5 main forms of a pronoun in English
func FindPronoun ¶
FindPronoun is a utility function which uses the defaultFinder
func ParsePronounString ¶
ParsePronounString splits the string a/b/c/d/e into the 5 separate components in the Pronoun struct.
This trims any spaces around the 5 separate components.
Errors are returned as (empty, ErrInvalidPronounString)
type PronounFinder ¶
type PronounFinder struct {
// contains filtered or unexported fields
}
PronounFinder is used to find the pronoun struct based on the short form representation.
func NewPronounFinder ¶
func NewPronounFinder(p []Pronoun, std bool) *PronounFinder
NewPronounFinder creates a PronounFinder using the listed pronouns. Set std to true to load the standardPronouns as well.
Click to show internal directories.
Click to hide internal directories.