A string containing the word values of the terminal nodes donminated by this constituent. For example, calling text on a node created from the Penn text given in the description of the new function returns the string "this is lisa .".

Detaches self from parent. self will become an independent root. If the parent has no other children, will recursively call parent-wither>, making a possibly zero-length list of degenerate roots above it until an ancestor has a different child than the one in this line of descent.

This is the method called by default when the object handle is used in a string (see perldoc overload).

Depending on the value of $Lingua::Treebank::Const::STRINGIFY (see below), the string representation of the object varies. The default behavior is as_penn_text, above.

Note that like any object-ref, copying its stringification does NOT work to retain all its behaviors. Nor does an identical string representation necessarily mean the two objects are the same object; merely, that they have the same structure. (see equiv_to).

This is the mthod called by default when the object handle is used in a numeric context (usually == or !=).

Returns an integer representing the unique object. Identity on this method does indicate identity of the objects.

Rarely used in client code. The numeric inequality operators are unlikely to have any useful meaning on these objects, though they should behave consistently (you should get consistent answers given any two objects, regardless of methods called on those objects).

An instance method. &action argument is required, others are optional.

Calls &action (a subroutine ref) as a method on node and its children, recursively, passing the node under consideration and the $state value (if provided).

If &stop_crit is defined, calls it on each node; when &stop_crit returns true, children of that node are not pursued.

For both action and stop_crit commands, if a string is passed, it will be called if a method by that name can be found in the object.

$state is passed into each of the child method calls. This is convenient for things like pushing interesting elements onto a list, or updating a counter. It must be a scalar, but can be a reference.

Passing a true value as $bf_traversal tells walk() to explore the tree breadth-first rather than depth-first. passing a false (but defined) value forces depth-first. Undefined values default to the value of $Lingua::Treebank::Const::BF_TRAVERSAL, which is undef (false) -- and thus depth-first by default.