parser

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllTestEntries

func GetAllTestEntries(testcasesFilePath string) (map[string][]Entry, error)

Types

type Entry

type Entry struct {
	HyphenatedText string  `yaml:"hyphenatedText"`
	IPA            string  `yaml:"IPA"`
	Type           string  `yaml:"type"`
	GrammerNotes   string  `yaml:"grammerNotes"`
	ExtraInfo      string  `yaml:"extraInfo"`
	Senses         []Sense `yaml:"senses"`
}

func ParseDictionaryPage added in v0.2.0

func ParseDictionaryPage(htmlTextReader io.Reader) ([]Entry, error)

type QueryResult

type QueryResult struct {
	SpellingIsCorrect bool
	Entries           []Entry  `yaml:"entries"`
	Spellings         []string `yaml:"spellings"`
}

func (*QueryResult) FilterByTypes added in v0.1.0

func (q *QueryResult) FilterByTypes(entryTypes ...string) *QueryResult

type Sense

type Sense struct {
	SignPost  string     `yaml:"signpost"`
	Subsenses []SubSense `yaml:"subsenses"`
}

type Spellcheck

type Spellcheck struct {
	Suggestions []Suggestion
}

func ParseSpellcheck

func ParseSpellcheck(htmlTextReader io.Reader) (*Spellcheck, error)

type SubSense

type SubSense struct {
	Definition string `yaml:"definition"`
}

type Suggestion

type Suggestion struct {
	Text string
	Url  string
}

Jump to

Keyboard shortcuts

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