udapi.core.mwt module

MWT class represents a multi-word token.

class udapi.core.mwt.MWT(words=None, form=None, misc=None, root=None)[source]

Bases: object

Class for representing multi-word tokens in UD trees.

address()[source]

Full (document-wide) id of the multi-word token.

form
static is_mwt()[source]

Is this a multi-word token?

Returns always True. False is returned only by instances of the Node class.

property misc

Property for MISC attributes stored as a DualDict object.

See udapi.core.node.Node for details.

property no_space_after

Boolean property as a shortcut for node.misc[“SpaceAfter”] == “No”.

property ord_range

Return a string suitable for the first column of CoNLL-U.

remove()[source]

Delete this multi-word token (but keep its words).

root
words