{ "info": { "author": "Lo\u00efc Grobol", "author_email": "loic.grobol@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6" ], "description": "Ginger\n======\n\nFormat conversion and graphical representation of [Universal Dependencies](http://universaldependencies.org) trees.\n\n![2d graphical representation](doc/tree.png)\n\n```\n\u2502\n\u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u2502 \u2502\n\u2502\u2502 \u2502\u2502 \u2502\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2510\n\u2502\u2502 \u250c\u2500\u2500\u2500\u2502\u2524 \u250c\u2500\u2500\u2500\u2502\u2524 \u2502\u250c\u2500\u2500\u2510\u2502 \u2502\n\u2193\u2502 \u2193 \u2193\u2502 \u2193 \u2193\u2502 \u2193\u2502 \u2193\u2502 \u2193\nROOT Je reconnais l' existence du kiwi .\n```\n\n## Installation\n### Dependencies\nGinger depends on\n\n - [Python](https://www.python.org/): ^3.6\n - [docopt](http://docopt.org/): ^0.6\n - [pycairo](https://github.com/pygobject/pycairo): ^1.16\n - [cairo](https://www.cairographics.org/): >= 1.15.10\n\nIf Python 3 is installed, installing ginger through pip (see below) should take care of most dependencies, except for cairo.\nAdditionally, libginger and libtreebank have no dependencies beyond Python's standard library and can be used independently.\n\n### Installing ginger\nYou don't actually need to install anything if you satisfy the dependencies above, running `python3 ginger.py` should just work.\n\nHowever, if you want to have it installed at global level to get the `ginger` command in your path\n\n 1. Grab the latest release from [Github](https://github.com/LoicGrobol/ginger/releases/latest)\n 2. Unpack it and open a terminal inside the resulting folder\n 3. Run `python3 -m pip install .`\n\nYou can also install it directly from the tip (unstable but usually safe) of the master branch whith\n```bash\npython3 -m pip install git+https://github.com/LoicGrobol/ginger/\n```\n\nTest if everything works by running `ginger examples/test.conll`.\nThe output should be the same as the ASCII-art tree above.\n\n\n## Usage\n```bash\nginger [--from ] [--to] []\n```\n\n### Arguments\n - `` input file (in CoNLL-U format), `-` for standard input\n - `` output file, `-` for standard input (default: `-`)\n\n### Options\n - `-f`, `--from ` input file format, see below (default: `guess`)\n - `-t`, `--to ` output file format, see below (default: `ascii`)\n - `-h`, `--help` Get some help\n\n### Examples\n - Print to stdout\n ```\n ginger examples/test.conll\n ```\n - Assume CoNLL-X for input format\n ```\n ginger -f conllx spam.conllx\n ```\n - Output TikZ code\n ```\n ginger examples/test.conll -t tikz\n ```\n - Print to a file\n ```\n ginger examples/test.conll examples/output.asciiart\n ```\n - Pipe in and out\n ```\n cat examples/test.conll | ginger - | less\n ```\n - Get help\n ```\n ginger --help\n ```\n\n### Input formats\n - `guess` Try to guess the file format, defaults to CoNLL-U\n\n#### CoNLL\n - `conllu` [CoNLL-U v2 format](http://universaldependencies.org/format.html)\n - `conllx` [CoNLL-X format](https://web.archive.org/web/20160814191537/http://ilk.uvt.nl:80/conll/)\n - `conll2009_gold` [CoNLL-2009 format](http://ufal.mff.cuni.cz/conll2009-st/task-description.html)\n - Takes only the gold columns into account.\n - The P- and -PRED attributes are preserved in the `misc` attribute of the\n intermediate CoNLL-U tree.\n - `conll2009_sys` [CoNLL-2009 format](http://ufal.mff.cuni.cz/conll2009-st/task-description.html)\n - Takes only the predicted columns into account.\n - The gold columns and the -PRED attributes are preserved in the `misc` attribute of the\n intermediate CoNLL-U tree.\n\n#### Software\nFormats used by mainstream NLP tools\n\n - `talismane` Outputs of [Talismane](http://redac.univ-tlse2.fr/applications/talismane/talismane_en.html)\n - `mate_gold` Input/Output of [mate-tools](http://www.ims.uni-stuttgart.de/forschung/ressourcen/werkzeuge/matetools.en.html) (actually an alias for `conll2009_gold`)\n - `mate_sys` Input/Output of [mate-tools](http://www.ims.uni-stuttgart.de/forschung/ressourcen/werkzeuge/matetools.en.html) (actually an alias for `conll2009_sys`)\n\n### Output formats\n#### Treebanks\nThe input must be either the path to an existing file or `-` for standard input. The data that\nit contains must be in one of the following formats:\n\n - `guess` Try to guess the file format, defaults to CoNLL-U\n - `conllx` [CoNLL-X format][2]\n - `conllu` [CoNLL-U format][3]\n - `conll2009_gold` [CoNLL-2009 format][4] (Gold columns only)\n - `conll2009_sys` [CoNLL-2009 format][4] (Predicted columns only)\n - `talismane` Outputs of [Talismane][5]\n - `mate_gold` Alias for `conll2009_gold`, used by [mate-tools][1]\n - `mate_sys` Alias for `conll2009_sys`, used by [mate-tools][1]\n\n\nNote\u202f: no real effort is made to preserve informations that are not relevant to Universal\nDependencies, so this might be information-destructive, e.g. if converting from CoNLL-2009 to\nitself, the P- attributes will be dropped.\n\n#### Text formats\nTo use these formats, the output destination must be either a file and thus must not be the path to\nan existing directory, or `-` for the standard output.\n\n - `ascii` ASCII-art (using unicode characters, because, yes, we are subversive)\n - `tikz` TikZ code. Use the `positioning`, `calc` and `shapes.multipart` tikz libraries\n - The output is only the `\\tikzpicture` part, not a whole compilable document, there is\n [an example](examples/tree.tex) of such a document in `example`.\n - The code is quite verbose since we chose to rely on TikZ' own arithmetic capabilities in\n order to allow easier edition and reuse of the generated code.\n\n### Image formats\nTo use these formats, the output destination must be either a directory and thus must not be the\npath of an existing file, or `-` for the standard output, in which case the byte streams\ncorresponding to different trees will be separated by NULL bytes.\n\n - `png`\n - `svg`\n - `pdf`\n\n\n[1]: http://www.ims.uni-stuttgart.de/forschung/ressourcen/werkzeuge/matetools.en.html\n[2]: https://web.archive.org/web/20160814191537/http://ilk.uvt.nl:80/conll/\n[3]: http://universaldependencies.org/format.html\n[4]: http://ufal.mff.cuni.cz/conll2009-st/task-description.html\n[5]: http://redac.univ-tlse2.fr/applications/talismane/talismane_en.html\n[6]: http://universaldependencies.org\n\n## Development\nDevelopment and releases on [Github](https://github.com/loic-grobol/ginger).\n\n## Further notes\n - When importing non-CoNLL-U treebanks, node forms with spaces are considered to be fixed expressions, and are treated according to [UD guidelines](http://universaldependencies.org/u/dep/fixed.html) by splitting them in single-token nodes linked by `fixed` dependencies\n This mean that the exceptions mentioned in [the UDv2 guidelines](http://universaldependencies.org/v2/segmentation.html) are not supported for those imports.\n They are supported when importing from CoNLL-U, though.\n\n\n## License\nThis licence (the so-called \u201cMIT License\u201d) applies to all the files in this repository.\nSee also [LICENSE.md](LICENSE.md).\n\n```\nCopyright 2018 Lo\u00efc Grobol \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge, publish, distribute,\nsublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or\nsubstantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\nNOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT\nOF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/LoicGrobol/ginger", "keywords": "nlp,syntax,universal dependencies", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gingertree", "package_url": "https://pypi.org/project/gingertree/", "platform": "", "project_url": "https://pypi.org/project/gingertree/", "project_urls": { "Homepage": "https://github.com/LoicGrobol/ginger" }, "release_url": "https://pypi.org/project/gingertree/0.13.4.dev20190903/", "requires_dist": [ "docopt (>=0.6)", "pycairo (>=1.15.10) ; extra == 'images'" ], "requires_python": ">= 3.6", "summary": "Format conversion and graphical representation of [Universal Dependencies](http://universaldependencies.org) trees.", "version": "0.13.4.dev20190903" }, "last_serial": 5775484, "releases": { "0.13.4.dev20190903": [ { "comment_text": "", "digests": { "md5": "bb8d78c2cbef7d8090b086a1054df965", "sha256": "a8c45051b7e0f5a0cca809e6c5f12854cf64c8acdd67e2e1dc8be2a7ef69c3fe" }, "downloads": -1, "filename": "gingertree-0.13.4.dev20190903-py3-none-any.whl", "has_sig": false, "md5_digest": "bb8d78c2cbef7d8090b086a1054df965", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.6", "size": 21768, "upload_time": "2019-09-03T11:44:03", "url": "https://files.pythonhosted.org/packages/37/02/f68b7dd9ba5594118de725d7e31303314bda81a41ecc9e7e0119bfa777fc/gingertree-0.13.4.dev20190903-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59e388d62c0f47a9258d2f4275cba04c", "sha256": "ee307b3036904ab534e88f6db5bfd3a0c7be027fc568bdf7bbf8009a2dc618a5" }, "downloads": -1, "filename": "gingertree-0.13.4.dev20190903.tar.gz", "has_sig": false, "md5_digest": "59e388d62c0f47a9258d2f4275cba04c", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.6", "size": 21839, "upload_time": "2019-09-03T11:44:07", "url": "https://files.pythonhosted.org/packages/72/46/6eef8a320dc636aba1f2e37caf5ef64132e501871d6cc39987cddfa216ee/gingertree-0.13.4.dev20190903.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bb8d78c2cbef7d8090b086a1054df965", "sha256": "a8c45051b7e0f5a0cca809e6c5f12854cf64c8acdd67e2e1dc8be2a7ef69c3fe" }, "downloads": -1, "filename": "gingertree-0.13.4.dev20190903-py3-none-any.whl", "has_sig": false, "md5_digest": "bb8d78c2cbef7d8090b086a1054df965", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.6", "size": 21768, "upload_time": "2019-09-03T11:44:03", "url": "https://files.pythonhosted.org/packages/37/02/f68b7dd9ba5594118de725d7e31303314bda81a41ecc9e7e0119bfa777fc/gingertree-0.13.4.dev20190903-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59e388d62c0f47a9258d2f4275cba04c", "sha256": "ee307b3036904ab534e88f6db5bfd3a0c7be027fc568bdf7bbf8009a2dc618a5" }, "downloads": -1, "filename": "gingertree-0.13.4.dev20190903.tar.gz", "has_sig": false, "md5_digest": "59e388d62c0f47a9258d2f4275cba04c", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.6", "size": 21839, "upload_time": "2019-09-03T11:44:07", "url": "https://files.pythonhosted.org/packages/72/46/6eef8a320dc636aba1f2e37caf5ef64132e501871d6cc39987cddfa216ee/gingertree-0.13.4.dev20190903.tar.gz" } ] }