Slash escaping
Hello,
I'm using RDF Slice to run a query to DBpedia. The input file contains .nt files from here: http://downloads.dbpedia.org/2015-04/core-i18n/en/
However, the parser throws the error:
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: http:/downloads.dbpedia.org/2015-04/core-i18n/en/anchor-text_en.nt.bz2 (No such file or directory) at org.rdfslice.RDFSliceStreamEngine.run(RDFSliceStreamEngine.java:181) at org.rdfslice.RDFSlice.main(RDFSlice.java:134) Caused by: java.io.FileNotFoundException: http:/downloads.dbpedia.org/2015-04/core-i18n/en/anchor-text_en.nt.bz2 (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:124) at org.rdfslice.RDFSliceStreamEngine.run(RDFSliceStreamEngine.java:167) ... 1 more
Notice just one '/' whereas there are // in the input file. I tried several escaping combinations but the problem still occurs.
Any solutions?
Thanks.
Comments (5)
-
repo owner -
reporter Hello, thanks for the prompt reply!
The command:
java -jar rdfslice_1.6.jar -source input.txt -patterns "SELECT ?film ?prop ?value WHERE {?film a <http://dbpedia.org/ontology/Film>. ?film ?prop ?value}" -out out.nt -order S
Input.txt contains the next data:
http://downloads.dbpedia.org/2015-04/core-i18n/en/anchor-text_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/article-categories_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/article-templates_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/category-labels_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/disambiguations-unredirected_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/disambiguations_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/external-links_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/flickr-wrappr-links_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/freebase-links_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/genders_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/geo-coordinates_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/geonames_links_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/homepages_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/images_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/infobox-properties-unredirected_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/infobox-properties_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/infobox-property-definitions_en.nt.bz http://downloads.dbpedia.org/2015-04/core-i18n/en/instance-types-dbtax-dbo_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/instance-types-transitive_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/instance-types_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/instance_types_dbtax-dbo.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/instance_types_dbtax_ext.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/instance_types_lhd_dbo_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/instance_types_lhd_ext_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/instance_types_sdtyped-dbo_en.nt.bz2 http://downloads.dbpedia.org/2015-04/core-i18n/en/interlanguage-links-chapters_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/interlanguage-links_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/iri-same-as-uri_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/labels_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/long-abstracts_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/mappingbased-properties-errors-unredirected_en.nt.b http://downloads.dbpedia.org/2015-04/core-i18n/en/mappingbased-properties-unredirected_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/mappingbased-properties_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/out-degree_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/page-ids_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/page-length_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/page-links-unredirected_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/page-links_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/persondata-unredirected_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/persondata_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/pnd_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/redirects_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/revision-ids_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/revision-uris_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/short-abstracts_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/skos-categories_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/specific-mappingbased-properties_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/topical-concepts-unredirected_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/topical-concepts_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/transitive-redirects_en.nt.bz2
http://downloads.dbpedia.org/2015-04/core-i18n/en/wikipedia-links_en.nt.bz -
repo owner Hey...
This issue also affect version 1.5. Try to download the files and change the remote to local files. Another issue -S just helps if the files are sorted by subject, which is not the case of DBpedia files e.g. there are resources distributed among files.
What you can actually do is download them and use sort application (https://bitbucket.org/emarx/rdfslice/downloads/sorter.jar) to sort the their content in one file.
However, the issue should be solved in version 1.7 (coming soon)
best, Edgard
-
repo owner Hoi,
this issue might be caused by your antivirus, try to disable it while you are executing RDFSlice.
-
repo owner - changed status to resolved
Issue caused by an antivirus or firewall.
- Log in to comment
Hey, thanks!
Ca you post the command that you are using as well as the file?
best, Edgard