parser / udpipe2 /models-2.6 /eval_has_feature.sh
anasampa2's picture
Upload 110 files
0e5da39 verified
raw
history blame contribute delete
588 Bytes
#!/bin/sh
for d in ../ud-2.6/*/; do
case $d in
*_all/) continue;;
esac
has_xpos=$(grep -P "^\d+\t" $d$(basename ${d%/})-ud-test.conllu | cut -f5 | uniq | wc -l | perl -ple '$_=$_ > 1 ? 1 : 0')
has_feats=$(grep -P "^\d+\t" $d$(basename ${d%/})-ud-test.conllu | cut -f6 | uniq | wc -l | perl -ple '$_=$_ > 1 ? 1 : 0')
has_lemmas=$(grep -P "^\d+\t" $d$(basename ${d%/})-ud-test.conllu | cut -f3 | uniq | wc -l | perl -ple '$_=$_ > 1 ? 1 : 0')
[ $has_xpos = 0 ] && echo $d: no XPOS
[ $has_feats = 0 ] && echo $d: no UFeats
[ $has_lemmas = 0 ] && echo $d: no Lemmas
done