Marc Kupietz | 4fe7c87 | 2023-04-19 13:33:42 +0200 | [diff] [blame] | 1 | .DELETE_ON_ERROR: |
| 2 | |
| 3 | all: json |
| 4 | |
| 5 | ./output/corpus.p5.xml: nor2tei.py Makefile |
| 6 | mkdir -p output |
| 7 | python nor2tei.py `find /export/coin/ICC/NO/Originaldaten -name "*.xml"` |
| 8 | |
| 9 | icc-nor.p5.xml: ./output/corpus.p5.xml Makefile |
| 10 | perl -C255 -pe 's/([^>])\n/$1 /g; s/^\s*([^<])/$1/; s/\> /\> /g;' $< | xmllint - > $@ |
| 11 | |
| 12 | icc-nor.zip: icc-nor.p5.xml |
| 13 | pv $< | tei2korapxml -s -tk - > $@ |
| 14 | |
| 15 | icc-nor.ud.zip: icc-nor.zip |
| 16 | korapxml2conllu $< | pv | /usr/local/kl/bin/udpipe2 -r -m norwegian-bokmaal-ud-2.10-220711 | conllu2korapxml > $@ |
| 17 | |
| 18 | |
| 19 | icc-nor.krill.tar: icc-nor.zip icc-nor.ud.zip |
| 20 | korapxml2krill archive -w -cfg /vol/corpora/ICC/icc-nor.cfg -i icc-nor.zip -i icc-nor.ud.zip -o icc-nor.krill |
| 21 | |
| 22 | json: icc-nor.krill.tar |
| 23 | rm -rf json |
| 24 | mkdir -p json |
| 25 | tar -C json -xf icc-nor.krill.tar |
| 26 | rsync -avz --delete json korap@korap-worker-07:/opt/korap/icc/nor/KorAP-Docker/ |
| 27 | 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/ |