blob: 13ca55707209662b063d32b03cb271a474290bae [file] [log] [blame]
dazad7d70752021-01-12 18:17:49 +01001#!/bin/bash
2
3source ~/.bashrc
4
5ROOT_DATAPATH=/export/netapp/kupietz/N-GRAMM-STUDIE/conllu
6FILES_TO_PROCESS=DeReKo/all_dereko_filenames.txt
7
8while IFS= read -r line
9do
10 my_files+=($line)
11done < ${FILES_TO_PROCESS}
12
13let files_len=${#my_files[@]}+10
14
15for (( i=0; i<=$files_len; i+=10 ))
16 do
17 let next=i
18 file_1=${my_files[next]}
19 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
20 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
21 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
22 let next=next+1
23 file_2=${my_files[next]}
24 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
25 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
26 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
27 let next=next+1
28 file_3=${my_files[next]}
29 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
30 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
31 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
32 let next=next+1
33 file_4=${my_files[next]}
34 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
35 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
36 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
37 let next=next+1
38 file_5=${my_files[next]}
39 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
40 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
41 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
42 let next=next+1
43 file_6=${my_files[next]}
44 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
45 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
46 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
47 let next=next+1
48 file_7=${my_files[next]}
49 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
50 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
51 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
52 let next=next+1
53 file_8=${my_files[next]}
54 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
55 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
56 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
57 let next=next+1
58 file_9=${my_files[next]}
59 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
60 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
61 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
62 let next=next+1
63 file_10=${my_files[next]}
64 python systems/parse_spacy.py --corpus_name DeReKo_${my_files[next]} --comment_str "#" \
65 -i ${ROOT_DATAPATH}/${my_files[next]}.conllu.gz \
66 -o ${ROOT_DATAPATH}/0_SpaCyParsed/${my_files[next]}.spacy.gl.conllu &
67 wait
68 # Remove Original Uncompressed Files
69 rm ${ROOT_DATAPATH}/${file_1}.conllu
70 rm ${ROOT_DATAPATH}/${file_2}.conllu
71 rm ${ROOT_DATAPATH}/${file_3}.conllu
72 rm ${ROOT_DATAPATH}/${file_4}.conllu
73 rm ${ROOT_DATAPATH}/${file_5}.conllu
74 rm ${ROOT_DATAPATH}/${file_6}.conllu
75 rm ${ROOT_DATAPATH}/${file_7}.conllu
76 rm ${ROOT_DATAPATH}/${file_8}.conllu
77 rm ${ROOT_DATAPATH}/${file_9}.conllu
78 rm ${ROOT_DATAPATH}/${file_10}.conllu
79 # ZIP The generated Parsed Outputs
80 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_1}.spacy.gl.conllu &
81 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_2}.spacy.gl.conllu &
82 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_3}.spacy.gl.conllu &
83 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_4}.spacy.gl.conllu &
84 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_5}.spacy.gl.conllu &
85 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_6}.spacy.gl.conllu &
86 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_7}.spacy.gl.conllu &
87 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_8}.spacy.gl.conllu &
88 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_9}.spacy.gl.conllu &
89 gzip ${ROOT_DATAPATH}/0_SpaCyParsed/${file_10}.spacy.gl.conllu &
90 wait
91 done
92
93
94