deptex is an easy-to-use tool for generating latex sources of dependency graphs from the output of the dependency parser module of magyarlanc, a toolkit for linguistic processing of Hungarian.
The script can be run by this command: python3 deptex.py arg1 arg2
deptex processes the output of the dependency parser module of magyarlanc. The output has the following structure: one line corresponds to one token and sentences are separated by an empty line. Every row consists of seven columns:
- the identifier of the word within the sentence
- wordform
- lemma
- POS-tag
- morphological features
- the identifier of the parent node
- the dependency label
You can download magyarlanc from here. Please cite this article:
Zsibrita, János; Vincze, Veronika; Farkas, Richárd 2013: magyarlanc: A Toolkit for Morphological and Dependency Parsing of Hungarian. In: Proceedings of RANLP 2013, pp. 763-771.
@inproceedings{magyarlanc,
author = {Zsibrita, J\'{a}nos and Vincze, Veronika and Farkas, Rich\'{a}rd},
title = {magyarlanc: A Toolkit for Morphological and Dependency Parsing of Hungarian},
booktitle = {Proceedings of RANLP 2013},
pages = {763--771},
year = {2013}
}
The output is a simple .tex file containing the minimal preamble. Every sentences parsed by magyarlanc gets an own dependency environment with the generated text and edges.
- Python3
- a TEX distribution, eg. TeXLive
- tikz-dependency package
A sample file (test_magyarlanc.txt) is provided with two sentences parsed by magyarlanc. In deptex.sh the two steps (running deptex.py and compiling the pdf) are concatenated. The .sh script runs on the sample input file.