Documentation
¶
Overview ¶
Package textkit provides a tokeniser and morphological analyser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LexicalEntry ¶
type LexicalEntry struct {
// The entry's lemma.
Lemma string
// The morphological tag.
Tag string
}
LexicalEntry is a lexical entry.
type MorphologicalLexicon ¶
type MorphologicalLexicon struct {
// contains filtered or unexported fields
}
MorphologicalLexicon is a morphological lexicon.
func NewMorphologicalLexicon ¶
func NewMorphologicalLexicon(filename string) (*MorphologicalLexicon, error)
NewMorphologicalLexicon returns a new morphological lexicon.
func (*MorphologicalLexicon) AddEntry ¶
func (lex *MorphologicalLexicon) AddEntry(form, lemma, tag string)
AddEntry adds an entry to the lexicon.
func (*MorphologicalLexicon) Analyse ¶
func (lex *MorphologicalLexicon) Analyse(form string) []*LexicalEntry
Analyse analyses a word form. Returns a list of lexical entries.
type Token ¶
type Token struct {
// The token's type.
Type TokenType
// The form of the token as a slice of runes.
Form []rune
// The location where the token is located.
Loc Location
// An associated tag.
Tag string
}
Token is a text token.
Click to show internal directories.
Click to hide internal directories.