Navigation:
Documentation
Archive



Page Tree:

Child pages
  • 20111012 Demonstrator Meeting Next Steps Repository

This wiki space contains archival documentation of Project Bamboo, April 2008 - March 2013.

Skip to end of metadata
Go to start of metadata

Add tools and services ideas and technical discussion to this page as part of our further decision making regarding what we will demonstrate on December 14.

From Bridget Oct 14.

Bruce,

Below are details of the basic steps for a workflow which combines the CI Hub, the annotation service and alpheios treebank editor

1) Retrieve some latin TEI XML from the CI HUB (i.e. from either Perseus or TCP repositories as desired)

2) Issue request to Annotation service at: http://173.255.250.96:8181/bsp/annotationservice/annotation/template/text

With the following parameters:

text=<TEI>.....</TEI>   [ i.e. the TEI text retrieved in Step 1 ]
mime_type=text/xml
lang=la
format=perseus

3) extract a sentence for annotating from the response (e.g. the first sentence can be found at the following xpath: /rdf:RDF/oac:Annotation/oac:Body/cnt:rest/treebank:treebank/treebank:sentence[1])

4) Post the sentence to the alpheios treebank editor at http://repos1.alpheios.net/rest/db/xq/treebank-addsentence.xq
with the following parameters:
fmt=aldt
lang=la
and the sentence xml retrieved in step 3 sent as the content of the post  

5) the response will be an xml document like the following:
<args doc="sentences-aldt-la" s="44"/>

6) you can then redirect the user to the treebank editor interface at

http://repos1.alpheios.net/exist/rest/db/app/treebank-editsentence.xhtml?doc=sentences-aldt-la&s=44&sequential=on

(changing the values of the doc and s parameters to the corresponding values returned from the post in step 4)

7) after the user is done editing, and has saved, you could retrieve the annotated XML back from the following url:

http://repos1.alpheios.net/exist/rest/db/xq/treebank-getsentence.xq?doc=sentences-aldt-la&s=44

(again changing the values of the doc and s parameters to the corresponding values returned from the post in step 4)

Note that there are a couple minor bugs in the alpha version of annotation service which I've found in the last week which I need to get up in the  integration environment before this actually will work, but I should be able to get a new build to Fernando to deploy by early next week.  I also do plan on modifying the Alpheios treebank editor to accept the OAC xml directly (rather than you needing to parse out the sentences), which I should have done within the next month.

Obviously the above interactions with the treebank editor need to be proxied server side to avoid cross-browser ajax restrictions. Another alternative would be to integrate the Alpheios interface directly as a tool within the HubZero environment, so that  the interactions with the editor can take place browser side and to eliminate any dependencies on the remote alpheios environment. This is quite straightforward and can be done with a few tweaks meta tags in the  xhtml for the editor interface. The editor has successfully been integrated into the  Perseus environment this way. To see how that was done, you could take a look at the following: https://alpheios.svn.sourceforge.net/svnroot/alpheios/utilities/treebank-editor/trunk/treebank-editsentence.xhtml is the base version of the interface xhtml and https://alpheios.svn.sourceforge.net/svnroot/alpheios/utilities/treebank-editor/trunk/treebank-editsentence-aldt.xhtml is the modified version that was deployed on the perseus server (with the related supporting js , css, etc. files also available at https://alpheios.svn.sourceforge.net/svnroot/alpheios/utilities/treebank-editor/trunk/

I'd be happy to answer any questions for you about this, and will let you know when the aforementioned bugs in the annotation service have been fixed in the version deployed in the integration environment.