class

Zh2Vi::Parser

Inherits Reference < Object

Parser converts HanLP MTL output into a Node tree

Instance methods

parse(con : String, cws : Array(String), pos : Array(String), ner : Array(NerSpan) = [] of NerSpan, dep : Array(DepRel) = [] of DepRel) : Node

Parse using bracket string (Backward compatibility)

Source
parse(con : RawCon, cws : Array(String), pos : Array(String), ner : Array(NerSpan) = [] of NerSpan, dep : Array(DepRel) = [] of DepRel) : Node

Parse using RawCon

Source
parse_con(bracket : String) : Node

Parse constituency tree from bracket notation (Legacy) Input: "(IP (NP (PN 我)) (VP (VV 爱) (NP (PN 你))))"

Source
parse_tree(con : RawCon) : Node

Parse constituency tree from RawCon struct

Source