Skip to content

Commit

Permalink
feat: support rml and ontology formats including: Turtle, N-Triples, …
Browse files Browse the repository at this point in the history
…N-Quads, Trig, Trix, RDF/XML, JSON-LD, Notation-3
  • Loading branch information
xuemduan committed Nov 11, 2024
1 parent 9d0e0e9 commit a9174bb
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fastapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,10 @@ async def translate(request_data: TranslationRequest):

if request_data.owlData != []:
for index, data in enumerate(request_data.owlData):
print("Start loading ontology")
g, rdf_format = load_rdf_graph(data)
print(f"Detected RDF format: {rdf_format}")
if rdf_format:
print("Here")
owl_file = os.path.join(inputowl_folder, f"owl{index}.ttl")
print(f"OWL file: {owl_file}")
g.serialize(destination=owl_file, format='ttl')
print("Ontology loaded")
else:
# unrecognized format
return JSONResponse(content={"error": "Invalid Ontology format"}, status_code=400)
Expand Down

0 comments on commit a9174bb

Please sign in to comment.