Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 56 lines (41 sloc) 2.11 KB
cat /dev/null > output_data/full.rdf.nt
echo Starting with turtle files in hand-written rdf
for file in $(ls handwritten/*.ttl)
rapper -i turtle -o ntriples "$file" >> output_data/full.rdf.nt
echo Validating spec files
for file in $(ls templates/*.spec.ttl)
rapper -i turtle -c "$file"
echo sources
cat euro2012/euro2012_paninigroup.tsv | $VERTERE_FOLDER/vertere_mapper.php $TEMPLATE_FOLDER/euro2012_paninigroup.tsv.spec.ttl >> output_data/full.rdf.nt
echo sources
cat euro2012/euro2012_stickermanager.tsv | $VERTERE_FOLDER/vertere_mapper.php $TEMPLATE_FOLDER/euro2012_stickermanager.tsv.spec.ttl >> output_data/full.rdf.nt
echo constructing and linking player resources
arq --data output_data/full.rdf.nt --query queries/construct_player_resources.rq --results n-triples >> output_data/full.rdf.nt
echo linking team resources
arq --data output_data/full.rdf.nt --query queries/construct_team_links.rq --results n-triples >> output_data/full.rdf.nt
echo Sorting and de-duping descriptions
sort -u output_data/full.rdf.nt > output_data/panini_euro2012.rdf.nt
rm output_data/full.rdf.nt
echo Listing properties used
cat output_data/panini_euro2012.rdf.nt | awk '{ print $2 }' | sort -u > output_data/panini_euro2012.properties_used.txt
echo Listing classes used
cat output_data/panini_euro2012.rdf.nt | awk '{ print $2 " " $3 }' | grep "^<> " | awk '{ print $2 }' | sort -u > output_data/panini_euro2012.classes_used.txt
echo Converting descriptions to turtle
rapper -i ntriples -o turtle output_data/panini_euro2012.rdf.nt \
-f 'xmlns:rdfs=""' \
-f 'xmlns:owl=""' \
-f 'xmlns:xsd=""' \
-f 'xmlns:foaf=""' \
-f 'xmlns:panini=""' \
> output_data/panini_euro2012.rdf.ttl
echo Preparing for upload
rm upload/*
split -l 9000 output_data/panini_euro2012.rdf.nt panini_euro2012.
mv panini_euro2012.a* upload