udapi.tool.udpipe module

Wrapper for UDPipe (more pythonic than ufal.udpipe).

class udapi.tool.udpipe.UDPipe(model)[source]

Bases: object

Wrapper for UDPipe (more pythonic than ufal.udpipe).

segment_text(text)[source]

Segment the provided text into sentences.

tag_parse_tree(root)[source]

Tag (+lemmatize, fill FEATS) and parse a tree (already tokenized).

tokenize_tag_parse_tree(root, resegment=False, tag=True, parse=True)[source]

Tokenize, tag (+lemmatize, fill FEATS) and parse the text stored in root.text.

If resegment=True, the returned list of Udapi trees may contain multiple trees.