Integration with Python

33 views
Skip to first unread message

Patrick Li

unread,
Nov 16, 2020, 11:17:44 PM11/16/20
to TopBraid Suite Users
Hi all,

I am trying to integrate the mapping file with Python because I want to implement the functions (like math functions or if functions in spinmap rules) created by TBC in Python, owlready2 was the one I was looking at, not sure if this package would do the job, the error message is shown below, it seems cannot read spinmapl.ttl 

owlready2.base.OwlReadyOntologyParsingError: Cannot download 'http://topbraid.org/spin/spinmapl'!  

If anyone has a clue to this? or maybe other python packages could do this job?

Thanks,
Patrick

Holger Knublauch

unread,
Nov 16, 2020, 11:28:09 PM11/16/20
to topbrai...@googlegroups.com

If an external library cannot download a namespace from the internet (e.g. because it really isn't there) then you may need to tell it about alternate local copies of these files. I don't know python libraries, and help for those libraries is outside of what this mailing list can cover, but I do know that other libraries such as Jena offer such redirects.

Note that in order to make sense of SPIN rules and functions you need an API that supports SPIN. From a quick look at owlready2 I don't get the impression that it does support SPIN.

Holger

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/67a44a11-0071-41f6-9404-8352c7299f6fn%40googlegroups.com.

richarddi...@gmail.com

unread,
Nov 17, 2020, 5:43:20 AM11/17/20
to TopBraid Suite Users
Holger is right about owlready2, it does not support SPIN. owlready is pure OWL base.
Use RDFlib to read any ttl file.

Hope this helps.

Patrick Li

unread,
Nov 17, 2020, 6:23:14 PM11/17/20
to TopBraid Suite Users
Hi,
Thanks for your replies, just checking up, if any package in python has an API supports SPINMAP functions? Just trying to make sense of these functions in Python. 

Thanks,
Patrick

richarddi...@gmail.com

unread,
Nov 19, 2020, 6:01:20 AM11/19/20
to TopBraid Suite Users
Hi Patrick,

For SPINMAP I do not know any Python library.
Sorry to ask but what is your ultimate goal? Exploring SPINMAP per se or mapping a relational database with other libraries like https://pypi.org/project/rdfizer/ .

Regards,
Richard
Reply all
Reply to author
Forward
0 new messages