i40-Tools / OntEnrich

Application for knowledge graph enrichment through linking with DBpedia.
MIT License
1 stars 0 forks source link

OntEnrich

Application for knowledge graph enrichment through linking with DBpedia.

Setup

pip install requirements.txt

or

python -m pip install requirements.txt

Usage

For enriching the ontology, first specify all the properties in the options.json file:

Name Description Example
input_file Path to the ontology in .ttl fromat "ttl/sto.ttl"
whitelist List of predicates to fetch from DBpedia while enriching [ "<http://purl.org/dc/terms/subject>" ]
blacklist List of predicates to exclude from enrichment process [ "http://purl.org/voc/vrank#hasRank" ]
prefixes List of prefixes to assign to the resulting ontology [ { "prfx": "deo", "uri": "http://purl.org/spar/deo/" } ]

Next, execute enrich.py with options.json as a parameter:

python enrich.py options.json

Example

Using a Turtle format of the Standard Ontology (STO) as an input without specifying whitelist and blacklist in the options.json, i.e., fetching all reachable data from DBpedia, the following results can be achieved:

# of DBpedia links # of added triples
78 8268

You can check out the input and the resulting file here.

License

MIT License. Copyright (c) 2018 Maxim Maltsev.