is owlready for me?

classic Classic list List threaded Threaded
7 messages Options
ssn
Reply | Threaded
Open this post in threaded view
|

is owlready for me?

ssn
I am trying to create a search engine based on an ontology. I created my onto from web protege and downloaded the owl. can I use owlready for querying on that purpose? If yes, can you suggest few examples?
Reply | Threaded
Open this post in threaded view
|

Re: is owlready for me?

Jiba
Administrator
Hi,

I think you can use Owlready, using either the search() method or SPARQL.

For full-text search, please see :

https://owlready2.readthedocs.io/en/latest/annotations.html#full-text-search-fts

I sucessfully used it for designing a search engine on DBpedia.

Best regards,
Jiba
SSN
Reply | Threaded
Open this post in threaded view
|

Re: is owlready for me?

SSN
I used owlrerady2 with python 3.7, the package is available in the project interpreter.

Even I checked it locally as well as using "pip list" command. All fine.

The importing gives no error, but when I run it gives the error

 File "C:/Users/Shavindya/Desktop/FYP/ProjList/1.1/ontoConnection.py", line 1, in <module>
    from owlready2 import *
ModuleNotFoundError: No module named 'owlready2'
Reply | Threaded
Open this post in threaded view
|

Re: is owlready for me?

Jiba
Administrator
Hi,

I you sure that you installed "owlready2", and not "owlready" (previous version)?

Can you verify that you have a file named python3.7/site-packages/owlready2/__init__.py in your Python installation ?

Best regards,
Jiba
SSN
Reply | Threaded
Open this post in threaded view
|

Re: is owlready for me?

SSN
Yes, the file is there. I checked it twice!
Reply | Threaded
Open this post in threaded view
|

Re: is owlready for me?

Jiba
Administrator
So possibly Python does not search at the right place ?

Maybe you can these solutions:

* add the directory containing the owlready2/ directory in you Python path:

import sys
sys.path.append("/path/to/python3.7/site-packages") # Put your path here

from owlready2 import *

* You can also use Owlready without installing it: just rename the Owlready2-0.13 directory to "owlready2" and put the  * parent *  directory in the Python path (with sys.path as above).

Jiba
SSN
Reply | Threaded
Open this post in threaded view
|

Re: is owlready for me?

SSN
Thank you! This solved my error in imports.