nltk/nltk — pull request #794 by heatherleaf (2014-11-12 08:23:02+00:00)
Title: ASCII visualization of trees

ASCII visualization of trees, modified from the disco-dop project by Andreas van Cranenburgh, https://github.com/andreasvc/disco-dop

```
>>> tree = nltk.Tree.fromstring('(S (NP Mary) (VP walks))')
>>> tree.visualize()
S
____|____
NP VP
| |
Mary walks
```

The module `treevisualize` contains one class `TreeVisualizer` with two methods `text()` and `svg()`. I also added a convenience method `visualize()` to the standard `Tree` class.

Some questions before merging this pull request:
- Is the module name `treevisualize` fine? And the class name `TreeVisualizer`?
- van Cranenburgh's original module name is `treedraw` and class `DrawTree`, but I thought they interfered too much with the module `nltk.draw.tree`
- I added a the method `visualize()` to `Tree`, is that a good name?
- the method prints the tree on stdout, should it return a string instead?