Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RussianNaiveGenderRules = NaiveGenderRules{ Suffixes: []NaiveGenderRulesSuffixes{ { Length: 5, Genders: map[string]Gender{ "слава": GenderFemale, }, }, { Length: 4, Genders: map[string]Gender{ "слав": GenderMale, }, }, { Length: 3, Genders: map[string]Gender{ "ика": GenderFemale, "ида": GenderFemale, "ана": GenderFemale, }, }, { Length: 2, Genders: map[string]Gender{ "ан": GenderMale, "он": GenderMale, "ий": GenderMale, "ав": GenderMale, "ем": GenderMale, "ём": GenderMale, "ей": GenderMale, "на": GenderFemale, "ил": GenderMale, "ия": GenderFemale, "ья": GenderFemale, }, }, }, }
Functions ¶
This section is empty.
Types ¶
type FindResult ¶ added in v0.3.0
type FindResult GetResult
type GenderFinder ¶ added in v0.4.0
type GenderFinder interface {
Find(ctx context.Context, names []string) (*FindResult, error)
}
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore(names map[string]Gender) *MemoryStore
type NaiveGenderFinder ¶ added in v0.4.0
type NaiveGenderFinder struct {
// contains filtered or unexported fields
}
func NewNaiveGenderFinder ¶ added in v0.4.0
func NewNaiveGenderFinder(rules NaiveGenderRules) NaiveGenderFinder
func (*NaiveGenderFinder) Find ¶ added in v0.4.0
func (f *NaiveGenderFinder) Find(_ context.Context, names []string) (*FindResult, error)
func (*NaiveGenderFinder) FindOne ¶ added in v0.4.0
func (f *NaiveGenderFinder) FindOne(name string) Gender
type NaiveGenderRules ¶ added in v0.4.0
type NaiveGenderRules struct {
Suffixes []NaiveGenderRulesSuffixes
}
type NaiveGenderRulesSuffixes ¶ added in v0.4.0
type StorableFinder ¶
type StorableFinder struct {
// contains filtered or unexported fields
}
func NewStorableGenderFinder ¶ added in v0.4.0
func NewStorableGenderFinder(store Store) *StorableFinder
func (*StorableFinder) Find ¶
func (f *StorableFinder) Find(ctx context.Context, names []string) (*FindResult, error)
type Store ¶
func LoadCSVStore ¶
Click to show internal directories.
Click to hide internal directories.