Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 16 12:23

    github-actions[bot] on gh-pages

    Deploying to gh-pages from @ co… (compare)

  • Apr 16 12:16

    rubensworks on master

    Allow any parser options to be … (compare)

  • Apr 16 06:55
    rubensworks commented #814
  • Apr 16 06:53
    rubensworks labeled #814
  • Apr 16 06:53
    rubensworks labeled #814
  • Apr 16 06:53
    rubensworks labeled #814
  • Apr 16 06:53
    rubensworks commented #814
  • Apr 16 00:43
    github-actions[bot] commented #814
  • Apr 16 00:43
    rubensworks labeled #814
  • Apr 16 00:43
    alexkreidler opened #814
  • Apr 15 08:54
    rubensworks labeled #807
  • Apr 15 08:54
    rubensworks closed #807
  • Apr 14 14:02
    rubensworks closed #351
  • Apr 14 14:02
    rubensworks commented #351
  • Apr 14 14:02

    github-actions[bot] on gh-pages

    Deploying to gh-pages from @ co… (compare)

  • Apr 14 13:58
    github-actions[bot] commented #721
  • Apr 14 13:58
    rubensworks labeled #721
  • Apr 14 13:58
    rubensworks edited #721
  • Apr 14 13:57
    rubensworks closed #765
  • Apr 14 13:57
    rubensworks commented #765
aveltens
@aveltens:matrix.org
[m]
Perhaps this check rdflib is doing is not working with es6 classes getter for termType that appears to be present on quad.object
Ruben Taelman
@rubensworks
I'm actually surprised that doesn't work though. Any idea where this quad here originates from?
Based on the format and parser, different data factories may be used. So it's possible that a data factory defines termType in a weird way.
aveltens
@aveltens:matrix.org
[m]
Not sure exactly, it is some data extracted from html, I think RDFa
aveltens
@aveltens:matrix.org
[m]
I now switch back from comunica to using rdf-dereference (thanks to your quick support for microdata), and there I do not get this error, but another one:
literal.datatype.toCanonical is not a function
Ruben Taelman
@rubensworks
The error seems correct. toCanonical is not defined on Term according to the RDF/JS spec.
aveltens
@aveltens:matrix.org
[m]
This is a bug then in rdflibjs I guess
Ruben Taelman
@rubensworks
Heh, TIL :-)
That's from before my time even.
Something like this could probably be used as an alternative: https://github.com/rubensworks/rdf-string.js
But rdflib may already have some helper functions that could act as a workaround.
aveltens
@aveltens:matrix.org
[m]
Ruben Taelman
@rubensworks
Yes, but that's on Dataset-level.
aveltens
@aveltens:matrix.org
[m]

ah ok, right. So do you haven an idea how this line in rdflib should be fixed?

https://github.com/linkeddata/rdflib.js/blob/master/src/literal.ts#L110

if (!literal.datatype.equals(XSD.string)) {
      // Only add datatype if it's not a string
      str += '^^' + literal.datatype.toCanonical()
    }

do you think literal.datatype.toString() or literal.datatype.value should be sufficient? I am willing to provide a fix, but still not fully understanding what is going on and what should be done instead

Ruben Taelman
@rubensworks
.value should be ok I guess. But I'm also not that familiar with rdflib's codebase, so they may be expecting something else there (but seems unlikely).
aveltens
@aveltens:matrix.org
[m]

value alone is not enought, because the sourounding < > are missing then. I could hotfix it for now via

quads
        .on('data', (quad) => {
          if (quad.object.datatype) {
            quad.object.datatype.toCanonical = function () {
              return sym(this.value).toCanonical();
            };
          }
          store.add(quad);
        })

which is no optimal solution but allows me to move on for now. Will try to get an answer on rdflib or solidos channel

garpinc
@garpinc
Hey.. I'm attempting to read a trig file but I get back an empty result
any ideas?
C:\Users\garpi>comunica-sparql http://localhost/my.trig "SELECT * WHERE { ?s ?p ?o } LIMIT 100"
[]
And the trig file is just <test> {
<aresource> a <resourcetype>
}
should be pretty simple i'd think
garpinc
@garpinc
ttl works just fine so it seems to be a problem with trig
Ruben Taelman
@rubensworks
Have a look at the GRAPH clause from SPARQL, it allows you to select from named graphs.
garpinc
@garpinc
I know aout GRAPH clause but I didn't ask for the graph
It shouldn't require a GRAPH clause to return ?s ?p ?o
Martynas Jusevicius
@namedgraph_twitter
you asked for the default graph then
and there's no data in it
Ruben Taelman
@rubensworks
Yes it does. SPARQL by default only queries default graph.
Indeed ^
Martynas Jusevicius
@namedgraph_twitter
you might want plain Turtle instead of Trig
garpinc
@garpinc
ah.. understood..
Martynas Jusevicius
@namedgraph_twitter
if you're not using named graphs
garpinc
@garpinc
I thought graph clause would be wildcard if u didn't mention it
Martynas Jusevicius
@namedgraph_twitter
SELECT * WHERE { GRAPH ?g { ?s ?p ?o } } LIMIT 100
would get data from all graphs
garpinc
@garpinc
it definitely works if u do that
mehumaija
@mehumaija
Hello everyone! I am new to Comunica and trying to get through the tutorial for querying in a JavaScript app https://comunica.dev/docs/query/getting_started/query_app/ . I have called the following line C:\Program Files\nodejs>comunica-sparql "C:\Users\maikk\Documents\uni\BTR\thesis_test_query.js"
And I get a selection of options to proced, not the query results.
image.png
Do you know how should I call my .js file?
Because the tutorial doesn't really say how that should be done
Would really save my day if someone could help me :) Please and thank you
Ruben Taelman
@rubensworks
You'll probably want to invoke your script with node, not comunica-sparql.
mehumaija
@mehumaija
Ruben, thank you for answering! When I write node in front I encounter a different problem.
image.png
mehumaija
@mehumaija
cannot read on undefined. Does this mean that the query didn't give any results?
image.png
And in the problem above, I have removed 'await' from this line.
const result = await myEngine.query(`
When 'await' is in there I get this.
Does anyone know what is going on in there? I followed the tutorial and didn't add or remove anything that wasn't there.
Ruben Taelman
@rubensworks
Looks like a JavaScript error. You definitely need the await though. You might want to do a quick google to see why that doesn't work.