Documentation ¶
Index ¶
- Constants
- Variables
- func ConllU2Graph(sent *Sentence, eWord, ePOS, eWPOS, eRel, eMHost, eMSuffix *util.EnumSet) nlp.LabeledDependencyGraph
- func ConllU2GraphCorpus(corpus []*Sentence, eWord, ePOS, eWPOS, eRel, eMHost, eMSuffix *util.EnumSet) []interface{}
- func ConllU2MorphGraph(sent *Sentence, ...) nlp.MorphDependencyGraph
- func ConllU2MorphGraphCorpus(corpus []*Sentence, ...) []interface{}
- func FormatFeatures(feat map[string]string) string
- func GetMorphProperties(node *transition.TaggedDepNode, eMHost, eMSuffix *util.EnumSet) string
- func Graph2ConllUCorpus(corpus []interface{}, eMHost, eMSuffix *util.EnumSet) []interface{}
- func MorphGraph2ConllCorpus(corpus []interface{}) []interface{}
- func ParseInt(value string) (int, error)
- func ParseString(value string) string
- func ParseTokenRow(record []string) (string, int, error)
- func Write(writer io.Writer, sents []interface{})
- func WriteFile(filename string, sents []interface{}) error
- type Features
- type Row
- type Sentence
- type Sentences
Constants ¶
View Source
const ( FIELD_SEPARATOR = '\t' NUM_FIELDS = 10 FEATURES_SEPARATOR = "|" FEATURE_SEPARATOR = "=" FEATURE_CONCAT_DELIM = "," )
Variables ¶
View Source
var ( WORD_TYPE = "form" IGNORE_LEMMA bool )
Functions ¶
func ConllU2Graph ¶
func ConllU2Graph(sent *Sentence, eWord, ePOS, eWPOS, eRel, eMHost, eMSuffix *util.EnumSet) nlp.LabeledDependencyGraph
func ConllU2GraphCorpus ¶
func ConllU2MorphGraph ¶
func ConllU2MorphGraph(sent *Sentence, eWord, ePOS, eWPOS, eRel, eMFeat, eMHost, eMSuffix *util.EnumSet) nlp.MorphDependencyGraph
func ConllU2MorphGraphCorpus ¶
func FormatFeatures ¶
func GetMorphProperties ¶
func GetMorphProperties(node *transition.TaggedDepNode, eMHost, eMSuffix *util.EnumSet) string
func Graph2ConllUCorpus ¶
func MorphGraph2ConllCorpus ¶
func MorphGraph2ConllCorpus(corpus []interface{}) []interface{}
func ParseString ¶
Types ¶
type Row ¶
type Row struct { ID int Form string Lemma string UPosTag string XPosTag string Feats Features FeatStr string Head int DepRel string Deps []string Misc string TokenID int }
A Row is a single parsed row of a conll data set
type Sentence ¶
A Sentence is a map of Rows using their ids and a set of tokens
func Graph2ConllU ¶
func Graph2ConllU(graph nlp.LabeledDependencyGraph, eMHost, eMSuffix *util.EnumSet) *Sentence
func MorphGraph2ConllU ¶
func MorphGraph2ConllU(graph nlp.MorphDependencyGraph) *Sentence
func NewSentence ¶
func NewSentence() *Sentence
Click to show internal directories.
Click to hide internal directories.