public static NaryTree readTreeInPtbFormat(Reader reader) throws IOException {
        QFiles.readUntilCharacter(reader, '(');
        NaryTree root = NaryTree.readSubtreeInPtbFormat(reader);
        QFiles.readUntilCharacter(reader, ')');
        if (root == null) {
            return null;
        }
        root.updateStartEnd();
        return root;
    }
public static NaryTree readTreeInPtbFormat ( Reader reader ) throws IOException { QFiles . readUntilCharacter ( reader , '(' ) ; NaryTree root = NaryTree . readSubtreeInPtbFormat ( reader ) ; QFiles . readUntilCharacter ( reader , ')' ) ; if ( root == null ) { return null ; } root . updateStartEnd ( ) ; return root ; }
Reads a full tree in Penn Treebank format. Such a tree should include an
outer set of parentheses. The returned tree will have initialized the
start/end fields.