Open rwst opened 3 years ago
v15.11.0
now offers to download the text version from EntitySchema (via the /wiki/Special:EntitySchemaText
, ex: https://www.wikidata.org/wiki/Special:EntitySchemaText/E233) by running wd data E233
.
I played with bit with the shex
module to see if that could be worth integrating or if there was a workflow to recommend, but I couldn't get this to work: shex-to-json -j https://www.wikidata.org/wiki/Special:EntitySchemaText/E233
aborting: Error: error parsing JSON https://www.wikidata.org/wiki/Special:EntitySchemaText/E233: SyntaxError: Unexpected token P in JSON at position 0
at parseShExJ (/some/project/node_modules/shex/lib/ShExLoader.js:274:14)
at /some/project/node_modules/shex/lib/ShExLoader.js:103:14
at tryCatcher (/some/project/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/some/project/node_modules/bluebird/js/main/promise.js:510:31)
at Promise._settlePromiseAt (/some/project/node_modules/bluebird/js/main/promise.js:584:18)
at Promise._settlePromises (/some/project/node_modules/bluebird/js/main/promise.js:700:14)
at Async._drainQueue (/some/project/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/some/project/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues (/some/project/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate (internal/timers.js:461:21)
Any clue on what's wrong?
Using this script:
from pyshexc.parser_impl.generate_shexj import generate
generate(['-nr', './E233'])
the file parses successfully and generates JSONLD, so it seems your parser does not do its job.
Wish for next year, make this more useful: