Documentation
¶
Overview ¶
Package latin provides types and a client for the Perseus Latin morphology API.
Index ¶
Constants ¶
View Source
const APIBase = "http://www.perseus.tufts.edu/hopper/xmlmorph?lang=la&lookup="
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analysis ¶
type Analysis struct {
Form string `xml:"form"`
Lemma string `xml:"lemma"`
ExpandedForm string `xml:"expandedForm"`
Pos string `xml:"pos"`
Number string `xml:"number"`
Gender string `xml:"gender"`
Case string `xml:"case"`
Dialect string `xml:"dialect"`
Feature string `xml:"feature"`
Person string `xml:"person"`
Tense string `xml:"tense"`
Mood string `xml:"mood"`
Voice string `xml:"voice"`
}
Analysis stores one morphological interpretation of a Latin word.
type Definition ¶
Definition holds a part-of-speech heading and its English glosses.
func LookupDefinitions ¶
func LookupDefinitions(word string) (string, []Definition, error)
LookupDefinitions queries the Wiktionary REST API. If the word only contains inflected "form-of" definitions, it automatically resolves and looks up the base lemma instead. It returns the actual word looked up (which may be the lemma) and its definitions.
Click to show internal directories.
Click to hide internal directories.