Re: [Virtuoso-users] Virtuoso SPARQL tab separated results with language tags and dataypes

2018-08-22 Thread Peter F. Patel-Schneider
Yes, that has the language tag side.  There is also the datatype side that
would be shown with Work/runtime.

peter


On 08/22/2018 10:08 AM, Kingsley Idehen wrote:
> On 8/22/18 12:01 PM, Peter F. Patel-Schneider wrote:
>> More or less, except that CSV output doesn't include language tags and 
>> doesn't
>> provide facilities for anything other than numeric and string literal values.
>> TSV format, on the other hand, does include language tags (shown explicitly 
>> in
>> an example) and datatypes (implied by wording in several places, particularly
>> "The SPARQL Results TSV Results Format does encode the details of RDF terms 
>> in
>> the results table by using the syntax that SPARQL [SPARQL11-QUERY] and Turtle
>> [TURTLE] use. An application receiving a TSV-encoded results set can split
>> each line into elements of the result row, and extract all the details it
>> wishes to process of the RDF terms by simple string processing, without a
>> complete XML or JSON parser required by the more complex SPARQL result 
>> formats.).
>>
>> So it's not a problem with the CSV output but instead with the TSV output.
>>
>> (I would be happy to have a variant of CSV that included language tags and
>> datatypes, but conforming to the requirements of TSV output would be better.)
>>
>> peter
> 
> Okay, so the following shows the problem, right?
> 
> http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Ftab-separated-values=3
> 
> I am purposely using doc URIs as this helps the entire problem
> confirmation and resolution cycle.
> 
> 
> Kingsley
> 
> 
> 
>>
>>
>> On 08/22/2018 08:51 AM, Kingsley Idehen wrote:
>>> On 8/22/18 11:43 AM, Peter F. Patel-Schneider wrote:
 Try

 curl http://dbpedia.org/sparql --get   --header "Accept:
 text/tab-separated-values"  --data-urlencode query@- <>>> select * where {  ?p ?o }
 EOF

 Note that Work/runtime doesn't have a datatype and the labels don't have a
 language tag even though 
 https://www.w3.org/TR/sparql11-results-csv-tsv/#tsv
 requires them.  As well, IRIs are enclosed in "" instead of <>.

 Then try the same query on the web interface at https://dbpedia.org/sparql.
 There the datatypes and languages tags do show up.  However, there are some
 langStrings without language tags there.


 I'm also running into the same problem with a locally installed Virtuoso 
 open
 source 7.2.5.

 peter
