Marc Kupietz | 4fe7c87 | 2023-04-19 13:33:42 +0200 | [diff] [blame] | 1 | .DELETE_ON_ERROR: |
| 2 | |
| 3 | all: json |
| 4 | |
Marc Kupietz | 723058d | 2023-05-24 14:09:58 +0200 | [diff] [blame] | 5 | ./output/corpus.p5.xml: nor2tei.py |
Marc Kupietz | 4fe7c87 | 2023-04-19 13:33:42 +0200 | [diff] [blame] | 6 | mkdir -p output |
| 7 | python nor2tei.py `find /export/coin/ICC/NO/Originaldaten -name "*.xml"` |
| 8 | |
Marc Kupietz | 723058d | 2023-05-24 14:09:58 +0200 | [diff] [blame] | 9 | icc-nor.p5.xml: ./output/corpus.p5.xml |
Marc Kupietz | 4fe7c87 | 2023-04-19 13:33:42 +0200 | [diff] [blame] | 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 |
Marc Kupietz | c112d06 | 2023-05-24 14:10:30 +0200 | [diff] [blame] | 20 | 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 |
Marc Kupietz | 4fe7c87 | 2023-04-19 13:33:42 +0200 | [diff] [blame] | 21 | |
| 22 | json: icc-nor.krill.tar |
| 23 | rm -rf json |
| 24 | mkdir -p json |
| 25 | tar -C json -xf icc-nor.krill.tar |
Marc Kupietz | e80ccc6 | 2023-05-24 14:14:48 +0200 | [diff] [blame^] | 26 | rsync -avz --delete json korap@korap-worker-07:/opt/korap/icc/nor/ |
| 27 | ssh korap@korap-worker-07 "cd /opt/korap/icc/nor && rm -rf index && mkdir -p index && docker run -u root --rm -v /opt/korap/icc/nor:/data:z korap/kustvakt Krill-Indexer.jar -c /kustvakt/kustvakt-lite.conf -i /data/json -o /data/index/ && INDEX=./index docker-compose --profile=full -p icc-nor restart" |