Documentation
¶
Index ¶
- func ExportOPF(dict KindleDict) error
- func ImportCollocations(db *sql.DB, tableName string) error
- func ImportThesaurus(db *sql.DB, tableName string) error
- func LoadCollocationsChan() <-chan CollocationEntryWithErr
- func LoadFrequencyChan() <-chan WordFrequencyOrError
- func SlolexLoaderChan() <-chan SlolexLexicalEntryWithError
- type CandidateXML
- type CollocationEntryWithErr
- type CollocationXML
- type CollocationXMLEntry
- type CollocationsXML
- type GroupXML
- type KindleDict
- type KindleDictEntry
- type KindleDictSynonym
- type SlolexFeat
- type SlolexFormRepresentation
- type SlolexLemma
- type SlolexLexicalEntry
- type SlolexLexicalEntryWithError
- type SlolexWordForm
- type ThesaurusEntry
- type ThesaurusXML
- type Word
- type WordFrequency
- type WordFrequencyOrError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportOPF ¶
func ExportOPF(dict KindleDict) error
func LoadCollocationsChan ¶
func LoadCollocationsChan() <-chan CollocationEntryWithErr
func LoadFrequencyChan ¶
func LoadFrequencyChan() <-chan WordFrequencyOrError
func SlolexLoaderChan ¶
func SlolexLoaderChan() <-chan SlolexLexicalEntryWithError
Types ¶
type CandidateXML ¶
type CollocationEntryWithErr ¶
type CollocationEntryWithErr struct { Entry CollocationXMLEntry Err error }
type CollocationXML ¶
type CollocationXML struct { Text string `xml:",chardata"` Form string `xml:"form,attr"` Cluster string `xml:"cluster,attr"` Frequency float64 `xml:"frequency,attr"` LogDice string `xml:"logDice,attr"` Comp []struct { Text string `xml:",chardata"` Position string `xml:"position,attr"` Type string `xml:"type,attr"` Sloleks string `xml:"sloleks,attr"` } `xml:"comp"` }
type CollocationXMLEntry ¶
type CollocationXMLEntry struct { XMLName xml.Name `xml:"entry"` Text string `xml:",chardata"` Header struct { Text string `xml:",chardata"` LexicalUnit struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` } `xml:"lexical_unit"` Category string `xml:"category"` Measure struct { Text string `xml:",chardata"` Type string `xml:"type,attr"` Source string `xml:"source,attr"` } `xml:"measure"` } `xml:"header"` Body struct { Text string `xml:",chardata"` Sense struct { Text string `xml:",chardata"` Gramrels struct { Text string `xml:",chardata"` Gramrel []struct { Text string `xml:",chardata"` Name string `xml:"name,attr"` Collocations struct { Text string `xml:",chardata"` Collocation CollocationsXML `xml:"collocation"` } `xml:"collocations"` } `xml:"gramrel"` } `xml:"gramrels"` } `xml:"sense"` } `xml:"body"` }
func LoadCollocations ¶
func LoadCollocations() ([]CollocationXMLEntry, error)
func (CollocationXMLEntry) GetFrequentCollocations ¶
func (ce CollocationXMLEntry) GetFrequentCollocations() [][]string
func (CollocationXMLEntry) Word ¶
func (ce CollocationXMLEntry) Word() string
type CollocationsXML ¶
type CollocationsXML []CollocationXML
func (CollocationsXML) Len ¶
func (c CollocationsXML) Len() int
func (CollocationsXML) Less ¶
func (c CollocationsXML) Less(i, j int) bool
func (CollocationsXML) Swap ¶
func (c CollocationsXML) Swap(i, j int)
type GroupXML ¶
type GroupXML struct { Text string `xml:",chardata"` Candidate []CandidateXML `xml:"candidate"` }
type KindleDict ¶
type KindleDict struct {
Entries []KindleDictEntry `json:"entries"`
}
type KindleDictEntry ¶
type KindleDictSynonym ¶
func (KindleDictSynonym) FormatScore ¶
func (kds KindleDictSynonym) FormatScore() string
func (KindleDictSynonym) ScoreNormalized ¶
func (kds KindleDictSynonym) ScoreNormalized() float64
type SlolexFeat ¶
type SlolexFormRepresentation ¶
type SlolexFormRepresentation struct {
Feats []SlolexFeat `xml:"feat"`
}
func (SlolexFormRepresentation) FindRepresentation ¶
func (srf SlolexFormRepresentation) FindRepresentation() string
type SlolexLemma ¶
type SlolexLemma struct { // <Lemma> // <feat att="zapis_oblike" val="Pierre"/> // <feat att="naglašena_beseda_1" val="Pierrè"/> // </Lemma> Feats []SlolexFeat `xml:"feat"` }
func (SlolexLemma) FindLema ¶
func (sl SlolexLemma) FindLema() string
type SlolexLexicalEntry ¶
type SlolexLexicalEntry struct { Feats []SlolexFeat `xml:"feat"` Lema SlolexLemma `xml:"Lemma"` Forms []SlolexWordForm `xml:"WordForm"` }
func SlolexLoader ¶
func SlolexLoader() ([]SlolexLexicalEntry, error)
func (SlolexLexicalEntry) FindFormRepresentations ¶
func (sle SlolexLexicalEntry) FindFormRepresentations() [][]string
type SlolexLexicalEntryWithError ¶
type SlolexLexicalEntryWithError struct { Entry SlolexLexicalEntry Err error }
type SlolexWordForm ¶
type SlolexWordForm struct { Feats []SlolexFeat `xml:"feat"` Representations []SlolexFormRepresentation `xml:"FormRepresentation"` }
func (SlolexWordForm) FindFormRepresentations ¶
func (swf SlolexWordForm) FindFormRepresentations() []string
type ThesaurusEntry ¶
type ThesaurusEntry struct { Text string `xml:",chardata"` Headword struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` } `xml:"headword"` GroupsCore struct { Text string `xml:",chardata"` Group []GroupXML `xml:"group"` } `xml:"groups_core"` GroupsNear struct { Text string `xml:",chardata"` Group []GroupXML `xml:"group"` } `xml:"groups_near"` }
func LoadThesaurus ¶
func LoadThesaurus() ([]ThesaurusEntry, error)
type ThesaurusXML ¶
type WordFrequency ¶
type WordFrequencyOrError ¶
type WordFrequencyOrError struct { Entry WordFrequency Err error }
Click to show internal directories.
Click to hide internal directories.