>>>
>>> HTML-based SPARQL Results doc:
>>>
>>> http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fhtm=3
>>>
>>> CSV-based SPARQL Results doc:
>>>
>>> http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fcsv=3
>>>
>>>
>>> I believe that demonstrates the problem re missing lang tags in the CSV
>>> output, right?
>>>
>>> -- 
>>> Regards,
>>>
>>> Kingsley Idehen   
>>> Founder & CEO 
>>> OpenLink Software   (Home Page: http://www.openlinksw.com)
>>>
>>> Weblogs (Blogs):
>>> Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
>>> Blogspot Blog: http://kidehen.blogspot.com
>>> Medium Blog: https://medium.com/@kidehen
>>>
>>> Profile Pages:
>>> Pinterest: https://www.pinterest.com/kidehen/
>>> Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
>>> Twitter: https://twitter.com/kidehen
>>> Google+: https://plus.google.com/+KingsleyIdehen/about
>>> LinkedIn: http://www.linkedin.com/in/kidehen
>>>
>>> Web Identities (WebID):
>>> Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
>>> : 
>>> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
>>>
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
> 
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> 
> 
> 
> ___
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> 


Re: [Virtuoso-users] Virtuoso SPARQL tab separated results with language tags and dataypes

2018-08-22 Thread Peter F. Patel-Schneider
That kind of solution is probably going to work for me for the short term, but
I don't know whether it will work in general.

peter


On 08/22/2018 08:58 AM, Hugh Williams wrote:
> Hi Peter,
> 
> How about something like:
> 
>   curl http://dbpedia.org/sparql --get  --data-urlencode "format=csv"  
> --data-urlencode 'query=select ?p ?o datatype(?o) as ?datatype lang(?o) as 
> ?lang where {  ?p ?o }’
> 
> where output is presented in CSV format ?
> 
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc.  //  http://www.openlinksw.com/
> Weblog   -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter  -- http://twitter.com/OpenLink
> Google+  -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
> 
> 
> 
>> On 22 Aug 2018, at 16:43, Peter F. Patel-Schneider  
>> wrote:
>>
>> Try
>>
>> curl http://dbpedia.org/sparql --get   --header "Accept:
>> text/tab-separated-values"  --data-urlencode query@- <> select * where {  ?p ?o }
>> EOF
>>
>> Note that Work/runtime doesn't have a datatype and the labels don't have a
>> language tag even though https://www.w3.org/TR/sparql11-results-csv-tsv/#tsv
>> requires them.  As well, IRIs are enclosed in "" instead of <>.
>>
>> Then try the same query on the web interface at https://dbpedia.org/sparql.
>> There the datatypes and languages tags do show up.  However, there are some
>> langStrings without language tags there.
>>
>>
>> I'm also running into the same problem with a locally installed Virtuoso open
>> source 7.2.5.
>>
>> peter
>>
>>
>>
>>
>>
>>
>> On 08/22/2018 08:15 AM, Kingsley Idehen wrote:
>>> On 8/22/18 10:24 AM, Peter F. Patel-Schneider wrote:
 I was hoping to be able to get the SPARQL TSV results format in
 https://www.w3.org/TR/sparql11-results-csv-tsv/

 I can probably limp along with explicit language tags and datatypes but 
 that's
 a pain to process.

 peter
>>>
>>> Hi Peter,
>>>
>>> Please share a SPARQL Query Results doc URI that illustrates your
>>> problem. Then, if fixable, we can reply in kind with a URI that
>>> demonstrates the fix. 
>>>
>>>
>>>
>>>
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>
>>>
>>>
>>> ___
>>> Virtuoso-users mailing list
>>> Virtuoso-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>>
>>
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso SPARQL tab separated results with language tags and dataypes

2018-08-22 Thread Kingsley Idehen
On 8/22/18 12:01 PM, Peter F. Patel-Schneider wrote:
> More or less, except that CSV output doesn't include language tags and doesn't
> provide facilities for anything other than numeric and string literal values.
> TSV format, on the other hand, does include language tags (shown explicitly in
> an example) and datatypes (implied by wording in several places, particularly
> "The SPARQL Results TSV Results Format does encode the details of RDF terms in
> the results table by using the syntax that SPARQL [SPARQL11-QUERY] and Turtle
> [TURTLE] use. An application receiving a TSV-encoded results set can split
> each line into elements of the result row, and extract all the details it
> wishes to process of the RDF terms by simple string processing, without a
> complete XML or JSON parser required by the more complex SPARQL result 
> formats.).
>
> So it's not a problem with the CSV output but instead with the TSV output.
>
> (I would be happy to have a variant of CSV that included language tags and
> datatypes, but conforming to the requirements of TSV output would be better.)
>
> peter

Okay, so the following shows the problem, right?

http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Ftab-separated-values=3

I am purposely using doc URIs as this helps the entire problem
confirmation and resolution cycle.


Kingsley



>
>
> On 08/22/2018 08:51 AM, Kingsley Idehen wrote:
>> On 8/22/18 11:43 AM, Peter F. Patel-Schneider wrote:
>>> Try
>>>
>>> curl http://dbpedia.org/sparql --get   --header "Accept:
>>> text/tab-separated-values"  --data-urlencode query@- <>> select * where {  ?p ?o }
>>> EOF
>>>
>>> Note that Work/runtime doesn't have a datatype and the labels don't have a
>>> language tag even though https://www.w3.org/TR/sparql11-results-csv-tsv/#tsv
>>> requires them.  As well, IRIs are enclosed in "" instead of <>.
>>>
>>> Then try the same query on the web interface at https://dbpedia.org/sparql.
>>> There the datatypes and languages tags do show up.  However, there are some
>>> langStrings without language tags there.
>>>
>>>
>>> I'm also running into the same problem with a locally installed Virtuoso 
>>> open
>>> source 7.2.5.
>>>
>>> peter
>>
>> HTML-based SPARQL Results doc:
>>
>> http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fhtm=3
>>
>> CSV-based SPARQL Results doc:
>>
>> http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fcsv=3
>>
>>
>> I believe that demonstrates the problem re missing lang tags in the CSV
>> output, right?
>>
>> -- 
>> Regards,
>>
>> Kingsley Idehen
>> Founder & CEO 
>> OpenLink Software   (Home Page: http://www.openlinksw.com)
>>
>> Weblogs (Blogs):
>> Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
>> Blogspot Blog: http://kidehen.blogspot.com
>> Medium Blog: https://medium.com/@kidehen
>>
>> Profile Pages:
>> Pinterest: https://www.pinterest.com/kidehen/
>> Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
>> Twitter: https://twitter.com/kidehen
>> Google+: https://plus.google.com/+KingsleyIdehen/about
>> LinkedIn: http://www.linkedin.com/in/kidehen
>>
>> Web Identities (WebID):
>> Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
>> : 
>> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
>>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>

-- 
Regards,

Kingsley Idehen   
Founder & CEO 
OpenLink Software   (Home Page: http://www.openlinksw.com)

Weblogs (Blogs):
Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
Blogspot Blog: http://kidehen.blogspot.com
Medium Blog: https://medium.com/@kidehen

Profile Pages:
Pinterest: https://www.pinterest.com/kidehen/
Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
Twitter: https://twitter.com/kidehen
Google+: https://plus.google.com/+KingsleyIdehen/about
LinkedIn: http://www.linkedin.com/in/kidehen

Web Identities (WebID):
Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
: 
http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this




smime.p7s
Description: S/MIME Cryptographic 

Re: [Virtuoso-users] Virtuoso SPARQL tab separated results with language tags and dataypes

2018-08-22 Thread Peter F. Patel-Schneider
More or less, except that CSV output doesn't include language tags and doesn't
provide facilities for anything other than numeric and string literal values.
TSV format, on the other hand, does include language tags (shown explicitly in
an example) and datatypes (implied by wording in several places, particularly
"The SPARQL Results TSV Results Format does encode the details of RDF terms in
the results table by using the syntax that SPARQL [SPARQL11-QUERY] and Turtle
[TURTLE] use. An application receiving a TSV-encoded results set can split
each line into elements of the result row, and extract all the details it
wishes to process of the RDF terms by simple string processing, without a
complete XML or JSON parser required by the more complex SPARQL result 
formats.).

So it's not a problem with the CSV output but instead with the TSV output.

(I would be happy to have a variant of CSV that included language tags and
datatypes, but conforming to the requirements of TSV output would be better.)

peter


On 08/22/2018 08:51 AM, Kingsley Idehen wrote:
> On 8/22/18 11:43 AM, Peter F. Patel-Schneider wrote:
>> Try
>>
>> curl http://dbpedia.org/sparql --get   --header "Accept:
>> text/tab-separated-values"  --data-urlencode query@- <> select * where {  ?p ?o }
>> EOF
>>
>> Note that Work/runtime doesn't have a datatype and the labels don't have a
>> language tag even though https://www.w3.org/TR/sparql11-results-csv-tsv/#tsv
>> requires them.  As well, IRIs are enclosed in "" instead of <>.
>>
>> Then try the same query on the web interface at https://dbpedia.org/sparql.
>> There the datatypes and languages tags do show up.  However, there are some
>> langStrings without language tags there.
>>
>>
>> I'm also running into the same problem with a locally installed Virtuoso open
>> source 7.2.5.
>>
>> peter
> 
> 
> HTML-based SPARQL Results doc:
> 
> http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fhtm=3
> 
> CSV-based SPARQL Results doc:
> 
> http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fcsv=3
> 
> 
> I believe that demonstrates the problem re missing lang tags in the CSV
> output, right?
> 
> -- 
> Regards,
> 
> Kingsley Idehen 
> Founder & CEO 
> OpenLink Software   (Home Page: http://www.openlinksw.com)
> 
> Weblogs (Blogs):
> Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
> Blogspot Blog: http://kidehen.blogspot.com
> Medium Blog: https://medium.com/@kidehen
> 
> Profile Pages:
> Pinterest: https://www.pinterest.com/kidehen/
> Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
> Twitter: https://twitter.com/kidehen
> Google+: https://plus.google.com/+KingsleyIdehen/about
> LinkedIn: http://www.linkedin.com/in/kidehen
> 
> Web Identities (WebID):
> Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
> : 
> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
> 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso SPARQL tab separated results with language tags and dataypes

2018-08-22 Thread Kingsley Idehen
On 8/22/18 11:43 AM, Peter F. Patel-Schneider wrote:
> Try
>
> curl http://dbpedia.org/sparql --get   --header "Accept:
> text/tab-separated-values"  --data-urlencode query@- < select * where {  ?p ?o }
> EOF
>
> Note that Work/runtime doesn't have a datatype and the labels don't have a
> language tag even though https://www.w3.org/TR/sparql11-results-csv-tsv/#tsv
> requires them.  As well, IRIs are enclosed in "" instead of <>.
>
> Then try the same query on the web interface at https://dbpedia.org/sparql.
> There the datatypes and languages tags do show up.  However, there are some
> langStrings without language tags there.
>
>
> I'm also running into the same problem with a locally installed Virtuoso open
> source 7.2.5.
>
> peter


HTML-based SPARQL Results doc:

http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fhtm=3

CSV-based SPARQL Results doc:

http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org=select+distinct+%3Flabel+lang%28%3Flabel%29+as+%3FlangTag%0D%0A+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F31_June%3E+rdfs%3Alabel+%3Flabel+%7D=text%2Fcsv=3


I believe that demonstrates the problem re missing lang tags in the CSV
output, right?

-- 
Regards,

Kingsley Idehen   
Founder & CEO 
OpenLink Software   (Home Page: http://www.openlinksw.com)

Weblogs (Blogs):
Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
Blogspot Blog: http://kidehen.blogspot.com
Medium Blog: https://medium.com/@kidehen

Profile Pages:
Pinterest: https://www.pinterest.com/kidehen/
Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
Twitter: https://twitter.com/kidehen
Google+: https://plus.google.com/+KingsleyIdehen/about
LinkedIn: http://www.linkedin.com/in/kidehen

Web Identities (WebID):
Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
: 
http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this



smime.p7s
Description: S/MIME Cryptographic Signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso SPARQL tab separated results with language tags and dataypes

2018-08-22 Thread Kingsley Idehen
On 8/22/18 10:24 AM, Peter F. Patel-Schneider wrote:
> I was hoping to be able to get the SPARQL TSV results format in
> https://www.w3.org/TR/sparql11-results-csv-tsv/
>
> I can probably limp along with explicit language tags and datatypes but that's
> a pain to process.
>
> peter

Hi Peter,

Please share a SPARQL Query Results doc URI that illustrates your
problem. Then, if fixable, we can reply in kind with a URI that
demonstrates the fix. 


-- 
Regards,

Kingsley Idehen   
Founder & CEO 
OpenLink Software   (Home Page: http://www.openlinksw.com)

Weblogs (Blogs):
Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
Blogspot Blog: http://kidehen.blogspot.com
Medium Blog: https://medium.com/@kidehen

Profile Pages:
Pinterest: https://www.pinterest.com/kidehen/
Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
Twitter: https://twitter.com/kidehen
Google+: https://plus.google.com/+KingsleyIdehen/about
LinkedIn: http://www.linkedin.com/in/kidehen

Web Identities (WebID):
Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
: 
http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this




smime.p7s
Description: S/MIME Cryptographic Signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users