Documentation ¶
Index ¶
- Constants
- Variables
- func Lattice2Sentence(lattice Lattice, ...) nlp.LatticeSentence
- func Lattice2SentenceCorpus(corpus Lattices, ...) []interface{}
- func ParseInt(value string) (int, error)
- func ParseString(value string) string
- func UDWrite(writer io.Writer, lattices []Lattice) error
- func UDWriteJSON(writer io.Writer, lattices []Lattice) error
- func Write(writer io.Writer, lattices []Lattice) error
- func WriteFile(filename string, sents []Lattice) error
- func WriteUDFile(filename string, sents []Lattice) error
- func WriteUDJSONFile(filename string, sents []Lattice) error
- type Edge
- type EdgeSlice
- type Features
- type JSONEdge
- type JSONLattice
- type Lattice
- func Read(r io.Reader, limit int) ([]Lattice, error)
- func ReadFile(filename string, limit int) ([]Lattice, error)
- func ReadUDFile(filename string, limit int) ([]Lattice, error)
- func Sentence2Lattice(lattice nlp.LatticeSentence, xliter8or xliter8.Interface) Lattice
- func Sentence2LatticeCorpus(corpus []nlp.LatticeSentence, xliter8or xliter8.Interface) []Lattice
- func UDRead(r io.Reader, limit int) ([]Lattice, error)
- type Lattices
Constants ¶
View Source
const ( FIELD_SEPARATOR = '\t' NUM_FIELDS = 8 FEATURES_SEPARATOR = "|" FEATURE_SEPARATOR = "=" FEATURE_CONCAT_DELIM = "," )
View Source
const (
PRONOMINAL_CLITIC_POS = "S_PRN"
)
Variables ¶
Functions ¶
func Lattice2Sentence ¶
func Lattice2Sentence(lattice Lattice, eWord, ePOS, eWPOS, eMorphFeat, eMHost, eMSuffix *util.EnumSet) nlp.LatticeSentence
func Lattice2SentenceCorpus ¶
func ParseString ¶
func WriteUDFile ¶ added in v1.2.0
func WriteUDJSONFile ¶ added in v1.2.0
Types ¶
type Edge ¶
type Edge struct { Start int // can be negative, if so skip over End int Word string Lemma string CPosTag string PosTag string Feats Features FeatStr string Token int Id int TokenStr string }
func ParseUDEdge ¶ added in v1.2.0
type JSONEdge ¶ added in v1.2.0
type JSONEdge struct { Next string `json:"next"` Form string `json:"form"` Lemma string `json:"lemma,omitempty"` UPOSTag string `json:"upostag"` XPOSTag string `json:"xpostag,omitempty"` Feats string `json:"feats,omitempty"` Misc string `json:"misc,omitempty"` TokenID int `json:"tokenid,omitempty"` }
type JSONLattice ¶ added in v1.2.0
type Lattice ¶
func Sentence2Lattice ¶
func Sentence2Lattice(lattice nlp.LatticeSentence, xliter8or xliter8.Interface) Lattice
func Sentence2LatticeCorpus ¶
func Sentence2LatticeCorpus(corpus []nlp.LatticeSentence, xliter8or xliter8.Interface) []Lattice
Click to show internal directories.
Click to hide internal directories.