Enum ptb_reader::PTBTree [] [src]

pub enum PTBTree {
    InnerNode {
        label: String,
        children: Vec<PTBTree>,
    },
    TerminalNode {
        label: String,
    },
}

Arbitrarily wide recursive trees of String.

Variants

Fields of InnerNode

Fields of TerminalNode

Trait Implementations

impl Debug for PTBTree
[src]

Formats the value using the given formatter.

impl Clone for PTBTree
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for PTBTree
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for PTBTree
[src]

impl Display for PTBTree
[src]

Return bracketed (and outside-bracketed!) PTB notation:

use ptb_reader::PTBTree;
let tree = PTBTree::InnerNode{ label: "NT".to_string(), children: vec![PTBTree::TerminalNode{ label: "t".to_string() }] };
assert_eq!(format!("{}", tree), "((NT t))")