Trees

Helper functions to handle tree-structured data

class dynn.data.trees.Tree(label, children=None)

Bases: object

Tree object for syntax trees

__init__(label, children=None)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

__weakref__

list of weak references to the object (if defined)

static from_string(string, labelled=True)

Reads linearized tree from string

Parameters:string (str) – Linearized tree
Returns:Tree object
Return type:Tree