This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

treetools is a collection of tools for processing constituency treebank trees. It contains algorithms for tree manipulation (such as removal of crossing branches), tree analysis, and grammar extraction.

treetools is being developed and maintained at the Department for Computational Linguistics at the Institute for Language and Information at the University of Düsseldorf, Germany (see The project is sponsored by Deutsche Forschungsgemeinschaft (DFG).

Author: Wolfgang Maier <>.



  • Python 2.7.3+

To install the latest release from the Python package index, type:

pip install treetools --user

To install the latest version clone the git repository and run:

python install --user

within the repository directory.

If you have superuser privileges and want to perform a system-wide installation, omit the –user option, respectively.



To run treetools, type:

treetools [subcommand] [parameters] [options]

Available subcommands are:

  • transform: Process treebank trees. Run transformations and convert between different formats.
  • grammar: Extract grammars for different parsers from treebanks.
  • treeanalysis: Analyze certain properties of treebank trees, such as, e.g., gap degree.

To get see the available parameters for a subcommand, type:

treetools [subcommand] --help

To get verbose help on available transformation algorithms, available options, etc., type:

treetools [subcommand] --usage


To attach the punctuation in TIGER and remove its crossing branches while converting it from TigerXML to a bracket format, type:

treetools transform tiger.xml tiger.preproc.xml --trans root_attach boyd_split negra_mark_heads boyd_split raising --src-format tigerxml --dest-format export

To extract the bare sentences (one per line) from a treebank in bracketed format, such as the Penn Treebank, type:

treetools transform treebank.brackets treebank.terminals --src-format brackets --dest-format terminals

To delete the traces and co-indexation from the Penn Treebank, type:

treetools transform ptb ptb.notrace --transform ptb_transform --src-format brackets --dest-format brackets

To extract an left-to-right binarized LCFRS with v1/h2 markovization in rparse format from an export-format treebank, type:

treetools grammar input_treebank output_grammar leftright --dest-format rcg --markov v:1 h:2


The code is released under the GNU General Public Licence (GPL) 3.0 or higher. The license texts can be found at at

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
treetools-0.1.0.tar.gz (28.2 kB) Copy SHA256 Checksum SHA256 Source Dec 22, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting