Giter Site home page Giter Site logo

No valid parser available. about shaclex HOT 7 CLOSED

him0 avatar him0 commented on August 25, 2024
No valid parser available.

from shaclex.

Comments (7)

labra avatar labra commented on August 25, 2024

Thanks for your report. Are you using the latest version in master? Because I got a different error.

Anyway, the problem is that the command line is trying to support both ShEx and SHACL. In this case, it seems that you want to validate using SHACL. To do so, you should add the option --engine SHACLEX

So the call should be:

run -d src/test/resources/shacl/core/example1.ttl --engine SHACLEX

Otherwise, at this moment, the default engine is ShEx and if you don't provide a schema, it tries to collect the schema from the RDF file, an option that has not been implemented yet for ShEx. In the future, if we agree on an RDF serialization for ShEx, it should be possible to incllude both the data and the schema in RDF, that's why I keep that option available.

Anyway, I will keep the issue open by now until I can revisit the documentation to add some explanation of this behaviour.

from shaclex.

labra avatar labra commented on August 25, 2024

I have changed the behaviour of the command line to return an empty ShEx schema when no schema is specified.

In the future, it would be better to have an RDF -> ShEx converter that can extract the schema from the RDF.

It was already implemented in ShExcala so it should not be difficult, although it would be better to define the translation in a standard way so all ShEx implementations used the same RDF vocabulary

from shaclex.

labra avatar labra commented on August 25, 2024

I close this issue because I have created a specific issue for ShEx RDF serialization at #8

from shaclex.

him0 avatar him0 commented on August 25, 2024

Thank you for response!

I'm using the latest version in master. I want to validate the RDF document with using shacl, but it still not work!

it seemed the option argument '-d' is not detected. Does this problem cause on only my environment?

$ sbt run -d src/test/resources/shacl/core/example1.ttl --engine SHACLEX
[residual] arg = 'src/test/resources/shacl/core/example1.ttl'
[residual] arg = '--engine'
[residual] arg = 'SHACLEX'
[residual] arg = 'run'
[residual] arg = 'src/test/resources/shacl/core/example1.ttl'
[residual] arg = '--engine'
[residual] arg = 'SHACLEX'
[process_args] java_version = '1.8.0_92'
# Executing command line:
java
-Xms1024m
-Xmx1024m
-XX:ReservedCodeCacheSize=128m
-XX:MaxMetaspaceSize=256m
-jar
/usr/local/Cellar/sbt/0.13.13/libexec/sbt-launch.jar
run
src/test/resources/shacl/core/example1.ttl
--engine
SHACLEX

[info] Loading project definition from /Users/user/src/shaclex/project/project
[info] Loading project definition from /Users/user/src/shaclex/project
[info] Set current project to shaclex (in build file:/Users/user/src/shaclex/)
[info] Running es.weso.shaclex.Main 
13:58:28.510 [run-main-0] INFO  es.weso.shaclex.Main$ - RDF Data option not specified
13:58:29.138 [run-main-0] INFO  es.weso.shaclex.Main$ - Schema not specified. Extracting schema from data
13:58:29.140 [run-main-0] WARN  es.weso.schema.ShExSchema - Not implemented conversion from RDF. Returns empty Schema

[success] Total time: 6 s, completed 2016/11/25 13:58:29
[error] No valid parser available.
[error] src/test/resources/shacl/core/example1.ttl
[error]     ^

from shaclex.

labra avatar labra commented on August 25, 2024

You need to add quotes to the run args command. Try this:

sbt "run -d src/test/resources/shacl/core/example1.ttl --engine SHACLEX"

from shaclex.

him0 avatar him0 commented on August 25, 2024

Thank you! It works! README shows the following 2 example commands.

sbt run -d examples/good1.ttl
sbt run -e ShEx -s examples/shex/good1.shex --schemaFormat ShExC -d examples/shex/good1.ttl

Shall I make the fix pull request?

from shaclex.

labra avatar labra commented on August 25, 2024

Ah, you are right. Of course, if you want to help doing the pull request, that would be great.

I also think I moved the SHACL examples to the folder examples/shacl/good1.ttl

Thanks for using Shaclex!

from shaclex.

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.