blob: 1b96617c6fe815c3e49bdcc4d9a627a6eaffbe5c [file] [log] [blame]
Marc Kupietz4fe7c872023-04-19 13:33:42 +02001.DELETE_ON_ERROR:
2
3all: 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
9icc-nor.p5.xml: ./output/corpus.p5.xml Makefile
10 perl -C255 -pe 's/([^>])\n/$1 /g; s/^\s*([^<])/$1/; s/\&gt /\&gt; /g;' $< | xmllint - > $@
11
12icc-nor.zip: icc-nor.p5.xml
13 pv $< | tei2korapxml -s -tk - > $@
14
15icc-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
19icc-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
22json: 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/