Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    white_gecko
    @white_gecko:matrix.org
    [m]
    Also there is some activity in improving the performance of th rdflib
    Iwan Aucamp
    @aucampia
    recommendation of rdf4j and jena is not meant to be disparaging of rdflib, I also use rdflib mostly because most of the time I don't want to struggle with JVM and JVM does not have pip, pipx, etc - just don't want people to not use RDF because of a performance concern of rdflib
    rdflib is awesome for what it is
    but if I were to build something production grade that needs good performance I would use Jena or RDF4J
    I think the best hope is to find more commercial applications for RDF
    The more commercial use the more funding and more contributions
    But if universities were better actors in the ecosystem it would help, if they instead direct resources to maintaining existing stuff instead of making yet another research project that will be abandoned it would be very beneificial
    Iwan Aucamp
    @aucampia
    I am going to submit a fix for tox this weekend, and then also submit changes to add mypy to CI pipeline (and eventually to tox) - hope it is well received. I will also try and make CONTRIBUTING.md similar to this: https://github.com/pallets/click/blob/main/CONTRIBUTING.rst
    better to have that in Repo IMO
    white_gecko
    @white_gecko:matrix.org
    [m]
    @aucampia: If you are planning to invest more time in performing big changes or something alike, we can also try to schedule a call with @ashleysommer and Nicholas to so how we can best organize this.
    Iwan Aucamp
    @aucampia
    I am open to it, I want to help where I can but I don't really have dedicated time for it. For me it is easier to navigate the code base with type annotations. Besides this I am just looking at small issues to try and get a better understanding of the code base. I will look at the backlog for 6.0.0 where I can, some of it looks quite complicated, the RDF 1.1. test suite looks like a decent thing to try do and not that complicated, but I have not quite built up the courage for starting on that. Actual bug I will look at next is RDFLib/rdflib#1228
    Iwan Aucamp
    @aucampia
    what is best is to just make sure milestone backlog is current and prioritized
    But I think that is the case, or have no reason to think it is not the case
    Iwan Aucamp
    @aucampia
    I don't think this is still current: RDFLib/rdflib#556
    white_gecko
    @white_gecko:matrix.org
    [m]
    Did you test this?
    Iwan Aucamp
    @aucampia
    no but it does not inherit from unicode anymore, though the original problem may still be present yes
    Iwan Aucamp
    @aucampia
    does @nicholascar come here?
    1 reply
    If there are any PRs you want me to review I can have a look, I keep an eye out for small and easy ones where I have some knowledge about the implementation but the more complex ones I won't necessarily review unless someone makes an explicit request
    remi.chateauneu
    @remi.chateauneu:matrix.org
    [m]
    Test
    Iwan Aucamp
    @aucampia
    Hi Remi
    bridge works well
    Thanks for review BTW
    iwan.aucamp
    @iwan.aucamp:matrix.org
    [m]
    Maybe we can bridge this with IRC somehow
    Iwan Aucamp
    @aucampia
    There is about 10 seconds lag between matrix and gitter though
    remi.chateauneu
    @remi.chateauneu:matrix.org
    [m]
    ok
    white_gecko
    @white_gecko:matrix.org
    [m]
    Which matrix room did you bridge? Am I in the gitter room or in the native matrix room?
    Iwan Aucamp
    @aucampia
    This is the gitter room, not the native matrix room
    noting is bridged other than through automatic bridges
    white_gecko
    @white_gecko:matrix.org
    [m]
    Ah ok, I understand.
    Avy Faingezicht
    @avyfain
    Does anyone have code snippets/patterns to share on how to properly deal with reification in rdflib? I'm planning to use python + rdflib to create a graph from a few sources, and I am planning to use reification for provenance (learned fact X from source Y) as well as for temporality (X worked at Y since Z). I found it odd that there was nothing about that in the docs
    Iwan Aucamp
    @aucampia
    Presumably this is not RDF* reificiation?
    If it is not RDF* then there is no specific language support
    or library support
    Well there is no specific RDF* support either
    I will try make an example though on using RDF 1.1 recommendation for reification (i.e. rdf:Statement IIRC)
    CC: @avyfain
    Iwan Aucamp
    @aucampia
    will only look at it tonight though
    4 replies
    Avy Faingezicht
    @avyfain

    Thanks @aucampia! I am starting from scratch here, so if RDF* was available then I'd probably go with that since it's the next big standard, but just good old RDF 1.1 would be ok

    import rdflib
    from rdflib.namespace import RDF
    
    lit2019 = rdflib.Literal('2019-01-01', datatype=rdflib.XSD.date)
    lit2020 = rdflib.Literal('2020-01-01', datatype=rdflib.XSD.date)
    
    bob = rdflib.URIRef("http://example.org/people/Bob")
    google = rdflib.URIRef("http://example.org/companies/Google")
    workedAt = rdflib.URIRef("http://example.org/stuff/0.1/workedAt")
    startTime = rdflib.URIRef("http://example.org/stuff/0.1/startTime")
    endTime = rdflib.URIRef("http://example.org/stuff/0.1/endTime")
    
    g = rdflib.Graph()
    
    position = (bob, workedAt, google)
    reified_position = (position, RDF.type, RDF.Statement)
    
    g.add(position)
    g.add(reified_position)
    g.add((reified_position, startTime, lit2019))

    I tried running this but can't add that second triple, I guess I'd have to make it a BNode?

    hope that helps
    Iwan Aucamp
    @aucampia
    I updated it to schema.org instead
    will maybe share it on stackoverflow also
    though not sure it is extremely idomatic
    Iwan Aucamp
    @aucampia
    An example with http://www.ontotext.com/proton/protontop.html#Statement may be more idiomatic
    Avy Faingezicht
    @avyfain
    That's super helpful, yeah! Thanks a lot Iwan! I'm pretty new to the semantic web side of things, so still picking up on the right patterns/namespaces/etc. I'll play around with this some more and maybe after a bit I can share where I end up
    Iwan Aucamp
    @aucampia
    Ask if you need more help, will help when I can
    Always glad to have more people using it :)
    Another great place to ask for help in general is https://gitter.im/linkeddata/chat - but that is just general semantic web and not rdflib specific
    joylix
    @joylix
    Does rdflib support RDF-star and SPARQL-star now?
    Iwan Aucamp
    @aucampia
    @joylix not yet AFAIK see RDFLib/rdflib#955