File size: 674 Bytes
bc6ccab
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
#! /usr/bin/python3
src="KoichiYasuoka/roberta-base-ukrainian"
tgt="KoichiYasuoka/roberta-base-ukrainian-upos"
import os,sys
os.system("test -d UD_Ukrainian-IU || git clone --depth=1 https://github.com/UniversalDependencies/UD_Ukrainian-IU")
os.system("test -d UD_Ukrainian-ParlaMint || git clone --depth=1 https://github.com/UniversalDependencies/UD_Ukrainian-ParlaMint")
os.system("for F in train dev test ; do cat UD_Ukrainian-*/*-$F.conllu > $F.conllu ; done ; cat *.conllu > train.upos")
os.system(f"{sys.executable} -m esupar.train {src} {tgt} -16 /tmp train.upos")
os.system(f"{sys.executable} -m esupar.train {tgt} {tgt} 16 /// train.conllu dev.conllu test.conllu")