Giter Site home page Giter Site logo

Comments (6)

debarghadas411 avatar debarghadas411 commented on June 1, 2024

This problem is not of pySHACL but rdfLib library as rdfLib processes the shape file into rdf graph and during that processing, it is decoding the regular expression which is essentially the problem you are referring to

from pyshacl.

ashleysommer avatar ashleysommer commented on June 1, 2024

Hi @James-Hudson3010
Sorry I didn't see this Issue come through, I only got notification when @debarghadas411 commented on it.
Yes, it is a problem with the .ttl parser in rdflib. Can you try this?:
sh:pattern ".*\\.txt" .

from pyshacl.

James-Hudson3010 avatar James-Hudson3010 commented on June 1, 2024

That does appear to work.

It this a bug that should be reported to RDFLib then? Or, should this be considered expected behavior?

from pyshacl.

debarghadas411 avatar debarghadas411 commented on June 1, 2024

I feel its a bug because sh:pattern ".*\\.txt" adds an extra escape character which should not be the case. sh:pattern should have a normal regular expression as object

from pyshacl.

bhavya17037 avatar bhavya17037 commented on June 1, 2024

You can use another escape character after the '*', like mentioned above
something like:
.*\\.txt

from pyshacl.

ashleysommer avatar ashleysommer commented on June 1, 2024

Issue was closed in pyshacl.
This is a turtle spec problem. and we can't change the turtle spec to allow new escape sequences.
The solution provided above is the correct solution for this problem.

from pyshacl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.