Hi,
I'm a researcher trying to do some information extraction tasks and tuple matching using NLP. Currently I'm facing problems when loading the rdf ontology file below:
onto = get_ontology("
https://www.omg.org/spec/EDMC-FIBO/BE/About-BE.rdf").load()
Problem: The ontologies defined in owl:imports are not imported.
Reason: Trailing slash / is removed and it causes the entity with trailing slash and the entity without trailing slash become two different entities, i.e.
https://www.omg.org/spec/EDMC-FIBO/BE/About-BE and
https://www.omg.org/spec/EDMC-FIBO/BE/About-BE/ are two different entities.
Solution: I've changed line 494 in namespace.py (for development version) from
if new_base_iri.endswith("#") or new_base_iri.endswith("/"):
to
if new_base_iri.endswith("#") :
and it works fine. I'm not sure if there will be more problems.
Another problem:
It can not handle empty ontology file(with only a \n):
http://www.omg.org/techprocess/ab/SpecificationMetadata/Solution: I've changed line 165 in driver.py (for development version) from
if not line.startswith("#"):
to
if not line.startswith("#") and not line.startswith("\n"):
In fact I'd like to raise a pull request but I find the unit tests provided in test folder are hard to pass. And I cannot find relevant development documents to make sure my modifications are correct.. Definitely I'm looking forward to making some contributions if possible.
Let me know if these modifications are correct and won't cause problems.
Thank you.
Best regards,
Hewen