Skip to content
Snippets Groups Projects
marvin_extraction_run.sh 985 B
Newer Older
#!/bin/bash

Sebastian Hellmann's avatar
Sebastian Hellmann committed
echo "LC_ALL=en_US.UTF-8"
export LC_ALL=en_US.UTF-8
Sebastian Hellmann's avatar
Sebastian Hellmann committed

#######################
# include all functions and path variables
#######################
source functions.sh
Sebastian Hellmann's avatar
Sebastian Hellmann committed


#################
Sebastian Hellmann's avatar
Sebastian Hellmann committed
#check argument
Sebastian Hellmann's avatar
Sebastian Hellmann committed
#################
Sebastian Hellmann's avatar
Sebastian Hellmann committed
GROUP=$1
Sebastian Hellmann's avatar
Sebastian Hellmann committed
if [ "$GROUP" != "generic" ] && [ "$GROUP" != "mappings" ] && [ "$GROUP" != "test" ] && [ "$GROUP" != "wikidata" ]  && [ "$GROUP" != "text" ]  || [ -z "$GROUP" ]
Sebastian Hellmann's avatar
Sebastian Hellmann committed
    echo "$HELP"
Sebastian Hellmann's avatar
Sebastian Hellmann committed

Sebastian Hellmann's avatar
Sebastian Hellmann committed

#######################
# RUN (requires setup-dief.sh)
Sebastian Hellmann's avatar
Sebastian Hellmann committed
#######################

root's avatar
root committed
echo "DOWNLOAD ONTOLOGY AND MAPPINGS"
cd $DIEFDIR/core
root's avatar
root committed
../run download-ontology &>  $LOGDIR/downloadOntology.log
../run download-mappings &>  $LOGDIR/downloadMappings.log
Sebastian Hellmann's avatar
Sebastian Hellmann committed

root's avatar
root committed
echo "DOWNLOAD WIKIDUMPS"
Sebastian Hellmann's avatar
Sebastian Hellmann committed
cd $DIEFDIR/dump
root's avatar
root committed
../run download $CONFIGDIR/download.$GROUP.properties &>  $LOGDIR/downloadWikidumps.log 
root's avatar
root committed
echo "EXTRACT"
extractDumps &>  $LOGDIR/extraction.log;

echo "POST-PROCESSING"
Sebastian Hellmann's avatar
Sebastian Hellmann committed
postProcessing 2> $LOGDIR/postProcessing.log;
Sebastian Hellmann's avatar
Sebastian Hellmann committed


# CLEANUP
Sebastian Hellmann's avatar
Sebastian Hellmann committed
archiveLogFiles;