Documentation ¶
Index ¶
- func StringToDependencyType(ud string) (lingo.DependencyType, bool)
- func StringToLexType(tag string) lingo.LexemeType
- func StringToPOSTag(tag string) (lingo.POSTag, bool)
- func WrapDeps(deps []lingo.DependencyType) []lingo.DependencyType
- func WrapHeads(heads []int) []int
- func WrapLexemeSentence(sentence lingo.LexemeSentence) lingo.LexemeSentence
- func WrapTags(tagList []lingo.POSTag) []lingo.POSTag
- type Loader
- type SentenceTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToDependencyType ¶
func StringToDependencyType(ud string) (lingo.DependencyType, bool)
func WrapDeps ¶
func WrapDeps(deps []lingo.DependencyType) []lingo.DependencyType
func WrapLexemeSentence ¶
func WrapLexemeSentence(sentence lingo.LexemeSentence) lingo.LexemeSentence
Types ¶
type Loader ¶
type Loader func(string) []SentenceTag
Loader is anything that loads into a slice of SentenceTags. For future uses, to load tree banks
type SentenceTag ¶
type SentenceTag struct { Sentence lingo.LexemeSentence Tags []lingo.POSTag Heads []int Labels []lingo.DependencyType }
SentenceTag is a struc that holds a sentence, tags, heads and labels
func LoadEWT ¶
func LoadEWT(filename string) []SentenceTag
LoadEWT loads a zipped English Web Treebank (as donated by Google)
func LoadUniversal ¶
func LoadUniversal(fileName string) []SentenceTag
LoadUniversal loads a treebank file formatted in a CONLLU format
func ReadConllu ¶
func ReadConllu(reader io.Reader) []SentenceTag
ReadConllu reads a file formatted in a CONLLU format
func ShuffleSentenceTag ¶
func ShuffleSentenceTag(s []SentenceTag) []SentenceTag
func (SentenceTag) AnnotatedSentence ¶
func (s SentenceTag) AnnotatedSentence(f lingo.AnnotationFixer) lingo.AnnotatedSentence
func (SentenceTag) Dependency ¶
func (s SentenceTag) Dependency(f lingo.AnnotationFixer) *lingo.Dependency
func (SentenceTag) String ¶
func (s SentenceTag) String() string
Click to show internal directories.
Click to hide internal directories.