Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MARVIN-config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dbpedia-assoc
MARVIN-config
Commits
d3abe453
Commit
d3abe453
authored
4 years ago
by
kurzum
Browse files
Options
Downloads
Patches
Plain Diff
post processing clean up
parent
c5f8a99f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
functions.sh
+28
-28
28 additions, 28 deletions
functions.sh
with
28 additions
and
28 deletions
functions.sh
+
28
−
28
View file @
d3abe453
...
@@ -32,42 +32,42 @@ extractDumps() {
...
@@ -32,42 +32,42 @@ extractDumps() {
}
}
# post-processing
# post-processing
, see http://dev.dbpedia.org/Post-Processing
postProcessing
()
{
postProcessing
()
{
cd
$DIEFDIR
/scripts
;
cd
$DIEFDIR
/scripts
;
echo
"post-processing of
$GROUP
"
echo
"post-processing of
$GROUP
"
;
if
[
"
$GROUP
"
=
"mappings"
]
# resolve transitive links for all, affects the 'redirects' dataset
# TODO ResolveTransitiveLinks can take a wikidata interlanguage link parameter, that helps to sort the redirects
>
&2 ../run ResolveTransitiveLinks
$EXTRACTIONBASEDIR
redirects redirects_transitive .ttl.bz2 @downloaded
;
# Datasets for MapObjectURIs
if
[
"
$GROUP
"
=
"mappings"
]
||
[
"
$GROUP
"
=
"test"
]
then
then
>
&2 ../run ResolveTransitiveLinks
$EXTRACTIONBASEDIR
redirects redirects_transitive .ttl.bz2 @downloaded
;
DATASETS
=
"mappingbased-objects-uncleaned"
>
&2 ../run MapObjectUris
$EXTRACTIONBASEDIR
redirects_transitive .ttl.bz2 mappingbased-objects-uncleaned _redirected .ttl.bz2 @downloaded
;
>
&2 ../run TypeConsistencyCheck type.consistency.check.properties
;
elif
[
"
$GROUP
"
=
"wikidata"
]
elif
[
"
$GROUP
"
=
"wikidata"
]
then
then
>
&2 ../run ResolveTransitiveLinks
$EXTRACTIONBASEDIR
redirects transitive-redirects .ttl.bz2 wikidata
DATASETS
=
"mappingbased-objects-uncleaned,raw"
>
&2 ../run MapObjectUris
$EXTRACTIONBASEDIR
transitive-redirects .ttl.bz2 mappingbased-objects-uncleaned,raw
-redirected
.ttl.bz2 wikidata
elif
[
"
$GROUP
"
=
"generic"
]
||
[
"
$GROUP
"
=
"generic.en"
]
||
[
"
$GROUP
"
=
"sparktestgeneric"
]
>
&2 ../run TypeConsistencyCheck type.consistency.check.properties
;
elif
[
"
$GROUP
"
=
"generic"
]
||
[
"
$GROUP
"
=
"generic.en"
]
then
>
&2 ../run ResolveTransitiveLinks
$EXTRACTIONBASEDIR
redirects redirects_transitive .ttl.bz2 @downloaded
;
>
&2 ../run MapObjectUris
$EXTRACTIONBASEDIR
redirects_transitive .ttl.bz2 disambiguations,infobox-properties,page-links,persondata,topical-concepts _redirected .ttl.bz2 @downloaded
;
# todo untested line
for
i
in
$(
find
$EXTRACTIONBASEDIR
-name
"*._redirects.ttl.bz2"
)
;
do
cp
$i
$LOGDIR
;
rename
-f
's/_redirected//'
$i
;
done
elif
[
"
$GROUP
"
=
"text"
]
then
then
echo
"check whether text has post-processing"
DATASETS
=
"disambiguations,infobox-properties,page-links,persondata,topical-concepts"
fi
elif
[
"
$GROUP
"
=
"test"
]
#run mapobjectURIs
then
>
&2 ../run MapObjectUris
$EXTRACTIONBASEDIR
redirects_transitive .ttl.bz2
$DATASETS
_redirected .ttl.bz2 @downloaded
;
echo
"no postprocessing"
#>&2 ../run ResolveTransitiveLinks $EXTRACTIONBASEDIR redirects redirects_transitive .ttl.bz2 @downloaded;
# Datasets with Typeconsistencycheck
#>&2 ../run MapObjectUris $EXTRACTIONBASEDIR redirects_transitive .ttl.bz2 mappingbased-objects-uncleaned _redirected .ttl.bz2 @downloaded;
if
[
"
$GROUP
"
=
"mappings"
]
||
[
"
$GROUP
"
=
"test"
]
||
[
"
$GROUP
"
=
"wikidata"
]
||
[
"
$GROUP
"
=
"generic"
]
||
[
"
$GROUP
"
=
"generic.en"
]
||
[
"
$GROUP
"
=
"sparktestgeneric"
]
#>&2 ../run TypeConsistencyCheckManual mappingbased-objects instance-types ro;
then
elif
[
"
$GROUP
"
=
"sparktestgeneric"
]
>
&2 ../run TypeConsistencyCheck type.consistency.check.properties
;
then
fi
echo
"no postprocessing"
fi
# Handling of redirects, i.e. copy to log and rename old
mkdir
$LOGDIR
/redirected
for
i
in
$(
find
$EXTRACTIONBASEDIR
-name
"*_redirected.ttl.bz2"
)
;
do
cp
$i
$LOGDIR
/redirected
;
rename
-f
's/_redirected//'
$i
;
done
}
}
# compress log files
# compress log files
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment