-
Notifications
You must be signed in to change notification settings - Fork 3
/
marvin_extraction_run.sh
executable file
·51 lines (33 loc) · 1.17 KB
/
marvin_extraction_run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
echo "LC_ALL=en_US.UTF-8"
export LC_ALL=en_US.UTF-8
#######################
# include all functions and path variables
#######################
source functions.sh
#################
#check argument
#################
GROUP=$1
if [ "$GROUP" != "generic" ] && [ "$GROUP" != "generic.en" ] && [ "$GROUP" != "mappings" ] && [ "$GROUP" != "test" ] && [ "$GROUP" != "wikidata" ] && [ "$GROUP" != "sparktestgeneric" ] && [ "$GROUP" != "text" ] && [ "$GROUP" != "generic.spotlight" ] && [ -z "mappings.spotlight" ] || [ -z "$GROUP" ]
then
echo "$HELP"
exit 1
fi
#######################
# RUN (requires setup-dief.sh)
#######################
echo "DOWNLOAD ONTOLOGY AND MAPPINGS"
cd $DIEFDIR/core
../run download-ontology &> $LOGDIR/downloadOntology.log
../run download-mappings &> $LOGDIR/downloadMappings.log
echo "DOWNLOAD WIKIDUMPS"
cd $DIEFDIR/dump
../run download $CONFIGDIR/download.$GROUP.properties &> $LOGDIR/downloadWikidumps.log
echo "EXTRACT"
cd $DIEFDIR/dump;
>&2 ../run extraction $CONFIGDIR/extraction.$GROUP.properties &> $LOGDIR/extraction.$GROUP.log;
echo "POST-PROCESSING"
postProcessing 2> $LOGDIR/postProcessing.log;
# CLEANUP
archiveLogFiles;