Documentation ¶
Index ¶
- Variables
- func Assert(condition bool, errorMessage string)
- func Check(e error)
- func CleanupTest()
- func CompileDictionary(xmlPath string, outputPath string) int
- func DefinitionAddExamples(builder *flatbuffers.Builder, examples flatbuffers.UOffsetT)
- func DefinitionAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
- func DefinitionAddValue(builder *flatbuffers.Builder, value flatbuffers.UOffsetT)
- func DefinitionEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
- func DefinitionStart(builder *flatbuffers.Builder)
- func DefinitionStartExamplesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
- func DictionaryAddEntries(builder *flatbuffers.Builder, entries flatbuffers.UOffsetT)
- func DictionaryAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
- func DictionaryAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)
- func DictionaryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
- func DictionaryStart(builder *flatbuffers.Builder)
- func DictionaryStartEntriesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
- func EncodeDictionary(dictionary Dictionary) []byte
- func EncodeEntry(entry Entry) []byte
- func EntryAddEtymologies(builder *flatbuffers.Builder, etymologies flatbuffers.UOffsetT)
- func EntryAddKey(builder *flatbuffers.Builder, key flatbuffers.UOffsetT)
- func EntryAddPronunciation(builder *flatbuffers.Builder, pronunciation flatbuffers.UOffsetT)
- func EntryAddSee(builder *flatbuffers.Builder, see flatbuffers.UOffsetT)
- func EntryAddTerm(builder *flatbuffers.Builder, term flatbuffers.UOffsetT)
- func EntryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
- func EntryKeyCompare(o1, o2 flatbuffers.UOffsetT, buf []byte) bool
- func EntryStart(builder *flatbuffers.Builder)
- func EntryStartEtymologiesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
- func EtymologyAddDescription(builder *flatbuffers.Builder, description flatbuffers.UOffsetT)
- func EtymologyAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
- func EtymologyAddUsages(builder *flatbuffers.Builder, usages flatbuffers.UOffsetT)
- func EtymologyEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
- func EtymologyStart(builder *flatbuffers.Builder)
- func EtymologyStartUsagesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
- func GroupAddDefinitions(builder *flatbuffers.Builder, definitions flatbuffers.UOffsetT)
- func GroupAddDescription(builder *flatbuffers.Builder, description flatbuffers.UOffsetT)
- func GroupAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
- func GroupEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
- func GroupStart(builder *flatbuffers.Builder)
- func GroupStartDefinitionsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
- func JSON(any interface{}) string
- func Map[T any, V any](array []T, f func(T) V) []V
- func Uint16ToBytes(n uint16) []byte
- func Uint64ToBytes(n uint64) []byte
- func UsageAddDefinitions(builder *flatbuffers.Builder, definitions flatbuffers.UOffsetT)
- func UsageAddGroups(builder *flatbuffers.Builder, groups flatbuffers.UOffsetT)
- func UsageAddPos(builder *flatbuffers.Builder, pos POS)
- func UsageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
- func UsageKeyCompare(o1, o2 flatbuffers.UOffsetT, buf []byte) bool
- func UsageStart(builder *flatbuffers.Builder)
- func UsageStartDefinitionsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
- func UsageStartGroupsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
- func WriteDictionaryFromExisting(outputPath string, dictionary DictionaryRepresentable) int
- func WriteDictionaryFromXML(xmlStr, outputPath string) int
- func XML(any interface{}) string
- type DEFINITIONS
- type DICTIONARIES
- type Definition
- func (definition *Definition) AsRepresentable() DefinitionRepresentable
- func (rcv *Definition) Examples(j int) []byte
- func (rcv *Definition) ExamplesLength() int
- func (rcv *Definition) Id() []byte
- func (rcv *Definition) Init(buf []byte, i flatbuffers.UOffsetT)
- func (rcv *Definition) Table() flatbuffers.Table
- func (rcv *Definition) Value() []byte
- type DefinitionRepresentable
- type Dictionary
- func (dict *Dictionary) AsRepresentable() DictionaryRepresentable
- func (dict *Dictionary) DumpSQL(sqlDialect SqlDialect) string
- func (dict *Dictionary) DumpXML() string
- func (rcv *Dictionary) Entries(obj *Entry, j int) bool
- func (rcv *Dictionary) EntriesByKey(obj *Entry, key string) bool
- func (rcv *Dictionary) EntriesLength() int
- func (rcv *Dictionary) Id() []byte
- func (dict *Dictionary) Index(overwrite bool, quiet bool) string
- func (rcv *Dictionary) Init(buf []byte, i flatbuffers.UOffsetT)
- func (dict *Dictionary) Lexicon() []string
- func (dict *Dictionary) Lookup(queries []string, split int, follow bool) [][]Entry
- func (rcv *Dictionary) Name() []byte
- func (dict *Dictionary) Split(query string, threshold int) []Entry
- func (rcv *Dictionary) Table() flatbuffers.Table
- type DictionaryRepresentable
- type ENTRIES
- type ETYMOLOGIES
- type EXAMPLES
- type Entry
- func (entry *Entry) AsRepresentable() EntryRepresentable
- func (rcv *Entry) Etymologies(obj *Etymology, j int) bool
- func (rcv *Entry) EtymologiesLength() int
- func (rcv *Entry) Init(buf []byte, i flatbuffers.UOffsetT)
- func (rcv *Entry) Key() []byte
- func (rcv *Entry) LookupByKey(key string, vectorLocation flatbuffers.UOffsetT, buf []byte) bool
- func (rcv *Entry) Pronunciation() []byte
- func (rcv *Entry) See() []byte
- func (rcv *Entry) Table() flatbuffers.Table
- func (rcv *Entry) Term() []byte
- type EntryRepresentable
- type Etymology
- func (etymology *Etymology) AsRepresentable() EtymologyRepresentable
- func (rcv *Etymology) Description() []byte
- func (rcv *Etymology) Id() []byte
- func (rcv *Etymology) Init(buf []byte, i flatbuffers.UOffsetT)
- func (rcv *Etymology) Table() flatbuffers.Table
- func (rcv *Etymology) Usages(obj *Usage, j int) bool
- func (rcv *Etymology) UsagesByKey(obj *Usage, key POS) bool
- func (rcv *Etymology) UsagesLength() int
- type EtymologyRepresentable
- type GROUPS
- type Group
- func (group *Group) AsRepresentable() GroupRepresentable
- func (rcv *Group) Definitions(obj *Definition, j int) bool
- func (rcv *Group) DefinitionsLength() int
- func (rcv *Group) Description() []byte
- func (rcv *Group) Id() []byte
- func (rcv *Group) Init(buf []byte, i flatbuffers.UOffsetT)
- func (rcv *Group) Table() flatbuffers.Table
- type GroupRepresentable
- type KVMap
- type Keyable
- type POS
- type PartOfSpeech
- type Representable
- type Serializable
- type SqlDialect
- type USAGES
- type Usage
- func (usage *Usage) AsRepresentable() UsageRepresentable
- func (rcv *Usage) Definitions(obj *Definition, j int) bool
- func (rcv *Usage) DefinitionsLength() int
- func (rcv *Usage) Groups(obj *Group, j int) bool
- func (rcv *Usage) GroupsLength() int
- func (rcv *Usage) Init(buf []byte, i flatbuffers.UOffsetT)
- func (rcv *Usage) LookupByKey(key POS, vectorLocation flatbuffers.UOffsetT, buf []byte) bool
- func (rcv *Usage) MutatePos(n POS) bool
- func (rcv *Usage) Pos() POS
- func (rcv *Usage) Table() flatbuffers.Table
- type UsageRepresentable
Constants ¶
This section is empty.
Variables ¶
var Abbreviation = PartOfSpeech{Tag: "abbrev", Buf: POSabv, Label: "abbreviation"}
var Adfix = PartOfSpeech{Tag: "adf", Buf: POSadf, Label: "adfix"}
var AdjectivalPreNoun = PartOfSpeech{Tag: "adj-pn", Buf: POSadj_pn, Label: "pre-noun adjectival (rentaishi)"}
var Adjective = PartOfSpeech{Tag: "adj", Label: "adjective", Buf: POSadj}
var AdjectiveKari = PartOfSpeech{Tag: "adj-kari", Buf: POSadj_kari, Label: "'kari' adjective (archaic)"}
var AdjectiveKu = PartOfSpeech{Tag: "adj-ku", Buf: POSadj_ku, Label: "'ku' adjective (archaic)"}
var AdjectiveNari = PartOfSpeech{Tag: "adj-nari", Buf: POSadj_nari, Label: "archaic/formal form of na-adjective"}
var AdjectiveNoun = PartOfSpeech{Tag: "adj-na", Buf: POSadj_na, Label: "adjectival nouns or quasi-adjectives (keiyodoshi)"}
var AdjectivePhrase = PartOfSpeech{Tag: "phr_adj", Label: "adjective phrase", Buf: POSphr_adj}
var AdjectiveShiku = PartOfSpeech{Tag: "adj-shiku", Buf: POSadj_shiku, Label: "'shiku' adjective (archaic)"}
var AdjectiveTaru = PartOfSpeech{Tag: "adj-t", Buf: POSadj_t, Label: "'taru' adjective"}
var AdjectiveYoiIi = PartOfSpeech{Tag: "adj-ix", Buf: POSadj_ix, Label: "adjective (keiyoushi) - yoi/ii class"}
var Adverb = PartOfSpeech{Tag: "adv", Label: "adverb", Buf: POSadv}
var AdverbTo = PartOfSpeech{Tag: "adv-to", Buf: POSadv_to, Label: "adverb taking the 'to' particle"}
var AdverbialNoun = PartOfSpeech{Tag: "n-adv", Buf: POSn_adv, Label: "adverbial noun (fukushitekimeishi)"}
var AdverbialPhrase = PartOfSpeech{Tag: "phr_adv", Label: "adverbial phrase", Buf: POSphr_adv}
var Affix = PartOfSpeech{Tag: "aff", Buf: POSaff, Label: "affix"}
var Auxiliary = PartOfSpeech{Tag: "aux", Label: "auxiliary", Buf: POSaux}
var AuxiliaryAdjective = PartOfSpeech{Tag: "aux-adj", Buf: POSaux_adj, Label: "auxiliary adjective"}
var AuxiliaryVerb = PartOfSpeech{Tag: "aux-v", Buf: POSaux_v, Label: "auxiliary verb"}
var Character = PartOfSpeech{Tag: "chr", Label: "character", Buf: POSchr}
var Circumfix = PartOfSpeech{Tag: "crcf", Buf: POScf, Label: "circumfix"}
var Conjunction = PartOfSpeech{Tag: "conj", Buf: POSconj, Label: "conjunction"}
var CoordinatingConjunction = PartOfSpeech{Tag: "cconj", Buf: POSconj_c, Label: "coordinating conjunction"}
var Copula = PartOfSpeech{Tag: "cop", Buf: POScop, Label: "copula"}
var Counter = PartOfSpeech{Tag: "ctr", Buf: POSctr, Label: "counter"}
var Determiner = PartOfSpeech{Tag: "det", Buf: POSdet, Label: "determiner"}
var EnumNamesPOS = map[POS]string{}/* 114 elements not displayed */
var EnumValuesPOS = map[string]POS{}/* 114 elements not displayed */
var Expression = PartOfSpeech{Tag: "expr", Buf: POSexpr, Label: "expression"}
var Infix = PartOfSpeech{Tag: "inf", Buf: POSinf, Label: "infix"}
var Interfix = PartOfSpeech{Tag: "intf", Buf: POSintf, Label: "interfix"}
var Interjection = PartOfSpeech{Tag: "intj", Buf: POSintj, Label: "interjection"}
var IntransitiveVerb = PartOfSpeech{Tag: "vi", Buf: POSvi, Label: "intransitive verb"}
var Name = PartOfSpeech{Tag: "name", Buf: POSname, Label: "name"}
var Noun = PartOfSpeech{Tag: "n", Buf: POSn, Label: "noun"}
var NounNo = PartOfSpeech{Tag: "adj-no", Buf: POSadj_no, Label: "nouns which may take the genitive case particle 'no'"}
var NounPrefix = PartOfSpeech{Tag: "n-pref", Buf: POSn_pref, Label: "noun, used as a prefix"}
var NounSuffix = PartOfSpeech{Tag: "n-suf", Buf: POSn_suf, Label: "noun, used as a suffix"}
var NounTemporal = PartOfSpeech{Tag: "n-t", Buf: POSn_t, Label: "noun (temporal) (jisoumeishi)"}
var NounVerbPrenominal = PartOfSpeech{Tag: "adj-f", Buf: POSadj_f, Label: "noun or verb acting prenominally"}
var Numeric = PartOfSpeech{Tag: "num", Buf: POSnum, Label: "numeric"}
var Particle = PartOfSpeech{Tag: "part", Buf: POSpart, Label: "particle"}
var Phrase = PartOfSpeech{Tag: "phr", Buf: POSpart, Label: "phrase"}
var Postposition = PartOfSpeech{Tag: "postp", Buf: POSpostp, Label: "postposition"}
var Prefix = PartOfSpeech{Tag: "pref", Buf: POSpart, Label: "prefix"}
var Preposition = PartOfSpeech{Tag: "prep", Buf: POSprep, Label: "preposition"}
var PrepositionalPhrase = PartOfSpeech{Tag: "phr_prep", Label: "prepositional phrase", Buf: POSphr_adj}
var Pronoun = PartOfSpeech{Tag: "pron", Buf: POSpron, Label: "pronoun"}
var ProperNoun = PartOfSpeech{Tag: "propn", Buf: POSpropn, Label: "proper noun"}
var Proverb = PartOfSpeech{Tag: "prov", Buf: POSprov, Label: "proverb"}
var Punctuation = PartOfSpeech{Tag: "punc", Buf: POSpunc, Label: "punctuation"}
var SubordinatingConjunction = PartOfSpeech{Tag: "conj_s", Buf: POSconj_s, Label: "subordinating conjunction"}
var Suffix = PartOfSpeech{Tag: "suff", Buf: POSsuff, Label: "suffix"}
var Symbol = PartOfSpeech{Tag: "sym", Buf: POSsym, Label: "symbol"}
var TransitiveVerb = PartOfSpeech{Tag: "vt", Buf: POSvt, Label: "transitive verb"}
var Unknown = PartOfSpeech{Tag: "un", Buf: POSun, Label: "unknown"}
var Verb = PartOfSpeech{Tag: "v", Buf: POSv, Label: "verb"}
var VerbGodanBu = PartOfSpeech{Tag: "v5b", Buf: POSv5b, Label: "Godan verb with 'bu' ending"}
var VerbGodanGu = PartOfSpeech{Tag: "v5g", Buf: POSv5g, Label: "Godan verb with 'gu' ending"}
var VerbGodanKu = PartOfSpeech{Tag: "v5k", Buf: POSv5k, Label: "Godan verb with 'ku' ending"}
var VerbGodanMu = PartOfSpeech{Tag: "v5m", Buf: POSv5m, Label: "Godan verb with 'mu' ending"}
var VerbGodanNu = PartOfSpeech{Tag: "v5n", Buf: POSv5n, Label: "Godan verb with 'nu' ending"}
var VerbGodanRu = PartOfSpeech{Tag: "v5r", Buf: POSv5r, Label: "Godan verb with 'ru' ending"}
var VerbGodanRuIrregular = PartOfSpeech{Tag: "v5r-i", Buf: POSv5r_i, Label: "Godan verb with 'ru' ending (irregular verb)"}
var VerbGodanSpecialAru = PartOfSpeech{Tag: "v5aru", Buf: POSv5aru, Label: "Godan verb - -aru special class"}
var VerbGodanSpecialIkuYuku = PartOfSpeech{Tag: "v5k-s", Buf: POSv5k_s, Label: "Godan verb - Iku/Yuku special class"}
var VerbGodanSu = PartOfSpeech{Tag: "v5s", Buf: POSv5s, Label: "Godan verb with 'su' ending"}
var VerbGodanTsu = PartOfSpeech{Tag: "v5t", Buf: POSv5t, Label: "Godan verb with 'tsu' ending"}
var VerbGodanU = PartOfSpeech{Tag: "v5u", Buf: POSv5u, Label: "Godan verb with 'u' ending"}
var VerbGodanUSpecial = PartOfSpeech{Tag: "v5u-s", Buf: POSv5u_s, Label: "Godan verb with 'u' ending (special class)"}
var VerbGodanUruOldVerbOldFormOfEru = PartOfSpeech{Tag: "v5uru", Buf: POSv5uru, Label: "Godan verb - Uru old class verb (old form of Eru)"}
var VerbIchidan = PartOfSpeech{Tag: "v1", Buf: POSv1, Label: "Ichidan verb"}
var VerbIchidanSpecial = PartOfSpeech{Tag: "v1-s", Buf: POSv1_s, Label: "Ichidan verb - kureru special class"}
var VerbIchidanZuru = PartOfSpeech{Tag: "vz", Buf: POSvz, Label: "Ichidan verb - zuru verb (alternative form of -jiru verbs)"}
var VerbKuruSpecial = PartOfSpeech{Tag: "vk", Buf: POSvk, Label: "Kuru verb - special class"}
var VerbNidanBuLower = PartOfSpeech{Tag: "v2b-s", Buf: POSv2b_s, Label: "Nidan verb (lower class) with 'bu' ending (archaic)"}
var VerbNidanBuUpper = PartOfSpeech{Tag: "v2b-k", Buf: POSv2b_k, Label: "Nidan verb (upper class) with 'bu' ending (archaic)"}
var VerbNidanDzuLower = PartOfSpeech{Tag: "v2d-s", Buf: POSv2d_s, Label: "Nidan verb (lower class) with 'dzu' ending (archaic)"}
var VerbNidanDzuUpper = PartOfSpeech{Tag: "v2d-k", Buf: POSv2d_k, Label: "Nidan verb (upper class) with 'dzu' ending (archaic)"}
var VerbNidanGuLower = PartOfSpeech{Tag: "v2g-s", Buf: POSv2g_s, Label: "Nidan verb (lower class) with 'gu' ending (archaic)"}
var VerbNidanGuUpper = PartOfSpeech{Tag: "v2g-k", Buf: POSv2g_k, Label: "Nidan verb (upper class) with 'gu' ending (archaic)"}
var VerbNidanHuFuLower = PartOfSpeech{Tag: "v2h-s", Buf: POSv2h_s, Label: "Nidan verb (lower class) with 'hu/fu' ending (archaic)"}
var VerbNidanHuFuUpper = PartOfSpeech{Tag: "v2h-k", Buf: POSv2h_k, Label: "Nidan verb (upper class) with 'hu/fu' ending (archaic)"}
var VerbNidanKuLower = PartOfSpeech{Tag: "v2k-s", Buf: POSv2k_s, Label: "Nidan verb (lower class) with 'ku' ending (archaic)"}
var VerbNidanKuUpper = PartOfSpeech{Tag: "v2k-k", Buf: POSv2k_k, Label: "Nidan verb (upper class) with 'ku' ending (archaic)"}
var VerbNidanMuLower = PartOfSpeech{Tag: "v2m-s", Buf: POSv2m_s, Label: "Nidan verb (lower class) with 'mu' ending (archaic)"}
var VerbNidanMuUpper = PartOfSpeech{Tag: "v2m-k", Buf: POSv2m_k, Label: "Nidan verb (upper class) with 'mu' ending (archaic)"}
var VerbNidanNuLower = PartOfSpeech{Tag: "v2n-s", Buf: POSv2n_s, Label: "Nidan verb (lower class) with 'nu' ending (archaic)"}
var VerbNidanRuLower = PartOfSpeech{Tag: "v2r-s", Buf: POSv2r_s, Label: "Nidan verb (lower class) with 'ru' ending (archaic)"}
var VerbNidanRuUpper = PartOfSpeech{Tag: "v2r-k", Buf: POSv2r_k, Label: "Nidan verb (upper class) with 'ru' ending (archaic)"}
var VerbNidanSuLower = PartOfSpeech{Tag: "v2s-s", Buf: POSv2s_s, Label: "Nidan verb (lower class) with 'su' ending (archaic)"}
var VerbNidanTsuLower = PartOfSpeech{Tag: "v2t-s", Buf: POSv2t_s, Label: "Nidan verb (lower class) with 'tsu' ending (archaic)"}
var VerbNidanTsuUpper = PartOfSpeech{Tag: "v2t-k", Buf: POSv2t_k, Label: "Nidan verb (upper class) with 'tsu' ending (archaic)"}
var VerbNidanU = PartOfSpeech{Tag: "v2a-s", Buf: POSv2a_s, Label: "Nidan verb with 'u' ending (archaic)"}
var VerbNidanUWeLower = PartOfSpeech{Tag: "v2w-s", Buf: POSv2w_s, Label: "Nidan verb (lower class) with 'u' ending and 'we' conjugation (archaic)"}
var VerbNidanYuLower = PartOfSpeech{Tag: "v2y-s", Buf: POSv2y_s, Label: "Nidan verb (lower class) with 'yu' ending (archaic)"}
var VerbNidanYuUpper = PartOfSpeech{Tag: "v2y-k", Buf: POSv2y_k, Label: "Nidan verb (upper class) with 'yu' ending (archaic)"}
var VerbNidanZuLower = PartOfSpeech{Tag: "v2z-s", Buf: POSv2z_s, Label: "Nidan verb (lower class) with 'zu' ending (archaic)"}
var VerbNuIrregular = PartOfSpeech{Tag: "vn", Buf: POSvn, Label: "irregular nu verb"}
var VerbRuIrregular = PartOfSpeech{Tag: "vr", Buf: POSvr, Label: "irregular ru verb, plain form ends with -ri"}
var VerbSu = PartOfSpeech{Tag: "vs-c", Buf: POSvs_c, Label: "su verb - precursor to the modern suru"}
var VerbSuru = PartOfSpeech{Tag: "vs", Buf: POSvs, Label: "noun or participle which takes the aux. verb suru"}
var VerbSuruIncluded = PartOfSpeech{Tag: "vs-i", Buf: POSvs_i, Label: "suru verb - included"}
var VerbSuruSpecial = PartOfSpeech{Tag: "vs-s", Buf: POSvs_s, Label: "suru verb - special class"}
var VerbUnspecified = PartOfSpeech{Tag: "v-unspec", Buf: POSv_unspec, Label: "verb unspecified"}
var VerbYodanBu = PartOfSpeech{Tag: "v4b", Buf: POSv4b, Label: "Yodan verb with 'bu' ending (archaic)"}
var VerbYodanGu = PartOfSpeech{Tag: "v4g", Buf: POSv4g, Label: "Yodan verb with 'gu' ending (archaic)"}
var VerbYodanHuFu = PartOfSpeech{Tag: "v4h", Buf: POSv4h, Label: "Yodan verb with 'hu/fu' ending (archaic)"}
var VerbYodanKu = PartOfSpeech{Tag: "v4k", Buf: POSv4k, Label: "Yodan verb with 'ku' ending (archaic)"}
var VerbYodanMu = PartOfSpeech{Tag: "v4m", Buf: POSv4m, Label: "Yodan verb with 'mu' ending (archaic)"}
var VerbYodanNu = PartOfSpeech{Tag: "v4n", Buf: POSv4n, Label: "Yodan verb with 'nu' ending (archaic)"}
var VerbYodanRu = PartOfSpeech{Tag: "v4r", Buf: POSv4r, Label: "Yodan verb with 'ru' ending (archaic)"}
var VerbYodanSu = PartOfSpeech{Tag: "v4s", Buf: POSv4s, Label: "Yodan verb with 'su' ending (archaic)"}
var VerbYodanTsu = PartOfSpeech{Tag: "v4t", Buf: POSv4t, Label: "Yodan verb with 'tsu' ending (archaic)"}
Functions ¶
func CleanupTest ¶
func CleanupTest()
func CompileDictionary ¶
CompileDictionary compiles an XML file into an ODict binary
func DefinitionAddExamples ¶
func DefinitionAddExamples(builder *flatbuffers.Builder, examples flatbuffers.UOffsetT)
func DefinitionAddId ¶
func DefinitionAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
func DefinitionAddValue ¶
func DefinitionAddValue(builder *flatbuffers.Builder, value flatbuffers.UOffsetT)
func DefinitionEnd ¶
func DefinitionEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func DefinitionStart ¶
func DefinitionStart(builder *flatbuffers.Builder)
func DefinitionStartExamplesVector ¶
func DefinitionStartExamplesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
func DictionaryAddEntries ¶
func DictionaryAddEntries(builder *flatbuffers.Builder, entries flatbuffers.UOffsetT)
func DictionaryAddId ¶
func DictionaryAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
func DictionaryAddName ¶
func DictionaryAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT)
func DictionaryEnd ¶
func DictionaryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func DictionaryStart ¶
func DictionaryStart(builder *flatbuffers.Builder)
func DictionaryStartEntriesVector ¶
func DictionaryStartEntriesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
func EncodeDictionary ¶
func EncodeDictionary(dictionary Dictionary) []byte
EncodeDictionary encodes a dictionary struct into a byte array
func EncodeEntry ¶
EncodeDictionary encodes an entry struct into a byte array
func EntryAddEtymologies ¶
func EntryAddEtymologies(builder *flatbuffers.Builder, etymologies flatbuffers.UOffsetT)
func EntryAddKey ¶
func EntryAddKey(builder *flatbuffers.Builder, key flatbuffers.UOffsetT)
func EntryAddPronunciation ¶ added in v1.9.0
func EntryAddPronunciation(builder *flatbuffers.Builder, pronunciation flatbuffers.UOffsetT)
func EntryAddSee ¶ added in v1.7.0
func EntryAddSee(builder *flatbuffers.Builder, see flatbuffers.UOffsetT)
func EntryAddTerm ¶
func EntryAddTerm(builder *flatbuffers.Builder, term flatbuffers.UOffsetT)
func EntryEnd ¶
func EntryEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func EntryKeyCompare ¶ added in v1.7.0
func EntryKeyCompare(o1, o2 flatbuffers.UOffsetT, buf []byte) bool
func EntryStart ¶
func EntryStart(builder *flatbuffers.Builder)
func EntryStartEtymologiesVector ¶
func EntryStartEtymologiesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
func EtymologyAddDescription ¶
func EtymologyAddDescription(builder *flatbuffers.Builder, description flatbuffers.UOffsetT)
func EtymologyAddId ¶
func EtymologyAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
func EtymologyAddUsages ¶
func EtymologyAddUsages(builder *flatbuffers.Builder, usages flatbuffers.UOffsetT)
func EtymologyEnd ¶
func EtymologyEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func EtymologyStart ¶
func EtymologyStart(builder *flatbuffers.Builder)
func EtymologyStartUsagesVector ¶
func EtymologyStartUsagesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
func GroupAddDefinitions ¶
func GroupAddDefinitions(builder *flatbuffers.Builder, definitions flatbuffers.UOffsetT)
func GroupAddDescription ¶
func GroupAddDescription(builder *flatbuffers.Builder, description flatbuffers.UOffsetT)
func GroupAddId ¶
func GroupAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)
func GroupEnd ¶
func GroupEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func GroupStart ¶
func GroupStart(builder *flatbuffers.Builder)
func GroupStartDefinitionsVector ¶
func GroupStartDefinitionsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
func Uint16ToBytes ¶
Uint16ToBytes converts a uint16 type to a byte array
func Uint64ToBytes ¶
Uint64ToBytes converts a uint64 type to a byte array
func UsageAddDefinitions ¶
func UsageAddDefinitions(builder *flatbuffers.Builder, definitions flatbuffers.UOffsetT)
func UsageAddGroups ¶
func UsageAddGroups(builder *flatbuffers.Builder, groups flatbuffers.UOffsetT)
func UsageAddPos ¶
func UsageAddPos(builder *flatbuffers.Builder, pos POS)
func UsageEnd ¶
func UsageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func UsageKeyCompare ¶ added in v1.7.0
func UsageKeyCompare(o1, o2 flatbuffers.UOffsetT, buf []byte) bool
func UsageStart ¶
func UsageStart(builder *flatbuffers.Builder)
func UsageStartDefinitionsVector ¶
func UsageStartDefinitionsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
func UsageStartGroupsVector ¶
func UsageStartGroupsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT
func WriteDictionaryFromExisting ¶
func WriteDictionaryFromExisting(outputPath string, dictionary DictionaryRepresentable) int
func WriteDictionaryFromXML ¶
WriteDictionary generates an ODict binary file given a ODXML input file path
Types ¶
type DEFINITIONS ¶ added in v1.10.0
type DEFINITIONS struct { sq.TableStruct ID sq.NumberField `ddl:"type=BIGINT primarykey auto_increment autoincrement identity"` TEXT sq.StringField `ddl:"notnull"` USAGE_ID sq.NumberField `ddl:"type=BIGINT references=usages.id"` GROUP_ID sq.NumberField `ddl:"type=BIGINT references=groups.id"` }
type DICTIONARIES ¶ added in v1.10.0
type DICTIONARIES struct { sq.TableStruct ID sq.NumberField `ddl:"type=BIGINT primarykey auto_increment autoincrement identity"` NAME sq.StringField `ddl:"notnull"` }
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func GetRootAsDefinition ¶
func GetRootAsDefinition(buf []byte, offset flatbuffers.UOffsetT) *Definition
func GetSizePrefixedRootAsDefinition ¶
func GetSizePrefixedRootAsDefinition(buf []byte, offset flatbuffers.UOffsetT) *Definition
func (*Definition) AsRepresentable ¶
func (definition *Definition) AsRepresentable() DefinitionRepresentable
func (*Definition) Examples ¶
func (rcv *Definition) Examples(j int) []byte
func (*Definition) ExamplesLength ¶
func (rcv *Definition) ExamplesLength() int
func (*Definition) Id ¶
func (rcv *Definition) Id() []byte
func (*Definition) Init ¶
func (rcv *Definition) Init(buf []byte, i flatbuffers.UOffsetT)
func (*Definition) Table ¶
func (rcv *Definition) Table() flatbuffers.Table
func (*Definition) Value ¶
func (rcv *Definition) Value() []byte
type DefinitionRepresentable ¶
type DefinitionRepresentable struct { ID string `json:"id,omitempty" xml:"id,attr"` Value string `json:"value,omitempty" xml:"value,attr"` Examples []string `json:"examples,omitempty" xml:"example"` }
func (*DefinitionRepresentable) AsBuffer ¶
func (def *DefinitionRepresentable) AsBuffer(builder *flatbuffers.Builder) flatbuffers.UOffsetT
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
func DecodeDictionary ¶
func DecodeDictionary(b []byte) Dictionary
DecodeDictionary decodes a byte array into a dictionary object
func GetRootAsDictionary ¶
func GetRootAsDictionary(buf []byte, offset flatbuffers.UOffsetT) *Dictionary
func GetSizePrefixedRootAsDictionary ¶
func GetSizePrefixedRootAsDictionary(buf []byte, offset flatbuffers.UOffsetT) *Dictionary
func ReadDictionaryFromPath ¶
func ReadDictionaryFromPath(path string) *Dictionary
ReadDictionaryFromPath loads a compiled ODict dictionary from the provided path and returns a Dictionary model, with the ability to forcibly re-index the dictionary when it loads
func (*Dictionary) AsRepresentable ¶
func (dict *Dictionary) AsRepresentable() DictionaryRepresentable
func (*Dictionary) DumpSQL ¶ added in v1.10.0
func (dict *Dictionary) DumpSQL(sqlDialect SqlDialect) string
DumpDictionarySQL converts an Dictionary struct to SQL output to seed a database
func (*Dictionary) DumpXML ¶ added in v1.10.0
func (dict *Dictionary) DumpXML() string
DumpDictionaryXML converts an Dictionary struct to its original ODXML
func (*Dictionary) EntriesByKey ¶ added in v1.7.0
func (rcv *Dictionary) EntriesByKey(obj *Entry, key string) bool
func (*Dictionary) EntriesLength ¶
func (rcv *Dictionary) EntriesLength() int
func (*Dictionary) Id ¶
func (rcv *Dictionary) Id() []byte
func (*Dictionary) Init ¶
func (rcv *Dictionary) Init(buf []byte, i flatbuffers.UOffsetT)
func (*Dictionary) Lexicon ¶ added in v1.7.0
func (dict *Dictionary) Lexicon() []string
Lexicon returns all originally-cased entries of a compiled dictionary
func (*Dictionary) Lookup ¶
func (dict *Dictionary) Lookup(queries []string, split int, follow bool) [][]Entry
func (*Dictionary) Name ¶
func (rcv *Dictionary) Name() []byte
func (*Dictionary) Split ¶
func (dict *Dictionary) Split(query string, threshold int) []Entry
Split splits a query into definable tokens greater than or equal to the specified threshold Example: household -> house + hold
func (*Dictionary) Table ¶
func (rcv *Dictionary) Table() flatbuffers.Table
type DictionaryRepresentable ¶
type DictionaryRepresentable struct { ID string `json:"id" xml:"id,attr"` Name string `json:"name" xml:"name,attr,omitempty"` Entries KVMap[string, EntryRepresentable] `json:"entries" xml:"entry"` XMLName xml.Name `json:"-" xml:"dictionary"` }
func MergeDictionaries ¶
func MergeDictionaries(dest *Dictionary, srcs ...*Dictionary) DictionaryRepresentable
MergeDictionaries merges the entries of two dictionaries.
func (*DictionaryRepresentable) AsBuffer ¶
func (dict *DictionaryRepresentable) AsBuffer(builder *flatbuffers.Builder) flatbuffers.UOffsetT
type ENTRIES ¶ added in v1.10.0
type ENTRIES struct { sq.TableStruct ID sq.NumberField `ddl:"type=BIGINT primarykey auto_increment autoincrement identity"` CREATED_AT sq.TimeField `ddl:"default=CURRENT_TIMESTAMP"` UPDATED_AT sq.TimeField TERM sq.StringField `ddl:"notnull"` DICTIONARY_ID sq.NumberField `ddl:"type=BIGINT references=dictionaries.id"` }
type ETYMOLOGIES ¶ added in v1.10.0
type ETYMOLOGIES struct { sq.TableStruct ID sq.StringField `ddl:"primarykey"` // cuid() generation is handled by prisma, not the database. DESCRIPTION sq.StringField ENTRY_ID sq.NumberField `ddl:"type=BIGINT notnull references=entries.id"` }
type EXAMPLES ¶ added in v1.10.0
type EXAMPLES struct { sq.TableStruct ID sq.NumberField `ddl:"type=BIGINT primarykey auto_increment autoincrement identity"` TEXT sq.StringField `ddl:"notnull"` DEFINITION_ID sq.NumberField `ddl:"type=BIGINT notnull references=definitions.id"` }
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
func DecodeEntry ¶
DecodeDictionary decodes a byte array into an entry object
func GetRootAsEntry ¶
func GetRootAsEntry(buf []byte, offset flatbuffers.UOffsetT) *Entry
func GetSizePrefixedRootAsEntry ¶
func GetSizePrefixedRootAsEntry(buf []byte, offset flatbuffers.UOffsetT) *Entry
func SearchDictionary ¶
SearchDictionary searches a dictionary model using Bleve using it's unique dictionary ID
func (*Entry) AsRepresentable ¶
func (entry *Entry) AsRepresentable() EntryRepresentable
func (*Entry) EtymologiesLength ¶
func (*Entry) LookupByKey ¶ added in v1.7.0
func (*Entry) Pronunciation ¶ added in v1.9.0
func (*Entry) Table ¶
func (rcv *Entry) Table() flatbuffers.Table
type EntryRepresentable ¶
type EntryRepresentable struct { Term string `json:"term" xml:"term,attr"` Pronunciation string `json:"pronunciation,omitempty" xml:"pronunciation,attr,omitempty"` SeeAlso string `json:"see,omitempty" xml:"see,attr,omitempty"` Etymologies []EtymologyRepresentable `json:"etymologies" xml:"ety"` XMLName xml.Name `json:"-" xml:"entry"` }
func (*EntryRepresentable) AsBuffer ¶
func (entry *EntryRepresentable) AsBuffer(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func (EntryRepresentable) Key ¶
func (entry EntryRepresentable) Key() string
type Etymology ¶
type Etymology struct {
// contains filtered or unexported fields
}
func GetRootAsEtymology ¶
func GetRootAsEtymology(buf []byte, offset flatbuffers.UOffsetT) *Etymology
func GetSizePrefixedRootAsEtymology ¶
func GetSizePrefixedRootAsEtymology(buf []byte, offset flatbuffers.UOffsetT) *Etymology
func (*Etymology) AsRepresentable ¶
func (etymology *Etymology) AsRepresentable() EtymologyRepresentable
func (*Etymology) Description ¶
func (*Etymology) Table ¶
func (rcv *Etymology) Table() flatbuffers.Table
func (*Etymology) UsagesByKey ¶ added in v1.7.0
func (*Etymology) UsagesLength ¶
type EtymologyRepresentable ¶
type EtymologyRepresentable struct { ID string `json:"id,omitempty" xml:"id,attr"` Description string `json:"description,omitempty" xml:"description,attr,omitempty"` Usages KVMap[PartOfSpeech, UsageRepresentable] `json:"usages" xml:"usage"` }
func (*EtymologyRepresentable) AsBuffer ¶
func (ety *EtymologyRepresentable) AsBuffer(builder *flatbuffers.Builder) flatbuffers.UOffsetT
type GROUPS ¶ added in v1.10.0
type GROUPS struct { sq.TableStruct ID sq.NumberField `ddl:"type=BIGINT primarykey auto_increment autoincrement identity"` DESCRIPTION sq.StringField USAGE_ID sq.NumberField `ddl:"type=BIGINT notnull references=usages.id"` }
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func GetRootAsGroup ¶
func GetRootAsGroup(buf []byte, offset flatbuffers.UOffsetT) *Group
func GetSizePrefixedRootAsGroup ¶
func GetSizePrefixedRootAsGroup(buf []byte, offset flatbuffers.UOffsetT) *Group
func (*Group) AsRepresentable ¶
func (group *Group) AsRepresentable() GroupRepresentable
func (*Group) Definitions ¶
func (rcv *Group) Definitions(obj *Definition, j int) bool
func (*Group) DefinitionsLength ¶
func (*Group) Description ¶
func (*Group) Table ¶
func (rcv *Group) Table() flatbuffers.Table
type GroupRepresentable ¶
type GroupRepresentable struct { ID string `json:"id,omitempty" xml:"id,attr"` Description string `json:"description" xml:"description,attr"` Definitions []DefinitionRepresentable `json:"definitions" xml:"definition"` }
func (*GroupRepresentable) AsBuffer ¶
func (group *GroupRepresentable) AsBuffer(builder *flatbuffers.Builder) flatbuffers.UOffsetT
type KVMap ¶
type KVMap[K comparable, V Keyable[K]] map[K]V
func (KVMap[K, V]) MarshalXML ¶
func (*KVMap[K, V]) UnmarshalXML ¶
type Keyable ¶
type Keyable[T comparable] interface { Key() T }
type POS ¶
type POS int8
const ( POSun POS = 0 POSadj POS = 1 POSadv POS = 2 POSart POS = 3 POSconj POS = 4 POSintj POS = 5 POSn POS = 6 POSpart POS = 7 POSpref POS = 8 POSprep POS = 9 POSpostp POS = 10 POSpron POS = 11 POSsuff POS = 12 POSv POS = 13 POSabv POS = 14 POSadf POS = 15 POSaff POS = 16 POSaux_adj POS = 17 POSaux_v POS = 18 POSaux POS = 19 POSchr POS = 20 POSconj_c POS = 21 POSconj_s POS = 22 POScop POS = 23 POScf POS = 24 POSctr POS = 25 POSdet POS = 26 POSexpr POS = 27 POSinf POS = 28 POSintf POS = 29 POSname POS = 30 POSnum POS = 31 POSphr_adv POS = 32 POSphr_adj POS = 33 POSphr_prep POS = 34 POSphr POS = 35 POSpropn POS = 36 POSprov POS = 37 POSpunc POS = 38 POSsym POS = 39 POSvi POS = 40 POSvt POS = 41 POSadj_f POS = 42 POSadj_ix POS = 43 POSadj_kari POS = 44 POSadj_ku POS = 45 POSadj_na POS = 46 POSadj_nari POS = 47 POSadj_no POS = 48 POSadj_pn POS = 49 POSadj_shiku POS = 50 POSadj_t POS = 51 POSadv_to POS = 52 POSn_adv POS = 53 POSn_pref POS = 54 POSn_suf POS = 55 POSn_t POS = 56 POSv_unspec POS = 57 POSv1_s POS = 58 POSv1 POS = 59 POSv2a_s POS = 60 POSv2b_k POS = 61 POSv2b_s POS = 62 POSv2d_k POS = 63 POSv2d_s POS = 64 POSv2g_k POS = 65 POSv2g_s POS = 66 POSv2h_k POS = 67 POSv2h_s POS = 68 POSv2k_k POS = 69 POSv2k_s POS = 70 POSv2m_k POS = 71 POSv2m_s POS = 72 POSv2n_s POS = 73 POSv2r_k POS = 74 POSv2r_s POS = 75 POSv2s_s POS = 76 POSv2t_k POS = 77 POSv2t_s POS = 78 POSv2w_s POS = 79 POSv2y_k POS = 80 POSv2y_s POS = 81 POSv2z_s POS = 82 POSv4b POS = 83 POSv4g POS = 84 POSv4h POS = 85 POSv4k POS = 86 POSv4m POS = 87 POSv4n POS = 88 POSv4r POS = 89 POSv4s POS = 90 POSv4t POS = 91 POSv5aru POS = 92 POSv5b POS = 93 POSv5g POS = 94 POSv5k_s POS = 95 POSv5k POS = 96 POSv5m POS = 97 POSv5n POS = 98 POSv5r_i POS = 99 POSv5r POS = 100 POSv5s POS = 101 POSv5t POS = 102 POSv5u_s POS = 103 POSv5u POS = 104 POSv5uru POS = 105 POSvk POS = 106 POSvn POS = 107 POSvr POS = 108 POSvs_c POS = 109 POSvs_i POS = 110 POSvs_s POS = 111 POSvs POS = 112 POSvz POS = 113 )
type PartOfSpeech ¶
func (PartOfSpeech) MarshalText ¶ added in v1.8.0
func (p PartOfSpeech) MarshalText() ([]byte, error)
func (PartOfSpeech) MarshalXMLAttr ¶ added in v1.8.0
func (*PartOfSpeech) UnmarshalText ¶ added in v1.8.0
func (p *PartOfSpeech) UnmarshalText(text []byte) error
func (*PartOfSpeech) UnmarshalXMLAttr ¶ added in v1.8.0
func (pos *PartOfSpeech) UnmarshalXMLAttr(attr xml.Attr) error
type Representable ¶
type Representable interface {
AsRepresentable() interface{}
}
type Serializable ¶
type Serializable interface {
AsBuffer(builder *flatbuffers.Builder) flatbuffers.UOffsetT
}
type SqlDialect ¶ added in v1.10.0
type SqlDialect = string
const ( Postgres SqlDialect = "postgres" Sqlite SqlDialect = "sqlite" Mysql SqlDialect = "mysql" Sqlserver SqlDialect = "sqlserver" )
type USAGES ¶ added in v1.10.0
type USAGES struct { sq.TableStruct ID sq.NumberField `ddl:"type=BIGINT primarykey auto_increment autoincrement identity"` ETYMOLOGY_ID sq.StringField `ddl:"notnull references=etymologies.id"` }
type Usage ¶
type Usage struct {
// contains filtered or unexported fields
}
func GetRootAsUsage ¶
func GetRootAsUsage(buf []byte, offset flatbuffers.UOffsetT) *Usage
func GetSizePrefixedRootAsUsage ¶
func GetSizePrefixedRootAsUsage(buf []byte, offset flatbuffers.UOffsetT) *Usage
func (*Usage) AsRepresentable ¶
func (usage *Usage) AsRepresentable() UsageRepresentable
func (*Usage) Definitions ¶
func (rcv *Usage) Definitions(obj *Definition, j int) bool
func (*Usage) DefinitionsLength ¶
func (*Usage) GroupsLength ¶
func (*Usage) LookupByKey ¶ added in v1.7.0
func (*Usage) Table ¶
func (rcv *Usage) Table() flatbuffers.Table
type UsageRepresentable ¶
type UsageRepresentable struct { POS PartOfSpeech `json:"-" xml:"pos,attr"` Definitions []DefinitionRepresentable `json:"definitions,omitempty" xml:"definition"` Groups []GroupRepresentable `json:"groups,omitempty" xml:"group"` XMLName xml.Name `json:"-" xml:"usage"` }
func (*UsageRepresentable) AsBuffer ¶
func (usage *UsageRepresentable) AsBuffer(builder *flatbuffers.Builder) flatbuffers.UOffsetT
func (UsageRepresentable) Key ¶
func (usage UsageRepresentable) Key() PartOfSpeech
func (*UsageRepresentable) UnmarshalXML ¶ added in v1.8.3
func (ur *UsageRepresentable) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error