nltk.tree.probabilistic module

class nltk.tree.probabilistic.ProbabilisticTree[source]

Bases: Tree, ProbabilisticMixIn

__init__(node, children=None, **prob_kwargs)[source]
classmethod convert(val)[source]

Convert a tree between different subtypes of Tree. cls determines which class will be used to encode the new tree.

Parameters

tree (Tree) – The tree that should be converted.

Returns

The new Tree.

copy(deep=False)[source]

Return a shallow copy of the list.