The Knowledge Graph Conference Icon
The Knowledge Graph Conference
  • 馃彔Home
  • 馃搮Events
  • 馃懁Members
  • 馃數Announcements
  • 馃數Ask
  • 馃數Ask The Ontologists
  • 馃數Events
  • 馃數Jobs
  • 馃數Promotions
  • 馃數Share
Powered by Tightknit
Ask
Ask

Suggestions for RDF Alternatives to SQLite with Python API

Avatar of Matthias S.Matthias S.
路Oct 06, 2023 09:49 AM

Hi, I am looking for something similar to SQLlite but for RDF. Any suggestions? (it is even better if there is a Python API that comes with it) I am looking at this project https://github.com/egerber/spaCy-entity-linker/. The authors are using an SQLite DB and I find the queries to retrieve Wikidata entities quite complex. I am wondering if we could not have the same approach with an RDF triple store. Any thoughts concerning the size limitations? For those interested, with a colleague (Marion S.), we started implementing an Ontology Learning python library as part of our PhDs: https://gitlab.insa-rouen.fr/msesboue/ontology-learning/-/tree/olms2?ref_type=heads It is still at a very early stage but we are always happy to have feedbacks and discussions 馃檪 Thanks.

馃敟1

8 comments

路 Sorted by Oldest
    • Avatar of Pierre Monnin
      Pierre Monnin
      路

      Hi! Have you checked out Corese? (https://project.inria.fr/corese/) it can be used to set up a SPARQL endpoint using RAM or disk persistence.

    • Avatar of Bob DuCharme
      Bob DuCharme
      路

      The free version of Ontotext's GraphDB triplestore include spaCy integration, which I wrote about in my personal blog at https://www.bobdc.com/blog/spacy/. (Full disclosure: I an an Ontotext employee.) I have often wished that there was an RDF equivalent of SQLite. If you want to use a Python API for something like that, the RDFlib python library may do nearly everything you need, including the storage of triples that you can then query with SPARQL.

    • Avatar of Matthias S.
      Matthias S.
      路

      Hi Pierre Monnin and Bob DuCharme, Thank you so much for your answers, I will definitly check that out. Bob DuCharme I love Ontotext, i am using it though I did not know they have an integration with spaCy, that is awesome, thnaks 馃檪 Pierre Monnin I know Corese and played a bit out with it. But I thouht it was a server like database. Does it work with an on-disk file in a serverless manner as well ?

    • Avatar of Pierre Monnin
      Pierre Monnin
      路

      Matthias S. It is a server like database but can be used w/o disk persistence (only RAM, loading a turtle/rdf+xml/... file). So it could correspond to a lightweight database in the sense of SQLite. But that needs to be confirmed w.r.t. to your specific requirements 馃檪

    • Avatar of Matthias S.
      Matthias S.
      路

      It looks very interesting, I will go check this out. Are you developing Corese or is it Remi still working on it? (Nice to see some Wimmics folks there by the way 馃檪 ) Thanks

    • Avatar of Pierre Monnin
      Pierre Monnin
      路

      Remi is the developer. I am just advertising his work 馃檪

    • Avatar of Ryan B.
      Ryan B.
      路

      What about https://owlready2.readthedocs.io/en/latest/onto.html?

      Owlready version 2 includes an optimized triplestore / quadstore, based on SQLite3. This quadstore is optimized both for performance and memory consumption. Contrary to version 1, Owlready2 can deal with big ontologies.

      It provides a Python API around an RDF triplestore that uses sqllite3 as the in-memory db. It鈥檚 been a very handy tool.

      馃憤1
    • Avatar of Matthias S.
      Matthias S.
      路

      Oh! Nice catch !! thanks Ryan B. I will definitly check this out 馃檪 thanks