Then, if it looks like a bug, report it to GitHub.

On Tue, Aug 6, 2019, 01:05 Kristina <[email protected]> wrote:

> Am Donnerstag, 1. August 2019 15:01:42 UTC+2 schrieb Sergio Fernández:
> > What do you have defined as @base?
> >
> >
> > https://w3c.github.io/json-ld-syntax/#base-iri
> >
> >
> >
> > That would be used by RDFLib to parse your file.
> >
> >
> >
> >
> > On Thu, Aug 1, 2019, 05:56 Kristina <[email protected]> wrote:
> > Hello,
> >
> >
> >
> > my ontology is written in JSON-LD. I use RDFLib to parse it and prepared
> Query for SPARQL. So far, it works fine.
> >
> >
> >
> > But then I analyzed the SPARQL results and noticed that the namespace
> was "manipulated" by RDFLib. For example, in the ontology an instance is
> defined as "http://my-ontology-space#mySubject"; and in the SPARQL results
> was "http://my-ontology-space/#mySubject'}". Not only in SPARQL, but also
> by printing the entire graph.
> >
> >
> >
> > Where the "/" comes from?
> >
> >
> >
> > I used an ontology IRI (spoken in Protege terms) defined as:
> >
> > {
> >
> >   "@id" : "http://my-ontology-space";,
> >
> >   "@type" : [ "http://www.w3.org/2002/07/owl#Ontology"; ],....}
> >
> >
> >
> > And I also tried with "http://my-ontology-space#";, unfortunately with
> the same result.
> >
> >
> >
> > There is also a problem with DatatypeProperty. This results in "
> http://my-ontology-space/.#topic";, even it defined in the ontology as:
> >
> >
> >
> > {
> >
> >   "@id" : "http://my-ontology-space#topic";,
> >
> >   "@type" : [ "http://www.w3.org/2002/07/owl#DatatypeProperty"; ]
> >
> > }
> >
> >
> >
> > Interesting, that imported ontologies using # (e.g. "
> http://www.w3.org/2002/07/owl#NamedIndividual";) are not "manipulated" by
> RDFlib.
> >
> >
> >
> > However, the namespace with # is not recognized correctly during the
> graph parsing.
> >
> >
> >
> > g = Graph()
> >
> > g.parse("temp.owl", format="json-ld")
> >
> > for s, p, o in g:
> >
> >     print (s, p, o)
> >
> >
> >
> > Is there any workaround? Bugfix or feature?
> >
> > Again, where the "/" and "/." comes from?
> >
> > How is it possible to use namespaces/prefixes with ending #?
> >
> >
> >
> > Thank you for any advice!
> >
> > Kristina
> >
> >
> >
> > --
> >
> > http://github.com/RDFLib
> >
> > ---
> >
> > You received this message because you are subscribed to the Google
> Groups "rdflib-dev" group.
> >
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> >
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/rdflib-dev/a3fea92b-0be5-4084-9190-cbba8053c722%40googlegroups.com
> .
>
> Hi Sergio,
>
> here is an update: I did some tests using https://json-ld.org/playground/
> to create different formats of JSON-LD(expanded, compacted, flattened) and
> RDFlib for SPARQL query (
> https://rdflib.readthedocs.io/en/stable/intro_to_sparql.html).
> The result is my tests: the namespace is not recognized well in expanded
> JSON-LD (see my first post); no results returned in compacted and flattened
> JSON-LD files with defined context.
>
> It seems to be a bug in RDFLib or do you have any working examples or
> further tipps for me?
>
> Thanks!
>
>
>
>
>
>
> --
> http://github.com/RDFLib
> ---
> You received this message because you are subscribed to the Google Groups
> "rdflib-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rdflib-dev/fe39d9fc-d407-45b3-b341-5d12d08de90a%40googlegroups.com
> .
>

-- 
http://github.com/RDFLib
--- 
You received this message because you are subscribed to the Google Groups 
"rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rdflib-dev/CAKZ-WGcH0MnnnRx3w-z1-StgZTzYn64BGrCNz_rQGXHoWdVxdA%40mail.gmail.com.

Reply via email to