treebank

package
v0.0.0-...-491e816 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToDependencyType

func StringToDependencyType(ud string) (lingo.DependencyType, bool)

func StringToLexType

func StringToLexType(tag string) lingo.LexemeType

TODO : CHECK

func StringToPOSTag

func StringToPOSTag(tag string) (lingo.POSTag, bool)

func WrapDeps

func WrapDeps(deps []lingo.DependencyType) []lingo.DependencyType

func WrapHeads

func WrapHeads(heads []int) []int

func WrapLexemeSentence

func WrapLexemeSentence(sentence lingo.LexemeSentence) lingo.LexemeSentence

func WrapTags

func WrapTags(tagList []lingo.POSTag) []lingo.POSTag

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 (SentenceTag) String

func (s SentenceTag) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL