Layer1¶
-
class
ucca.layer1.Layer1(root, attrib=None, *, orderkey=<function id_orderkey>)[source]¶ Bases:
ucca.core.LayerAttributes Summary
top_linkagestop_scenesMethods Summary
add_fnode(parent, tag, *[, implicit])add_fnode_multiple(parent, edge_categories, *)Adds a new FNodewhose parent and Edge tag are given.add_linkage(relation, *args)Adds a Linkage between the link relation and the linked arguments. add_punct(parent, terminal[, layer, slot, …])Adds a PunctNode as the child of parent and the Terminal under it. add_remote(parent, tag, child)add_remote_multiple(parent, edge_categories, …)Adds a new core.Edge with remote attribute between the nodes.next_id()Returns the next available ID string for this layer. Attributes Documentation
-
top_linkages¶
-
top_scenes¶
Methods Documentation
-
add_fnode_multiple(parent, edge_categories, *, implicit=False, edge_attrib=None)[source]¶ Adds a new
FNodewhose parent and Edge tag are given.Parameters: - parent – the FNode which will be the parent of the new FNode. If the parent is None, adds under the layer head FNode.
- edge_categories – list of categories on the Edge between the parent and the new FNode.
- implicit – whether to set the new FNode as implicit (default False)
- edge_attrib – Keyword only, dictionary of attributes to be passed to the Edge initializer.
Returns: the newly created FNode
:raise core.FrozenPassageError if the Passage is frozen
-
add_linkage(relation, *args)[source]¶ Adds a Linkage between the link relation and the linked arguments.
Linkage objects are all heads and have no parents.
Parameters: - relation – the link relation FNode.
- args – any number (at least 1) of linkage arguments FNodes.
Returns: the newly created Linkage
:raise core.FrozenPassageError if the Passage is frozen.
-
add_punct(parent, terminal, layer=None, slot=None, edge_attrib=None)[source]¶ Adds a PunctNode as the child of parent and the Terminal under it.
Parameters: - parent – the parent of the newly created PunctNode. If None, adds under rhe layer head FNode.
- terminal – the punctuation Terminal we want to put under parent.
- edge_attrib – Keyword only, dictionary of attributes to be passed to the Edge initializer.
Returns: the newly create PunctNode.
:raise core.FrozenPassageError if the Passage is frozen.
-
add_remote_multiple(parent, edge_categories, child, edge_attrib=None)[source]¶ Adds a new
core.Edge with remote attribute between the nodes.Parameters: - parent – the parent of the remote Edge
- edge_categories – list of categories of the Edge
- child – the child of the remote Edge
- edge_attrib – Keyword only, dictionary of attributes to be passed to the Edge initializer.
:raise core.FrozenPassageError if the Passage is frozen
-