words

package
v0.1.4-alpha-ab519db Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnknownLanguageError = errors.New("There is no resource for such a language")
)
View Source
var WordConstants wordConstants

Functions

func LoadWordsConstants

func LoadWordsConstants(lang languages.Language, resourcesDirPath string) error

func LoadWordsConstantsFromFile

func LoadWordsConstantsFromFile(lang languages.Language, resourcesDirPath string) error

func LoadWordsConstantsFromResources

func LoadWordsConstantsFromResources(lang languages.Language) error

Types

type CurrencyWords

type CurrencyWords struct {
	Currencies map[currency.Currency]currency.CustomCurrency `yaml:"currencies"`
}

type DeclensionNumbers

type DeclensionNumbers map[declension.Declension][constants.CountDigits]digitT

type DigitWords

type DigitWords struct {
	Units    DeclensionNumbers `yaml:"units"`
	Tens     DeclensionNumbers `yaml:"tens"`
	Dozens   DeclensionNumbers `yaml:"dozens"`
	Hundreds DeclensionNumbers `yaml:"hundreds"`
}

type FractionalUnit

type FractionalUnit struct {
	FractionalUnitsDeclensions fractionalUnitsDeclensionsT            `yaml:"fractionalUnitsDeclensions"`
	FractionalUnitsBeginning   []string                               `yaml:"fractionalUnitsBeginning"`
	FractionalUnitPrefixes     [constants.CountNumberNameForms]string `yaml:"fractionalUnitPrefixes"`
	FractionalUnitEndings      DeclensionFractionalUnits              `yaml:"fractionalUnitEndings"`
}

type OrdinalNumbers

type OrdinalNumbers struct {
	Units    []genderOrdinalNumbersT `yaml:"units,omitempty"`
	Tens     []genderOrdinalNumbersT `yaml:"tens,omitempty"`
	Dozens   []genderOrdinalNumbersT `yaml:"dozens,omitempty"`
	Hundreds []genderOrdinalNumbersT `yaml:"hundreds,omitempty"`
}

type Sign

type Sign struct {
	Minus string `yaml:"minus"`
}

type SlashNumberUnitPrefixes

type SlashNumberUnitPrefixes struct {
	Units    [constants.CountDigits]string `yaml:"units"`
	Tens     [constants.CountDigits]string `yaml:"tens"`
	Dozens   [constants.CountDigits]string `yaml:"dozens"`
	Hundreds [constants.CountDigits]string `yaml:"hundreds"`
}

type UnitScalesNames

type UnitScalesNames struct {
	Thousands      declensionUnitName `yaml:"thousands"`
	OtherEnding    declensionUnitName `yaml:"otherEnding"`
	OtherBeginning []string           `yaml:"otherBeginning"`
}

type UnitScalesNamesToNumber

type UnitScalesNamesToNumber struct {
	Words WordScales
}

func NewUnitScalesNamesToNumber

func NewUnitScalesNamesToNumber(usn UnitScalesNames) UnitScalesNamesToNumber

type WordScales

type WordScales map[string]uint64

type Words

type Words map[string]objects.Digit

type WordsDigit

type WordsDigit struct {
	Units    Words
	Tens     Words
	Dozens   Words
	Hundreds Words
}

func NewWordsDigit

func NewWordsDigit(dw DigitWords) WordsDigit

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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