Documentation
¶
Overview ¶
Package data holds embedded word frequency and linguistic reference data used by the cefr package for vocabulary lookup and analysis.
Index ¶
- func AWLLevel(word string) (int, bool)
- func InitError() error
- func IrregularLemma(word string) (string, bool)
- func LoadAWL() map[string]int
- func LoadAbbreviations() map[string]bool
- func LoadIrregularPastParticiples() map[string]bool
- func LoadIrregulars() map[string]string
- func LoadNGSL() map[string]int
- func LoadOxford() map[string]int
- func LoadStopwords() map[string]bool
- func NGSLLevel(word string) (int, bool)
- func OxfordLevel(word string) (int, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitError ¶
func InitError() error
InitError returns the first dataset initialization error encountered, or nil when all embedded datasets were loaded successfully.
func IrregularLemma ¶
IrregularLemma returns the lemma for an irregular form, if present.
func LoadAWL ¶
LoadAWL returns a map of word → level (4–5, mapped by sublist):
sublist 1–5 → 4, sublist 6–10 → 5
The returned map must not be modified by the caller.
func LoadAbbreviations ¶
LoadAbbreviations returns a set of common English abbreviations (e.g., "mr.", "dr."). The returned map must not be modified by the caller.
func LoadIrregularPastParticiples ¶
LoadIrregularPastParticiples returns a set of irregular past participle forms (type=pp entries from the irregulars data). Used for passive voice detection. The returned map must not be modified by the caller.
func LoadIrregulars ¶
LoadIrregulars returns a map of variant → lemma for irregular word forms. The returned map must not be modified by the caller.
func LoadNGSL ¶
LoadNGSL returns a map of word → level (1–4, mapped by frequency rank):
1–500 → 1, 501–1200 → 2, 1201–2000 → 3, 2001–2800 → 4
The returned map must not be modified by the caller.
func LoadOxford ¶
LoadOxford returns a map of word → CEFR level (1–5, where a1=1, a2=2, b1=3, b2=4, c1=5). The returned map must not be modified by the caller.
func LoadStopwords ¶
LoadStopwords returns a set of common English stopwords. The returned map must not be modified by the caller.
func OxfordLevel ¶
OxfordLevel returns the Oxford CEFR level for a single word, if present.
Types ¶
This section is empty.