Dan's Brain

Italian Projective Dependency Parser

Run with:

python parser.py model_dir wsj_train.dep wsj_train.pos wsj_test.dep

Obtain wsj_train.dep1:

for f in $1/*.mrg; do
    echo $f
    grep -v CODE $f > "$f.2"
    out="$f.dep"
    java -mx800m -cp "$scriptdir/*:" edu.stanford.nlp.trees.EnglishGrammaticalStructure \
-treeFile "$f.2" -basic -makeCopulaHead -conllx > $out
done

Convert to conll-x format2:

perl conllu_to_conllx.pl < file.conllu > file.conll

  1. https://explosion.ai/blog/parsing-english-in-python ↩︎

  2. https://github.com/UniversalDependencies/tools ↩︎