blob: fa5f0a571569996f4460312500c2ad7bbda05e10 [file] [log] [blame]
.DELETE_ON_ERROR:
all: json
./output/corpus.p5.xml: nor2tei.py
mkdir -p output
python nor2tei.py `find /export/coin/ICC/NO/Originaldaten -name "*.xml"`
icc-nor.p5.xml: ./output/corpus.p5.xml
perl -C255 -pe 's/([^>])\n/$1 /g; s/^\s*([^<])/$1/; s/\&gt /\&gt; /g;' $< | xmllint - > $@
icc-nor.zip: icc-nor.p5.xml
pv $< | tei2korapxml -s -tk - > $@
icc-nor.ud.zip: icc-nor.zip
korapxml2conllu $< | pv | /usr/local/kl/bin/udpipe2 -r -m norwegian-bokmaal-ud-2.10-220711 | conllu2korapxml > $@
icc-nor.krill.tar: icc-nor.zip icc-nor.ud.zip
korapxml2krill archive -w -cfg /vol/corpora/ICC/icc-nor.cfg -j 0 --meta ICC -i icc-nor.zip -i icc-nor.ud.zip -o icc-nor.krill
json: icc-nor.krill.tar
rm -rf json
mkdir -p json
tar -C json -xf icc-nor.krill.tar
rsync -avz --delete json korap@korap-worker-07:/opt/korap/icc/nor/KorAP-Docker/
ssh korap@korap-worker-07 cd /opt/korap/icc/nor/KorAP-Docker && rm -rf index && mkdir -p index && docker run -u root --rm -v /opt/korap/icc/nor/KorAP-Docker:/data:z korap/kustvakt Krill-Indexer.jar -c /kustvakt/kustvakt-lite.conf -i /data/json -o /data/index/