2020-11-09 21:46:12 +00:00
|
|
|
set -e
|
|
|
|
OUTDIR=build/train/output
|
|
|
|
TRAINDIR=build/train
|
2020-11-24 10:30:58 +00:00
|
|
|
# Delete old training results
|
|
|
|
rm -r $TRAINDIR
|
2020-11-09 21:46:12 +00:00
|
|
|
mkdir -p $TRAINDIR
|
|
|
|
mkdir -p $OUTDIR
|
|
|
|
mkdir -p dist
|
|
|
|
# Delete old training results
|
|
|
|
rm -rf $OUTDIR/*
|
|
|
|
# Train dependency and POS
|
2020-11-24 10:30:58 +00:00
|
|
|
spacy train sk $OUTDIR ./build/input/slovak-treebank ./build/input/ud-artificial-gapping --n-iter 15 -p tagger,parser
|
2020-11-09 21:46:12 +00:00
|
|
|
rm -rf $TRAINDIR/posparser
|
|
|
|
mv $OUTDIR/model-best $TRAINDIR/posparser
|
|
|
|
# Train NER
|
|
|
|
# python ./train.py -t ./train.json -o $TRAINDIR/nerposparser -n 10 -m $TRAINDIR/posparser/
|
2020-11-24 10:30:58 +00:00
|
|
|
spacy train sk $TRAINDIR/nerposparser ./ner/wikiart/wikitrain.json ./ner/wikiart/wikieval.json --n-iter 15 -p ner
|
2020-11-09 21:46:12 +00:00
|
|
|
# Package model
|
|
|
|
spacy package $TRAINDIR/nerposparser dist --meta-path ./meta.json --force
|
|
|
|
cd dist/sk_sk1-0.2.0
|
2020-11-24 10:30:58 +00:00
|
|
|
python ./setup.py sdist --dist-dir ../
|