Print

Print


Having so done, I get the three rows of two blank nodes in each that I would expect. (Only two columns of data since ?p is unused in your query.)

If I alter the query to:

PREFIX bf:   <http://bibframe.org/vocab/>
    SELECT ?s ?o
    WHERE {
	?s bf:publication ?blanknode.
        ?blanknode bf:providerName ?blanknode2 .
	?blanknode2 bf:label ?o
    }

I get the named resources and labels I would expect, i.e.:

<http://bibframe.org/resources/Ahx1405278232/1706459instance29>  "Hamlyn"          <http://bibframe.org/resources/Ahx1405278232/566369instance27>   "Morrow"          
<http://bibframe.org/resources/Ahx1405278232/566369instance27>  "Books of Wonder" 

I'm not sure why you are seeing the results you are seeing. Perhaps you can try with some other software?

---
A. Soroka
The University of Virginia Library

On Aug 1, 2014, at 12:32 PM, Karen Coyle <[log in to unmask]> wrote:

> A-S -
> 
> could you run the query that I gave that displays the node the software is seeing?
> 
>     PREFIX bf:   <http://bibframe.org/vocab/>
>     SELECT ?s ?p ?o
>     WHERE {
>         ?s bf:providerName ?o .
>     }
> 
> I read through the "shared blank nodes" and I don't think that's what's operating here. In the examples that I have, the entire usage of the blank node is contained in the example.
> 
> kc
> 
> 
> On 8/1/14, 9:24 AM, [log in to unmask] wrote:
>> Karen-
>> 
>> Using Jena, I did in fact run against what I think you are calling triples (which I assume means NTriples), with perfectly fine results. I'll put my example below my signature again. Those are true blank nodes. I am really not sure that the issue at hand is skolemization. I think it might be, instead, scope. As you know, a blank node can appear multiple times in a scope and the processing system can safely infer that each appearance is a reference to the same resource. That's what is allowing those of us who are merrily executing the queries to so do. In order to avoid that inference, it would be necessary to reformulate the RDF by separating the statements into a separate scope. Now, what this seems to mean to me is not that blank nodes prevent the kinds of searches with which you are experimenting, but that successfully executing them depends on the scope over which they are being executed. (Skolemization is certainly one way to provide scope inside a container of multiple RDF graphs, but that's a particular technique.)
>> 
>> Put shortly, I think the confusion here is coming from the fact that you are not making the assumption that the query is being executed over a graph derived from a single serialization (as expressed by the serializations we're exchanging in email) and some of us are making that assumption. The note at:
>> 
>> http://www.w3.org/TR/rdf11-mt/#shared_blank_nodes
>> 
>> is, I think, quite useful here.
>> 
>> ---
>> A. Soroka
>> The University of Virginia Library
>> 
>> <http://example.org/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Instance> .
>> _:B9c6bcc733f4fda9a4c781c8b45b134ca <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Provider> .
>> _:B9c6bcc733f4fda9a4c781c8b45b134ca <http://bibframe.org/v/providerDate> "1966" .
>> _:B111bf4e581f0bd4e14a8258becfbbdc9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Organization> .
>> _:B111bf4e581f0bd4e14a8258becfbbdc9 <http://bibframe.org/v/label> "Hamlyn" .
>> _:B9c6bcc733f4fda9a4c781c8b45b134ca <http://bibframe.org/v/providerName> _:B111bf4e581f0bd4e14a8258becfbbdc9 .
>> _:Bc1bcfb4bb5e05f53f82e9197ec8072ff <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Place> .
>> _:Bc1bcfb4bb5e05f53f82e9197ec8072ff <http://bibframe.org/v/label> "London" .
>> _:B9c6bcc733f4fda9a4c781c8b45b134ca <http://bibframe.org/v/providerPlace> _:Bc1bcfb4bb5e05f53f82e9197ec8072ff .
>> <http://example.org/1> <http://bibframe.org/v/publication> _:B9c6bcc733f4fda9a4c781c8b45b134ca .
>> <http://example.org/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Instance> .
>> _:Bbe9ac4abf7a2874eaf8d4a3b68f42226 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Provider> .
>> _:Bbe9ac4abf7a2874eaf8d4a3b68f42226 <http://bibframe.org/v/providerDate> "1967" .
>> _:B1a9cb90450dc65732598f3030fb39cf7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Organization> .
>> _:B1a9cb90450dc65732598f3030fb39cf7 <http://bibframe.org/v/label> "Hamlyn2" .
>> _:Bbe9ac4abf7a2874eaf8d4a3b68f42226 <http://bibframe.org/v/providerName> _:B1a9cb90450dc65732598f3030fb39cf7 .
>> _:Baef0aa1fcfceb2af3665007e944d1861 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Place> .
>> _:Baef0aa1fcfceb2af3665007e944d1861 <http://bibframe.org/v/label> "London2" .
>> _:Bbe9ac4abf7a2874eaf8d4a3b68f42226 <http://bibframe.org/v/providerPlace> _:Baef0aa1fcfceb2af3665007e944d1861 .
>> <http://example.org/2> <http://bibframe.org/v/publication> _:Bbe9ac4abf7a2874eaf8d4a3b68f42226 .
>> <http://example.org/3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Instance> .
>> _:B64e65b6a25c6cae9dcd55aa4143fba97 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Provider> .
>> _:B64e65b6a25c6cae9dcd55aa4143fba97 <http://bibframe.org/v/providerDate> "1968" .
>> _:B506805fe7f96dc7a94634db99026baa5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Organization> .
>> _:B506805fe7f96dc7a94634db99026baa5 <http://bibframe.org/v/label> "Hamlyn3" .
>> _:B64e65b6a25c6cae9dcd55aa4143fba97 <http://bibframe.org/v/providerName> _:B506805fe7f96dc7a94634db99026baa5 .
>> _:Bfac7d577c6350ee3adc9f4be854c0d44 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bibframe.org/v/Place> .
>> _:Bfac7d577c6350ee3adc9f4be854c0d44 <http://bibframe.org/v/label> "London3" .
>> _:B64e65b6a25c6cae9dcd55aa4143fba97 <http://bibframe.org/v/providerPlace> _:Bfac7d577c6350ee3adc9f4be854c0d44 .
>> <http://example.org/3> <http://bibframe.org/v/publication> _:B64e65b6a25c6cae9dcd55aa4143fba97 .
>> 
>> On Aug 1, 2014, at 12:04 PM, Karen Coyle <[log in to unmask]> wrote:
>> 
>>> Kevin, I already answered this on 7/14! The particular software you are using is skolemizing the blank nodes, and I show that in one of my posts on that date. If you instead convert the rdf/xml to triples, with blank nodes, the query fails. The query also fails in protege, which most likely does not skolemize the blank nodes. PLEASE GO BACK AND READ THAT THREAD AND TRY THE EXAMPLES I GAVE.
>>> 
>>> As I have said many times, it is best to work with triples, as the route from rdf/xml to triple in different software can be different.
>>> 
>>> kc
>>> 
>>> On 8/1/14, 8:55 AM, Ford, Kevin wrote:
>>>>> I know that there is a
>>>>> tendency to "go blank" when punting on the decision URI/literal, but then
>>>>> you need to make some other adjustments in your design.
>>>> -- The actual decision is between a resource and a literal, not a URI and a literal (or a "blank node" and a literal).  A blank node represents an anonymous resource, but that resource could just as easily had been identified by a URI.  It's ultimately a choice by the implementer.  Now, blank nodes show up a lot because that is a typical side-effect of a first pass at the data, when one does not actually know of a URI that could be used instead.
>>>> 
>>>> About this
>>>> 
>>>>> As I've already
>>>>> shown, the use of label in multiple places in the data within blank nodes
>>>>> makes it very hard to retrieve the desired data:
>>>> and this
>>>> 
>>>>> This search does not
>>>>> work on triples with blank nodes:
>>>>> 
>>>>> SELECT ?subject ?label
>>>>>       WHERE { ?subject bf:providerName ?bnode .
>>>>>                    ?bnode bf:label ?label . }
>>>> -- You've presented these conclusions before.  I do not know if I understand the first statement, but I believe the second quote is used as evidence of the first and I believe the second thing I quoted to simply be wrong.  The query, when run against data with blank nodes, works just fine for me and I would expect it to.
>>>> 
>>>> So, go to this URL:
>>>> 
>>>> http://demo.openlinksw.com/sparql
>>>> 
>>>> And enter this in the query field:
>>>> 
>>>> PREFIX bf:   <http://bibframe.org/vocab/>
>>>> SELECT ?subject ?label
>>>> WHERE {
>>>>    ?subject bf:providerName ?bnode .
>>>>    ?bnode bf:label ?label .
>>>> }
>>>> 
>>>> Click "Run Query."  You'll get a handful of results, all coming from pre-loaded BF data.  The column with values like "nodeID://b25764024" are blank nodes.
>>>> 
>>>> Lest one believes this to be an oddity of openlink's software, copy this query (same pattern as the above on, just different variable names and properties):
>>>> 
>>>> SELECT  ?o ?l
>>>> WHERE
>>>>   {
>>>>      ?s <http://zbw.eu/namespaces/zbw-extensions/useInsteadNote> ?o .
>>>>      ?o <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> ?l
>>>>      FILTER (isBlank(?o))
>>>>   }
>>>> LIMIT   100
>>>> 
>>>> (I added that FILTER line just to make sure we get nothing but blank nodes.)
>>>> 
>>>> Then, go to this website (which is the SPARQL endpoint for STW Thesaurus for Economics)
>>>> 
>>>> http://zbw.eu/beta/sparql/stw.html
>>>> 
>>>> Replace the content in the text field with the query above and click "get results."
>>>> 
>>>> The column with values like "_:b4" are blank nodes.
>>>> 
>>>> All of this is to say that when you say things like "This search does not work on triples with blank nodes" I find that it in fact does.
>>>> 
>>>> Yours,
>>>> Kevin
>>>> 
>>>> 
>>>>> -----Original Message-----
>>>>> From: Bibliographic Framework Transition Initiative Forum
>>>>> [mailto:[log in to unmask]] On Behalf Of Karen Coyle
>>>>> Sent: Friday, August 01, 2014 11:15 AM
>>>>> To: [log in to unmask]
>>>>> Subject: Re: [BIBFRAME] Blank nodes, xml, ttl was: [BIBFRAME] Proposal to
>>>>> handle "Providers" differently
>>>>> 
>>>>> Nate,
>>>>> 
>>>>> I agree with what you say below, but I don't think it addresses my concern
>>>>> which is about the use of blank nodes. Regardless of whether one has a URI
>>>>> value or a literal value, a node can be named or blank. I know that there is a
>>>>> tendency to "go blank" when punting on the decision URI/literal, but then
>>>>> you need to make some other adjustments in your design. As I've already
>>>>> shown, the use of label in multiple places in the data within blank nodes
>>>>> makes it very hard to retrieve the desired data:
>>>>> 
>>>>> <http://example.org/1>  a bf:Instance,
>>>>>       bf:publication [
>>>>>           a bf:Provider ;
>>>>>           bf:providerDate "1966" ;
>>>>>           bf:providerName [ a bf:Organization ; bf:label "Hamlyn" ] ;
>>>>>           bf:providerPlace [ a bf:Place ; bf:label "London" ]
>>>>>       ] .
>>>>> 
>>>>> The reason is that you cannot step through blank nodes to select only the
>>>>> bf:label for either bf:providerName or bf:providerPlace. This search does not
>>>>> work on triples with blank nodes:
>>>>> 
>>>>> SELECT ?subject ?label
>>>>>       WHERE { ?subject bf:providerName ?bnode .
>>>>>                    ?bnode bf:label ?label . }
>>>>> 
>>>>> This could be "solved" by creating specific properties for the labels, such as
>>>>> bf:providerNameLabel. However, the use of bf:label within blank nodes
>>>>> simply does not allow retrieval of the desired literals. Or it could be solved by
>>>>> using named graphs. It does, however, need to be solved.
>>>>> 
>>>>> kc
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 8/1/14, 6:34 AM, Trail, Nate wrote:
>>>>>> Karen,
>>>>>> 
>>>>>> The current transformation is incomplete in this Provider area, for a couple
>>>>> of reasons. I think we know we'd like to make          <bf:label>University of
>>>>> Michigan Press</bf:label> and          <bf:label>Ann Arbor</bf:label> into uris,
>>>>> but we haven't 'resolved'  where we go to look those things up reliably.
>>>>>> Not all of the "Organizations"   in the MARC data are orgs; they might be
>>>>> imprints, or statements like "Distributed by Random House", meaning they
>>>>> are not supposed to be part of  bf:publication, but bf:distribution. etc.
>>>>>> There is no imprint lookup service (yet), especially for historic materials.
>>>>>> Provider places, as has been pointed out, lack jurisdiction, so we're left to
>>>>> guess that Paris is Paris, France.
>>>>>> Those factors being the case, we're assuming that subsequent passes over
>>>>> the data will be able to more cleanly parse it and data-ify, and the bf:label
>>>>> could go away in favor of a uri.
>>>>>> We have a second pass in the works that does lookups to ID.loc.gov for
>>>>> various controlled vocabulary, and may look up other authoritative sources.
>>>>> It's not ready for prime time, however.
>>>>>> Nate
>>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: Bibliographic Framework Transition Initiative Forum
>>>>> [mailto:[log in to unmask]] On Behalf Of Karen Coyle
>>>>>> Sent: Thursday, July 31, 2014 9:03 PM
>>>>>> To: [log in to unmask]
>>>>>> Subject: [BIBFRAME] Blank nodes, xml, ttl was: [BIBFRAME] Proposal to
>>>>> handle "Providers" differently
>>>>>> On 7/31/14, 3:30 PM, Ford, Kevin wrote:
>>>>>>>> Of course, these have the "blank-node-+-label" problem again (still?).
>>>>>>> _:xx and _:yy do not need to be blank nodes.  We've been using a lot of
>>>>> blank nodes in examples, but they do not need to be.
>>>>>> Kevin,
>>>>>> 
>>>>>> You are absolutely right, they do not need to be blank nodes. However, my
>>>>> discovery of the issue with "bf:label" and blank nodes was on MARC records
>>>>> that I ran through the BIBFRAME tool [1], not in hand-coded examples.
>>>>> Obviously, BIBFRAME is not "done" so that tool is an approximation of what
>>>>> BIBFRAME could be, but there is an unfortunate reliance on blank nodes in its
>>>>> current state. This fact is somewhat hidden by the use of rdf/xml, and ditto
>>>>> the email examples in turtle, since blank nodes basically disappear in these
>>>>> notations. The proof of the pudding is in the triples. Here is a segment of real
>>>>> BIBFRAME instance data (as transformed from MARC by the BF tool, then
>>>>> converted to turtle and triples using rapper):
>>>>>> **RDFXML:
>>>>>> 
>>>>>> <bf:publication>
>>>>>>     <bf:Provider>
>>>>>>       <bf:providerName>
>>>>>>         <bf:Organization>
>>>>>>           <bf:label>University of Michigan Press</bf:label>
>>>>>>         </bf:Organization>
>>>>>>       </bf:providerName>
>>>>>>       <bf:providerPlace>
>>>>>>         <bf:Place>
>>>>>>           <bf:label>Ann Arbor</bf:label>
>>>>>>         </bf:Place>
>>>>>>       </bf:providerPlace>
>>>>>>       <bf:providerDate>1995</bf:providerDate>
>>>>>>     </bf:Provider>
>>>>>> </bf:publication>
>>>>>> </rdf>
>>>>>> 
>>>>>> **turtle:
>>>>>> 
>>>>>>       bf:publication [
>>>>>>           bf:providerDate "1995" ;
>>>>>>           bf:providerName [
>>>>>>               bf:label "University of Michigan Press" ;
>>>>>>               a bf:Organization
>>>>>>           ] ;
>>>>>>           bf:providerPlace [
>>>>>>               bf:label "Ann Arbor" ;
>>>>>>               a bf:Place
>>>>>>           ] ;
>>>>>>           a bf:Provider
>>>>>>       ] ;
>>>>>> 
>>>>>> ** triples
>>>>>> 
>>>>>> <http://bibframe.org/resources/cYO1404049290/3033010>
>>>>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>>>>> <http://bibframe.org/vocab/Work> .
>>>>>> <http://bibframe.org/resources/cYO1404049290/3033010>
>>>>>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>>>>> <http://bibframe.org/vocab/Text> .
>>>>>> _:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>>>>> <http://bibframe.org/vocab/Provider> .
>>>>>> _:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>>>>> <http://bibframe.org/vocab/Organization> .
>>>>>> _:genid2 <http://bibframe.org/vocab/label> "University of Michigan
>>>>> Press" .
>>>>>> _:genid1 <http://bibframe.org/vocab/providerName> _:genid2 .
>>>>>> _:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>>>>> <http://bibframe.org/vocab/Place> .
>>>>>> _:genid3 <http://bibframe.org/vocab/label> "Ann Arbor" .
>>>>>> _:genid1 <http://bibframe.org/vocab/providerPlace> _:genid3 .
>>>>>> _:genid1 <http://bibframe.org/vocab/providerDate> "1995" .
>>>>>> <http://bibframe.org/resources/cYO1404049290/3033010>
>>>>>> <http://bibframe.org/vocab/publication> _:genid1 .
>>>>>> 
>>>>>> The blank nodes become much more visible.
>>>>>> 
>>>>>> Many of the examples that we've seen on these recent threads don't
>>>>>> actually represent "running code," or at least I couldn't transform any
>>>>>> of them using tools that I have. I know this is a discussion, not a
>>>>>> coding session, but I think it would be helpful to do a sanity check
>>>>>> regarding what we are discussing by creating some working examples.
>>>>>> It'll provide a more realistic basis for discussion.
>>>>>> 
>>>>>> Personally, I'd like to see BIBFRAME move away from the use of blank
>>>>>> nodes wherever possible, and so I'd like to see examples that don't use
>>>>>> them.
>>>>>> 
>>>>>> kc
>>>>>> [1] http://bibframe.org/tools/transform/start
>>>>>> 
>>>>> --
>>>>> Karen Coyle
>>>>> [log in to unmask] http://kcoyle.net
>>>>> m: 1-510-435-8234
>>>>> skype: kcoylenet
>>> -- 
>>> Karen Coyle
>>> [log in to unmask] http://kcoyle.net
>>> m: 1-510-435-8234
>>> skype: kcoylenet
> 
> -- 
> Karen Coyle
> [log in to unmask] http://kcoyle.net
> m: 1-510-435-8234
> skype: kcoylenet