treetools


Nametreetools JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryTools for processing treebank trees
upload_time2025-08-10 15:25:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords treebanks trees grammar
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/treetools.svg)](https://badge.fury.io/py/treetools)
[![Github All Releases](https://img.shields.io/github/downloads/kotlin-graphics/kotlin-unsigned/total.svg)]()

# treetools - tree processing

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

treetools has been developed at the Department for Computational Linguistics at the Institute for Language and Information at the University of Düsseldorf, Germany (see <http://phil.hhu.de/beyond-cfg>). The project is sponsored by Deutsche Forschungsgemeinschaft (DFG). It is maintained by Wolfgang Maier.

Author: Wolfgang Maier <mailto:maierw@hhu.de>.
Contributions: Kilian Gebhardt 

## Installation

Requirements:

-  Python 3.11+

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

    pip install treetools

## Running

### Syntax

To run treetools, type::

    treetools-cli [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.
-  ``transitions``: Extract transition sequences as used by transition-based parsers.

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

    treetools-cli [subcommand] --help

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

    treetools-cli [subcommand] --usage

### Examples

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

    treetools-cli transform tiger.xml tiger.continuous.export --trans root_attach 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-cli transform treebank.brackets treebank.terminals --src-format brackets --dest-format terminals

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

    treetools-cli 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-cli grammar input_treebank output_grammar leftright --dest-format rcg --markov v:1 h:2

### License

The code is released under the GNU General Public Licence (GPL) 3.0 or higher. The license texts can be found at at
<http://www.gnu.org/licenses/gpl-3.0>. 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "treetools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "treebanks, trees, grammar",
    "author": null,
    "author_email": "Wolfgang Maier <maierw@hhu.de>",
    "download_url": "https://files.pythonhosted.org/packages/68/d2/345fabf905ac57609cba9b4125cbabff7fbefbdb12303a5807bf7e238b22/treetools-1.0.0.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/treetools.svg)](https://badge.fury.io/py/treetools)\n[![Github All Releases](https://img.shields.io/github/downloads/kotlin-graphics/kotlin-unsigned/total.svg)]()\n\n# treetools - tree processing\n\ntreetools is a collection of tools for processing treebank trees. It contains algorithms for tree manipulation (such as removal of  crossing branches), tree analysis, and grammar extraction.\n\ntreetools has been developed at the Department for Computational Linguistics at the Institute for Language and Information at the University of D\u00fcsseldorf, Germany (see <http://phil.hhu.de/beyond-cfg>). The project is sponsored by Deutsche Forschungsgemeinschaft (DFG). It is maintained by Wolfgang Maier.\n\nAuthor: Wolfgang Maier <mailto:maierw@hhu.de>.\nContributions: Kilian Gebhardt \n\n## Installation\n\nRequirements:\n\n-  Python 3.11+\n\nTo install the latest release from the Python package index, type::\n\n    pip install treetools\n\n## Running\n\n### Syntax\n\nTo run treetools, type::\n\n    treetools-cli [subcommand] [parameters] [options]\n\nAvailable subcommands are:\n\n-  ``transform``: Process treebank trees. Run transformations and convert between different formats.\n-  ``grammar``: Extract grammars for different parsers from treebanks.\n-  ``treeanalysis``: Analyze certain properties of treebank trees, such as, e.g., gap degree.\n-  ``transitions``: Extract transition sequences as used by transition-based parsers.\n\nTo get see the available parameters for a subcommand, type::\n\n    treetools-cli [subcommand] --help\n\nTo get verbose help on available transformation algorithms, available options, etc., type::\n\n    treetools-cli [subcommand] --usage\n\n### Examples\n\nTo attach the punctuation in TIGER and remove its crossing branches while converting it from TigerXML to the export format, type::\n\n    treetools-cli transform tiger.xml tiger.continuous.export --trans root_attach negra_mark_heads boyd_split raising --src-format tigerxml --dest-format export\n\nTo extract the bare sentences (one per line) from a treebank in bracketed format, such as the Penn Treebank, type::\n\n    treetools-cli transform treebank.brackets treebank.terminals --src-format brackets --dest-format terminals\n\nTo delete the traces and co-indexation from the Penn Treebank, type::\n\n    treetools-cli transform ptb ptb.notrace --transform ptb_transform --src-format brackets --dest-format brackets\n\nTo extract an left-to-right binarized LCFRS with v1/h2 markovization in rparse format from an export-format treebank, type::\n\n    treetools-cli grammar input_treebank output_grammar leftright --dest-format rcg --markov v:1 h:2\n\n### License\n\nThe code is released under the GNU General Public Licence (GPL) 3.0 or higher. The license texts can be found at at\n<http://www.gnu.org/licenses/gpl-3.0>. \n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Tools for processing treebank trees",
    "version": "1.0.0",
    "project_urls": {
        "Changelog": "https://github.com/wmaier/treetools/releases",
        "Download": "https://github.com/wmaier/treetools/archive/v1.0.0.tar.gz",
        "Homepage": "https://github.com/wmaier/treetools",
        "Issues": "https://github.com/wmaier/treetools/issues",
        "Repository": "https://github.com/wmaier/treetools"
    },
    "split_keywords": [
        "treebanks",
        " trees",
        " grammar"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "126f5331c2cc2383948536eb6def4e09d882a102d3a3a6cc653905db9e90a393",
                "md5": "7591f96acf473edc6a8ed052491141cb",
                "sha256": "a8b1b80f7ca5c8abf6872eac7520a82b5550fc8e7daa4c8020d9a7ce8bb2f96b"
            },
            "downloads": -1,
            "filename": "treetools-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7591f96acf473edc6a8ed052491141cb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 56464,
            "upload_time": "2025-08-10T15:25:10",
            "upload_time_iso_8601": "2025-08-10T15:25:10.959560Z",
            "url": "https://files.pythonhosted.org/packages/12/6f/5331c2cc2383948536eb6def4e09d882a102d3a3a6cc653905db9e90a393/treetools-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "68d2345fabf905ac57609cba9b4125cbabff7fbefbdb12303a5807bf7e238b22",
                "md5": "6e8002fb1449624da2a8a220322fc458",
                "sha256": "c02df97fab79fdd04ec513e29acd89ed1e24b4aacd959628bde466e68d5ba23f"
            },
            "downloads": -1,
            "filename": "treetools-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6e8002fb1449624da2a8a220322fc458",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 59403,
            "upload_time": "2025-08-10T15:25:12",
            "upload_time_iso_8601": "2025-08-10T15:25:12.321459Z",
            "url": "https://files.pythonhosted.org/packages/68/d2/345fabf905ac57609cba9b4125cbabff7fbefbdb12303a5807bf7e238b22/treetools-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-10 15:25:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wmaier",
    "github_project": "treetools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "treetools"
}
        
Elapsed time: 1.00346s