Package: gingertree
GingerFormat conversion and graphical representation ofUniversal Dependenciestrees.│
│          ┌─────────────┐
│┌────────┐│             │
││        ││             │┌─────────┐    ┌────┐
││    ┌───│┤         ┌───│┤         │┌──┐│    │
↓│    ↓   ↓│         ↓   ↓│         ↓│  ↓│    ↓
ROOT  Je  reconnais  l'  existence  du  kiwi  .InstallationFirst installPycairo's dependencies.If you use Windows,Pycairo won't install
automaticallyanyway but you can install it
manually fromthe unoficial wheels.If you can't or don't want to install Pycairo on your system, skip this and omit [images] extras
in the following step.Install ginger fromPypi¹python3 -m pip install gingertree[images](Either with--useror in a virtualenv but you knew that already, didn't you?)You can also install it directly from the tip (unstable but usually safe) of the master branch whithpython3 -m pip install git+https://github.com/LoicGrobol/ginger/[images]Test if everything works by runningginger examples/test.conll.
The output should be the same as the ASCII-art tree above.↑1.It'sgingertreebecausegingeris being squatted ☹ if you know how to fix that, please let me know.Usageginger [--from <format>] <in-file> [--to] [<out-file>]Arguments<in-file>input file (in CoNLL-U format),-for standard input<out-file>output file,-for standard input (default:-)Options-f,--from <format>input file format, see below (default:guess)-t,--to <format>output file format, see below (default:ascii)-h,--helpGet some helpExamplesPrint to stdoutginger examples/test.conllAssume CoNLL-X for input formatginger -f conllx spam.conllxOutput TikZ codeginger examples/test.conll -t tikzPrint to a fileginger examples/test.conll examples/output.asciiartPipe in and outcat examples/test.conll | ginger - | lessInput formatsguessTry to guess the file format, defaults to CoNLL-UCoNLLconlluCoNLL-U v2 formatconllxCoNLL-X formatconll2009_goldCoNLL-2009 formatTakes only the gold columns into account.The P- and -PRED attributes are preserved in themiscattribute of the
intermediate CoNLL-U tree.conll2009_sysCoNLL-2009 formatTakes only the predicted columns into account.The gold columns and the -PRED attributes are preserved in themiscattribute of the
intermediate CoNLL-U tree.SoftwareFormats used by mainstream NLP toolstalismaneOutputs ofTalismanemate_goldInput/Output ofmate-tools(actually an alias forconll2009_gold)mate_sysInput/Output ofmate-tools(actually an alias forconll2009_sys)Output formatsTreebanksThe input must be either the path to an existing file or-for standard input. The data that
it contains must be in one of the following formats:guessTry to guess the file format, defaults to CoNLL-UconllxCoNLL-X formatconlluCoNLL-U formatconll2009_goldCoNLL-2009 format(Gold columns only)conll2009_sysCoNLL-2009 format(Predicted columns only)talismaneOutputs ofTalismanemate_goldAlias forconll2009_gold, used bymate-toolsmate_sysAlias forconll2009_sys, used bymate-toolsNote: no real effort is made to preserve informations that are not relevant to Universal
Dependencies, so this might be information-destructive, e.g. if converting from CoNLL-2009 to
itself, the P- attributes will be dropped.Text formatsTo use these formats, the output destination must be either a file and thus must not be the path to
an existing directory, or-for the standard output.asciiASCII-art (using unicode characters, because, yes, we are subversive)tikz-dependencyLaTeX code using thetikz-dependencypackagetikzTikZ code. Use thepositioning,calcandshapes.multiparttikz librariesThe output is only the\tikzpicturepart, not a whole compilable document, there isan
exampleof such a document inexample.The code is quite verbose since we chose to rely on TikZ' own arithmetic capabilities in order
to allow easier edition and reuse of the generated code.Image formatsTo use these formats, the output destination must be either a directory and thus must not be the
path of an existing file, or-for the standard output, in which case the byte streams
corresponding to different trees will be separated by NULL bytes.pngsvgpdfDevelopmentDevelopment and releases onGithub.Further notesWhen importing non-CoNLL-U treebanks, node forms with spaces are considered to be fixed
expressions, and are treated according to theUD
guidelinesby splitting them in single-token
nodes linked byfixeddependencies This mean that the exceptions mentioned inthe UDv2
guidelinesare not supported for those
imports. They are supported when importing from CoNLL-U, though.LicenceThis licence (the so-called “MIT License”) applies to all the files in this repository.
See alsoLICENSE.md.Copyright 2022 Loïc Grobol <loic.grobol@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.