cwrc / DEPRECATED-CWRC-Writer

The Canadian Writing Research Collaboratory (CWRC) is developing an in-browser text markup editor (CWRCWriter) for use by collaborative scholarly editing projects.
http://www.cwrc.ca/projects/infrastructure-projects/technical-projects/cwrc-writer/
GNU General Public License v2.0
24 stars 17 forks source link

In overlap mode, double check that RDF entities are being created #312

Open SusanBrown opened 9 years ago

SusanBrown commented 9 years ago

They look like they are, on the screen, but when I look at the RDF I don't see them. I am annotating the sample letter doc in which I created a fictional entity named John Nobody Nemo and tagged the string "John" with it. I then changed Anglo-Norweigan Society to {Monsieur [Nemo} Society] and tagged it as indicated with personname and orgname tags. But when I look at the RDF all I see is the one annotation with the reference to "John" and the personname tag within Monsieur Nemo Society. Pasting in the RDF below in case I've misread it. Although the angle brackets will probably make it unreadable so I'll toss it in an email too.

<?xml version="1.0" encoding="UTF-8"?>

cw:mode0/cw:mode cw:allowOverlaptrue/cw:allowOverlap /rdf:Description2015-04-21T05:50:58.390Z/oa:annotatedAt2015-04-21T05:50:58.390Z/oa:serializedAt{}/cw:cwrcInfo{}/cw:cwrcAttributes/rdf:Descriptionwhen/cnt:chars/rdf:Description/rdf:Descriptionrdf:valuexpointer(//choice[@annotationId="ent_65"])/rdf:value/rdf:Description2015-04-21T05:50:58.394Z/oa:annotatedAt2015-04-21T05:50:58.394Z/oa:serializedAt{}/cw:cwrcInfo{"cert":"definite","when":"1935-10-21"}/cw:cwrcAttributes/rdf:Description1935-10-21/xsd:date/rdf:Description/rdf:Descriptionrdf:valuexpointer(//date[@annotationId="ent_69"])/rdf:value/rdf:Description2015-04-21T05:50:58.398Z/oa:annotatedAt2015-04-21T05:50:58.398Z/oa:serializedAt{"id":"279399399","name":"Russell, Patricia","repository":"viaf"}/cw:cwrcInfo{"cert":"probable","ref":"279399399"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//persName[@annotationId="ent_73"])/rdf:value/rdf:Description2015-04-21T05:50:58.399Z/oa:annotatedAt2015-04-21T05:50:58.399Z/oa:serializedAt{"id":"http://viaf.org/viaf/36924137","name":"Russell, Bertrand","repository":"viaf"}/cw:cwrcInfo{"cert":"definite","type":"real","ref":"http://viaf.org/viaf/36924137"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//persName[@annotationId="ent_109"])/rdf:value/rdf:Description2015-04-21T05:50:58.401Z/oa:annotatedAt2015-04-21T05:50:58.401Z/oa:serializedAt{"id":"http://www.geonames.org/6453366","name":"Oslo, Norway","repository":"geonames"}/cw:cwrcInfo{"cert":"definite","ref":"http://www.geonames.org/6453366"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//placeName[@annotationId="ent_143"])/rdf:value/rdf:Description2015-04-21T05:50:58.403Z/oa:annotatedAt2015-04-21T05:50:58.403Z/oa:serializedAt{"id":"http://www.geonames.org/6548528","name":"Bergen, Germany","repository":"geonames"}/cw:cwrcInfo{"cert":"definite","ref":"http://www.geonames.org/6548528"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//placeName[@annotationId="ent_144"])/rdf:value/rdf:Description2015-04-21T05:50:58.408Z/oa:annotatedAt2015-04-21T05:50:58.408Z/oa:serializedAt{"id":"http://www.geonames.org/2673722","name":"Stockholm, Sweden","repository":"geonames"}/cw:cwrcInfo{"cert":"definite","ref":"http://www.geonames.org/2673722"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//placeName[@annotationId="ent_145"])/rdf:value/rdf:Description2015-04-21T05:50:58.414Z/oa:annotatedAt2015-04-21T05:50:58.414Z/oa:serializedAt{"id":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:46948b30-c74d-46af-869d-0784d7596c98","name":"Russell","repository":"cwrc"}/cw:cwrcInfo{"cert":"definite","type":"real","ref":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:46948b30-c74d-46af-869d-0784d7596c98"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//persName[@annotationId="ent_2194"])/rdf:value/rdf:Description2015-04-21T05:50:58.418Z/oa:annotatedAt2015-04-21T05:50:58.418Z/oa:serializedAt{"id":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:ad12cefa-c105-4c4b-bea0-12cf4d00e795"}/cw:cwrcInfo{"role":"abr","cert":"definite","type":"real","ref":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:ad12cefa-c105-4c4b-bea0-12cf4d00e795"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//persName[@annotationId="ent_2195"])/rdf:value/rdf:Description2015-04-21T05:50:58.420Z/oa:annotatedAt2015-04-21T05:50:58.420Z/oa:serializedAt{"id":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:ad12cefa-c105-4c4b-bea0-12cf4d00e795","name":"Nemo, John Nobody","repository":"cwrc"}/cw:cwrcInfo{"cert":"definite","type":"real","ref":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:ad12cefa-c105-4c4b-bea0-12cf4d00e795"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionrdf:valuexpointer(//persName[@annotationId="ent_2447"])/rdf:value/rdf:Description2015-04-21T05:50:58.422Z/oa:annotatedAt2015-04-21T05:50:58.422Z/oa:serializedAt{"id":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:ef39dfe2-1436-4e28-a998-3b96ec19714e","name":"Women's Art Society","repository":"cwrc"}/cw:cwrcInfo{"cert":"definite","ref":"http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:ef39dfe2-1436-4e28-a998-3b96ec19714e"}/cw:cwrcAttributes/rdf:Description/rdf:Description/rdf:Descriptionxpointer(string-range(//persName[@offsetId="ent_2447"],"",9))/oa:startxpointer(string-range(//p[@offsetId="struct_2220"],"",671))/oa:end/rdf:Description /cw:married /rdf:Description /rdf:RDF ``` Sample Document Title

Created from original research by members of CWRC/CSÉC unless otherwise noted.

Sample Letter - <persName annotationId="ent_2194" cert="definite" type="real" ref="http://cwrc-dev-01.srv.ualberta.ca/islandora/object/cwrc:46948b30-c74d-46af-869d-0784d7596c98">Bertrand Russell</persName> to <persName annotationId="ent_73" cert="probable" ref="279399399">Patricia Spence</persName> - October 21, 1935

Bad writing due to shaky train

In train

Oslo to Bergen

21.10.35 Dearest -

I have had no letter from you since I left Stockholm, but I had a nice one from John in an envelope you had sent him. I had sent him one addressed to Copenhagen but he hadn't used it.

When I reached Oslo yesterday evening, Brynjulf Bull should have been there to meet me, but wasn't. He is not on the telephone, so I took a taxi to his address, which turned out to be a students' club with no one about on Sundays, so I went to a hotel feeling rather non-plussed. But presently he turned up. He had got the time of my arrival wrong, and whenwhen he had found he had missed me he phoned to every hotel in Oslo till he hit on the right one. He left me at 10, and then I had to do a Sunday Referee article. Today my journey lasts from 9 till 9 - fortunately one of the most beautiful railway journeys in the world. Tomorrow I lecture at Bergen to the Monsieur Nemo Society. Next day I go back to Oslo, lecture there Fri. and Sat. and then start for home via Bergen.

Bull is a nice young man but incompetent - can't quite stand the communists, but finds the socialists too mild.

I am unhappily wondering what you are feeling about me.

I love you very much - B
```
ajmacdonald commented 9 years ago

It's hard to say, but it appears as though the start and end ranges for the org entity have been reversed. When I manually change the relevant RDF to:

<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rdf:about="http://id.cwrc.ca/selector/076c44f2-598f-48b1-9377-b2b5d6d5a650">
    <oa:start xmlns:oa="http://www.w3.org/ns/oa#">xpointer(string-range(//p[@offsetId="struct_2220"],"",671))</oa:start>
    <oa:end xmlns:oa="http://www.w3.org/ns/oa#">xpointer(string-range(//persName[@offsetId="ent_2447"],"",9))</oa:end>
    <rdf:type rdf:resource="http://www.w3.org/ns/oa#TextPositionSelector"/>
</rdf:Description>

Then the org entity appears correctly: capture

ajmacdonald commented 9 years ago

Do you remember how you created this originally? If you could provide the steps you used to recreate it, it would be a big help in tracking down what went wrong.

ajmacdonald commented 9 years ago

I've just committed a fix for a related issue. Let's see if it also resolves this one.