JoFunch / gf-ud

Conversions between GF and dependency trees, in particular UD (Universal Dependencies) but designed to be completely generic as for annotation scheme. This repository replaces the old gf-contrib/ud2gf code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gf-ud

Conversions between GF and dependency trees, in particular UD (Universal Dependencies) but designed to be completely generic as for annotation scheme. This repository replaces the old gf-contrib/ud2gf code.

The conversions are based on algorithms presented in the papers

as well as some earlier code in gf-contrib/ud2gf and in gf-core/src/, mostly by Aarne Ranta and Prasanth Kolachina. Differences from those sources may be documented later.

To get started, you can test the following:

  • cd grammars
  • ln -s gf-summerschool-2018 # a sister Git repository
  • make mini
  • cd ..
  • make compile
  • cat test.conllu | ./gfud -ud2gf grammars/MiniLang Eng Utt at
  • cat test.gftrees | ./gfud -gf2ud grammars/MiniLang Eng Utt ud
  • echo "the black cat sees us" | ./gfud -string2gf2ud grammars/MiniLang Eng Utt

You can also follow the instructions in doc/training-and-testing.txt to test a combination with Malt parser.

The largest changes are perhaps in the format of dependency configurations. One goal was to merge the gf2ud and ud2gf annotations. See

  • grammars/MiniLang.labels
  • grammars/MiniLangEng.labels

for examples (to be documented properly later).

Other grammars to try are

  • grammars/ShallowParse # wide-coverage, with WordNet words but without sense distinctions, uses sister repo gf-wordnet/
  • grammars/Term # a grammar of arithmetic expression, completely different tagset

With ShallowParse, you can try out the included sample from https://github.com/UniversalDependencies/UD_English-PUD/blob/master/en_pud-ud-test.conllu

  • cat upto12eng.conllu | ./gfud -ud2gf grammars/ShallowParse Eng Text at stat

But the results are still meager, and require additions in ShallowParse.labels and maybe in the algorithm.

About

Conversions between GF and dependency trees, in particular UD (Universal Dependencies) but designed to be completely generic as for annotation scheme. This repository replaces the old gf-contrib/ud2gf code.

License:Other


Languages

Language:Grammatical Framework 97.2%Language:Haskell 2.7%Language:Shell 0.0%Language:Makefile 0.0%