This page was included from https://github.com/dbpedia/extraction-framework.
DATADIR, a log directory, now further called
LOGDIRand an export directory, called
In this section the extraction-framework gets downloaded from the official repository, configured to work on your own system and installed with maven.
git clone https://github.com/dbpedia/extraction-framework
base-dir: Path to
log-dir: Path to
extraction.default.properties: the default extraction
extraction.mappings.properties: only extracts mapping datasets
extraction.spark.properties: configuration options for the spark-extraction. Executes all spark-supported extractors. (no mapping, no NIF, no images)
extraction.wikidata.properties: extraction on wikidata datasets
download.10000.properties: pre-configured to download all dumps with more than 10.000 articles
require-download-complete: checks directories for the download-complete file
languages: list of languages, used for the extraction
extractors: list of extractor classes to be used in the extraction
extractors.language-code: additional extractor classes used for this language
spark-master(sparkextraction only): value for the spark-master. For local mode, you can configure your number of processor-threads to be used with
local[X]. Optimum seems to be reached at 32 Threads with the current implementation.
spark-local-dir(sparkextraction only): location for sparks temporary files, incase
/tmp/is too small.
This section describes the gathering of the different input-files for the extraction-framework.
The Wikimedia-XML-Dumps are the main source for the extraction. The data is distributed in one file per language per dump-release. The extraction-framework can download these itself with the download script. You also can manually download the files from here.
../run download download.10000.properties
The Ontology Files:
This script downloads the latest version of the ontology file used to build valid rdf data.
The Mapping Files:
This script downloads the latest versions of the mappings from the mappings-wiki.
The wikidata-r2r Mappings
This is only needed for the Wikidata-Extraction and downloads the latest version of the additional r2r mappings from the official repository.
cd core/src/main/resources && curl https://raw.githubusercontent.com/dbpedia/extraction-framework/master/core/src/main/resources/wikidatar2r.json > wikidatar2r.json
This is the default way of starting the extraction. The extractor classes that get used, and with that the datasets that get produced, can be configured in the
.properties file used.
../run extraction extraction.default.properties
The spark-based extraction is using Apache Spark to speed up the extraction of basic datasets. This means it works with every
ImageExtractor and the NIF-Extraction.
../run sparkextraction extraction.spark.properties
The mapping-based extraction produces higher quality data through the usage of community-made mapping files. Due to the complexity of this task, the mapping-extraction is currently not supported by the spark-based extraction.
../run extraction extraction.mappings.properties
The wikidata files have their own dedicated postprocessing scripts, that should be executed before publishing the data.
../run ResolveTransitiveLinks DATADIR redirects transitive-redirects .ttl.bz2 wikidata
../run MapObjectUris DATADIR transitive-redirects .ttl.bz2 mappingbased-objects-uncleaned,raw -redirected .ttl.bz2 wikidata
../run WikidataSubClassOf process.wikidata.subclassof.properties
../run TypeConsistencyCheck type.consistency.check.properties
Preparation for export to the Download-Server & Databus:
This script moves the data to the
ÈXPORTDIR and renames the files according to the naming scheme used by the databus-maven-plugin. Replace
DUMPDATE with the current date in the format
extraction-framework/scripts/src/main/bash/databusPreparation.sh EXPORTDIR src/main/databus/DUMPDATE
Datacleaning (sort -u & rapper): This script sorts, deduplicates and parses your data with the rapper tool.