Skip to content
Snippets Groups Projects
Commit c77c80d6 authored by Philipp Schneider's avatar Philipp Schneider
Browse files

Fixe error with wrong manuscript prefixes

parent 86596a97
No related branches found
No related tags found
No related merge requests found
...@@ -36,16 +36,27 @@ if __name__ == '__main__': ...@@ -36,16 +36,27 @@ if __name__ == '__main__':
# args = parser.parse_args()._get_kwargs()[0][1] # args = parser.parse_args()._get_kwargs()[0][1]
metadata_file = 'data/input/armorial_manuscripts_summary.xlsx' metadata_file = 'data/input/armorial_manuscripts_summary.xlsx'
kg_file = 'data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.ttl' #kg_file = 'data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.ttl'
kg_file = 'data/rdf-output/test-dataset/knowledge-graph-representation-test-dataset.ttl'
object_ontology_file = 'data/ontologies/digital-heraldry-ontology-object.ttl' object_ontology_file = 'data/ontologies/digital-heraldry-ontology-object.ttl'
# output_files = [
# {
# "output_file": "data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.ttl",
# "file_format": "turtle"
# },
# {
# "output_file": "data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.jsonld",
# "file_format": "json-ld"
# }
# ]
output_files = [ output_files = [
{ {
"output_file": "data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.ttl", "output_file": "data/rdf-output/test-dataset/knowledge-graph-object-test-dataset.ttl",
"file_format": "turtle" "file_format": "turtle"
}, },
{ {
"output_file": "data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.jsonld", "output_file": "data/rdf-output/test-dataset/knowledge-graph-object-test-dataset.jsonld",
"file_format": "json-ld" "file_format": "json-ld"
} }
] ]
...@@ -108,7 +119,7 @@ if __name__ == '__main__': ...@@ -108,7 +119,7 @@ if __name__ == '__main__':
manuscript_id = str(subject).split('#')[1] manuscript_id = str(subject).split('#')[1]
manuscript_id = manuscript_id.split('-')[0] manuscript_id = manuscript_id.split('-')[0]
manuscript_uri = URIRef(dho_obj_n + 'MS' + manuscript_id) manuscript_uri = URIRef(dho_obj_n + manuscript_id)
print(manuscript_uri) print(manuscript_uri)
...@@ -116,8 +127,10 @@ if __name__ == '__main__': ...@@ -116,8 +127,10 @@ if __name__ == '__main__':
# Serialize the prepared graph # Serialize the prepared graph
print('Serialilzing representation graph...') print('Serialilzing representation graph...')
g.serialize(destination='data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.ttl', format='ttl') # g.serialize(destination='data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.ttl', format='ttl')
g.serialize(destination='data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.jsonld', format='json-ld') # g.serialize(destination='data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.jsonld', format='json-ld')
g.serialize(destination='data/rdf-output/test-dataset/knowledge-graph-representation-test-dataset.ttl', format='ttl')
g.serialize(destination='data/rdf-output/test-dataset/knowledge-graph-representation-test-dataset.jsonld', format='json-ld')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment