CVS WWW/International/multilingualweb/lt/drafts/its20

Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20
In directory gil:/tmp/cvs-serv21133

Modified Files:
	its20.html its20.odd 
Log Message:
edits related to nif, see http://lists.w3.org/Archives/Public/public-multilingualweb-lt/2013May/0228.html andhttps://www.w3.org/International/multilingualweb/lt/track/issues/125 

--- /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/its20.html	2013/05/26 10:33:49	1.433
+++ /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/its20.html	2013/05/28 21:51:05	1.434
@@ -61,9 +61,9 @@
 <div class="toc3">5.2.2 <a href="#selection-local" shape="rect">Local Selection in an XML Document</a></div>
 </div>
 <div class="toc2">5.3 <a href="#selectors" shape="rect">Query Language of Selectors</a><div class="toc3">5.3.1 <a href="#queryLanguage" shape="rect">Choosing Query Language</a></div>
-<div class="toc3">5.3.2 <a href="#d0e2342" shape="rect">XPath 1.0</a></div>
+<div class="toc3">5.3.2 <a href="#d0e2344" shape="rect">XPath 1.0</a></div>
 <div class="toc3">5.3.3 <a href="#css-selectors" shape="rect">CSS Selectors</a></div>
-<div class="toc3">5.3.4 <a href="#d0e2587" shape="rect">Additional query languages</a></div>
+<div class="toc3">5.3.4 <a href="#d0e2589" shape="rect">Additional query languages</a></div>
 <div class="toc3">5.3.5 <a href="#its-param" shape="rect">Variables in selectors</a></div>
 </div>
 <div class="toc2">5.4 <a href="#link-external-rules" shape="rect">Link to External Rules</a></div>
@@ -155,7 +155,7 @@
           concepts (such as “Translate”) that are important for internationalization and
           localization, and defines implementations of these concepts (termed “ITS data categories”)
           as a set of elements and attributes called the <em>Internationalization Tag Set
-            (ITS)</em>. The document provides implementations for HTML, serializations in <a href="http://nlp2rdf.org/nif-1-0" shape="rect">NIF (NLP Interchange Format)</a>, and provides
+            (ITS)</em>. The document provides implementations for HTML, serializations in <a href="http://persistence.uni-leipzig.org/nlp2rdf/" shape="rect">NIF</a> (NLP Interchange Format) <a title="" href="#nif-reference" shape="rect">[NIF]</a>, and provides
           definitions of ITS elements and attributes in the form of XML Schema <a title="XML Schema Part 1:&#xA;                Structures Second Edition" href="#xmlschema1" shape="rect">[XML Schema]</a> and RELAX NG <a title="Regular-grammar-based validation -- RELAX NG" href="#relaxng" shape="rect">[RELAX NG]</a>.</p><p>This document aims to realize many of the ideas formulated in the <a href="http://www.w3.org/TR/2012/WD-its2req-20120524/" shape="rect">ITS 2.0 Requirements
             document</a>, in <a title="Internationalization and&#xA;                Localization Markup Requirements" href="#itsreq" shape="rect">[ITS REQ]</a> and <a title="Requirements for Localizable&#xA;                DTD Design" href="#reqlocdtd" shape="rect">[Localizable DTDs]</a>.</p><p>Not all requirements listed there are addressed in this document. Those which are not
           addressed here are either covered in <a title="Best&#xA;                Practices for XML Internationalization" href="#xml-i18n-bp" shape="rect">[XML i18n BP]</a>
@@ -693,7 +693,7 @@
               and localization of XML schemas and documents.] The concept of a data
             category is independent of its implementation in an XML and HTML environment (e.g. using
             an element or attribute).</p><p>For each data category, ITS distinguishes between the following:</p><ul><li><p>the prose description, see <a class="section-ref" href="#datacategory-description" shape="rect">Section 8: Description of Data Categories</a></p></li><li><p>schema language independent formalization, see the "implementation" subsections in
-                <a class="section-ref" href="#datacategory-description" shape="rect">Section 8: Description of Data Categories</a></p></li><li><p>schema language specific implementations, see <a class="section-ref" href="#its-schemas" shape="rect">Appendix D: Schemas for ITS</a></p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d0e1431" id="d0e1431" shape="rect"/>Example 14: A data category and its implementation</div><p>The <a href="#trans-datacat" shape="rect">Translate</a> data category conveys information as
+                <a class="section-ref" href="#datacategory-description" shape="rect">Section 8: Description of Data Categories</a></p></li><li><p>schema language specific implementations, see <a class="section-ref" href="#its-schemas" shape="rect">Appendix D: Schemas for ITS</a></p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d0e1433" id="d0e1433" shape="rect"/>Example 14: A data category and its implementation</div><p>The <a href="#trans-datacat" shape="rect">Translate</a> data category conveys information as
               to whether a piece of content should be translated or not.</p><p>The simplest formalization of this prose description on a schema language independent
               level is a <code class="its-attr-markup">translate</code> attribute with two possible values:
                 "yes" and "no". An implementation on a schema language specific
@@ -958,9 +958,9 @@
               actual query language. The query language is set by <code class="its-attr-markup">queryLanguage</code> attribute
               on <code class="its-elem-markup">rules</code> element. If <code class="its-attr-markup">queryLanguge</code> is not specified XPath 1.0 is
               used as a default query language.</p></div><div class="div3">
-<h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="d0e2342" id="d0e2342" shape="rect"/>5.3.2 XPath 1.0</h4><p>XPath 1.0 is identified by <code>xpath</code> value in <code class="its-attr-markup">queryLanguage</code>
+<h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="d0e2344" id="d0e2344" shape="rect"/>5.3.2 XPath 1.0</h4><p>XPath 1.0 is identified by <code>xpath</code> value in <code class="its-attr-markup">queryLanguage</code>
               attribute.</p><div class="div4">
-<h5><a name="d0e2353" id="d0e2353" shape="rect"/>5.3.2.1 Absolute selector</h5><p>The absolute selector <a href="#rfc-keywords" shape="rect">MUST</a> be an XPath expression
+<h5><a name="d0e2355" id="d0e2355" shape="rect"/>5.3.2.1 Absolute selector</h5><p>The absolute selector <a href="#rfc-keywords" shape="rect">MUST</a> be an XPath expression
                 which starts with "<code>/</code>". That is, it must be an <a href="http://www.w3.org/TR/xpath/#NT-AbsoluteLocationPath" shape="rect">
                   AbsoluteLocationPath</a> or union of <a href="http://www.w3.org/TR/xpath/#NT-AbsoluteLocationPath" shape="rect">
                   AbsoluteLocationPath</a>s as described in <a href="#xpath" shape="rect">XPath 1.0</a>.
@@ -1005,14 +1005,14 @@
                 implementations can be used.</p></div><div class="note"><p class="prefix"><b>Note:</b></p><p id="css-selectors-and-attributes">CSS selectors have no ability to point to
                 attributes.</p></div><p>CSS Selectors are identified by <code>css</code> value in <code class="its-attr-markup">queryLanguage</code>
               attribute.</p><div class="div4">
-<h5><a name="d0e2564" id="d0e2564" shape="rect"/>5.3.3.1 Absolute selector</h5><p>Absolute selector <a href="#rfc-keywords" shape="rect">MUST</a> be interpreted as selector
+<h5><a name="d0e2566" id="d0e2566" shape="rect"/>5.3.3.1 Absolute selector</h5><p>Absolute selector <a href="#rfc-keywords" shape="rect">MUST</a> be interpreted as selector
                 as defined in <a title="Selectors Level&#xA;                3" href="#css3-selectors" shape="rect">[Selectors Level 3]</a>. Both simple selectors
                 and groups of selectors can be used.</p></div><div class="div4">
-<h5><a name="d0e2574" id="d0e2574" shape="rect"/>5.3.3.2 Relative selector</h5><p>Relative selector <a href="#rfc-keywords" shape="rect">MUST</a> be interpreted as selector
+<h5><a name="d0e2576" id="d0e2576" shape="rect"/>5.3.3.2 Relative selector</h5><p>Relative selector <a href="#rfc-keywords" shape="rect">MUST</a> be interpreted as selector
                 as defined in <a title="Selectors Level&#xA;                3" href="#css3-selectors" shape="rect">[Selectors Level 3]</a>. Selector is not
                 evaluated against the complete document tree but only against subtrees rooted at
                 nodes selected by selector in the <code class="its-attr-markup">selector</code> attribute.</p></div></div><div class="div3">
-<h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="d0e2587" id="d0e2587" shape="rect"/>5.3.4 Additional query languages</h4><p>ITS processors <a href="#rfc-keywords" shape="rect">MAY</a> support additional query
+<h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="d0e2589" id="d0e2589" shape="rect"/>5.3.4 Additional query languages</h4><p>ITS processors <a href="#rfc-keywords" shape="rect">MAY</a> support additional query
               languages. For each additional query language the processor <a href="#rfc-keywords" shape="rect">MUST</a> define:</p><ul><li><p>identifier of query language used in <code class="its-attr-markup">queryLanguage</code>;</p></li><li><p>rules for evaluating absolute selector to collection of nodes;</p></li><li><p>rules for evaluating relative selector to collection of nodes.</p></li></ul><p>Because future versions of this specification are likely to define additional query
               languages, the following query language identifiers are reserved: <code>xpath</code>,
                 <code>css</code>, <code>xpath2</code>, <code>xpath3</code>, <code>xquery</code>,
@@ -1187,7 +1187,7 @@
               example, for a command-line tool: providing the paths of both the XML document to
               process and its corresponding external rules file.</p></li></ul></div><div class="div2">
 <h3><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="conversion-to-nif" id="conversion-to-nif" shape="rect"/>5.7 Conversion to NIF</h3><p>This section defines an algorithm to convert XML or HTML documents (or their DOM
-            representations) that contain ITS metadata to the RDF-based format based on <a title="" href="#NIF" shape="rect">[NIF]</a>. The conversion results in RDF triples.</p><div class="note"><p class="prefix"><b>Note:</b></p><p>The algorithm is intended to extract the text from the XML/HTML/DOM for an NLP
+            representations) that contain ITS metadata to the RDF-based format based on <a title="" href="#nif-reference" shape="rect">[NIF]</a>. The conversion results in RDF triples.</p><div class="note"><p class="prefix"><b>Note:</b></p><p>The algorithm is intended to extract the text from the XML/HTML/DOM for an NLP
               tool. It can produce a lot of "<span class="quote">phantom</span>" predicates from excessive
               whitespace, which 1) increases the size of the intermediate mapping and 2) extracts
               this whitespace as text, and therefore might decrease NLP performance. It is strongly recommended to
@@ -1204,55 +1204,67 @@
                 tuple with the XPath expressions (X,T). Since the text nodes have a certain order we
                 now have a list of ordered tuples ((x0,t0), (x1,t1), ..., (xn,tn)).</p></li><li><p id="its2nif-algorithm-step4">STEP 4 (optional): Serialize as XML or as RDF.
                 The list with the XPath-to-text mapping can also be kept in memory. Part of a
-                serialization example is given below. Note that in the example consists both of an RDF part and
-                and XML part (the <code>mappings</code> element).</p></li></ul><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve">@prefix itsrdf: &lt;http://www.w3.org/2005/11/its/rdf#&gt; .
-&lt;http://example.com/exampledoc.html#xpath(x0)&gt; 
-    nif:convertedFrom &lt;http://example.com/exampledoc.html#char=b0,e0&gt;
-&lt;http://example.com/exampledoc.html#xpath(x1)&gt;
-    nif:convertedFrom &lt;http://example.com/exampledoc.html#char=b1,e1&gt;
+                serialization example is given below. The upper part is in RDF Turtle Syntax while the lower part
+                is in XML (the <code>mappings</code> element).</p></li></ul><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve"># Turtle example:
+@prefix nif: &lt;http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#&gt; .
+@prefix itsrdf: &lt;http://www.w3.org/2005/11/its/rdf#&gt; .
+&lt;http://example.com/exampledoc.html#char=b0,e0&gt;
+ nif:wasConvertedFrom  &lt;http://example.com/exampledoc.html#xpath(x0)&gt;  .
+&lt;http://example.com/exampledoc.html#char=b1,e1&gt; 
+ nif:wasConvertedFrom &lt;http://example.com/exampledoc.html#xpath(x1)&gt;  .
 # ...
-&lt;http://example.com/exampledoc.html#xpath(xn)&gt;
-    nif:convertedFrom &lt;http://example.com/exampledoc.html#char=bn,en&gt;
+&lt;http://example.com/exampledoc.html#char=bn,en&gt; 
+ nif:wasConvertedFrom &lt;http://example.com/exampledoc.html#xpath(xn)&gt; .
+&lt;!-- XML Example --&gt;
 &lt;mappings&gt;
-  &lt;mapping x="xpath(x0)" b="b0" e="e0" /&gt;
-  &lt;mapping x="xpath(x1)" b="b1" e="e1" /&gt;
-  &lt;!-- ... --&gt; 
-  &lt;mapping x="xpath(xn)" b="bn" e="en" /&gt;
-&lt;/mappings&gt;</pre></div></div><p>where</p><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve">b0 = 0
+ &lt;mapping x="xpath(x0)" b="b0" e="e0" /&gt;
+ &lt;mapping x="xpath(x1)" b="b1" e="e1" /&gt;
+ &lt;!-- ... --&gt; 
+ &lt;mapping x="xpath(xn)" b="bn" e="en" /&gt;
+&lt;/mappings&gt;
+</pre></div></div><p>where</p><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve">b0 = 0
 e0 = b0 + (Number of characters of t0) 
-b1 = e0 +1 
+b1 = e0
 e1 = b1 + (Number of characters of t1) 
 ...
-bn = e(n-1) +1 
+bn = e(n-1)
 en = bn + (Number of characters of tn) 
-</pre></div></div><p>Example (continued)</p><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve">@prefix itsrdf: &lt;http://www.w3.org/2005/11/its/rdf#&gt; .
+</pre></div></div><p>Example (continued)</p><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve"># Turtle example:
+@prefix nif: &lt;http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#&gt; .
+@prefix itsrdf: &lt;http://www.w3.org/2005/11/its/rdf#&gt; .
 # "Welcome to "
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])&gt; 
-    itsrdf:nif &lt;http://example.com/exampledoc.html#char=0,11&gt; .
+&lt;http://example.com/exampledoc.html#char=0,11&gt;  
+ nif:wasConvertedFrom
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])&gt;.
 # "Dublin"
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/span[1]/text()[1])&gt; 
-    itsrdf:nif &lt;http://example.com/exampledoc.html#char=11,17&gt; .
+&lt;http://example.com/exampledoc.html#char=11,17&gt; 
+ nif:wasConvertedFrom
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/span[1]/text()[1])&gt;.
 # " in "
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[2])&gt; 
-    itsrdf:nif &lt;http://example.com/exampledoc.html#char=17,21&gt; .
+&lt;http://example.com/exampledoc.html#char=17,21&gt;
+ nif:wasConvertedFrom
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[2])&gt; .
 # "Ireland"
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])&gt; 
-    itsrdf:nif &lt;http://example.com/exampledoc.html#char=21,28&gt; .
+&lt;http://example.com/exampledoc.html#char=21,28&gt;
+ nif:wasConvertedFrom  
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])&gt; .
 # "!"
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[3])&gt; 
-    itsrdf:nif &lt;http://example.com/exampledoc.html#char=28,29&gt; .
+&lt;http://example.com/exampledoc.html#char=28,29&gt;
+ nif:wasConvertedFrom
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[3])&gt; .
 # "Welcome to Dublin Ireland!"
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text())&gt; 
-    itsrdf:nif &lt;http://example.com/exampledoc.html#char=0,29&gt; .
+&lt;http://example.com/exampledoc.html#char=0,29&gt;
+ nif:wasConvertedFrom
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text())&gt; .
 &lt;mappings&gt;
-  &lt;mapping x="xpath(/html/body[1]/h2[1]/text()[1])" b="0" e="11" /&gt;
-  &lt;mapping x="xpath(/html/body[1]/h2[1]/span[1]/text()[1])" b="11" e="17" /&gt;
-  &lt;mapping x="xpath(/html/body[1]/h2[1]/text()[2])" b="17" e="21" /&gt;
-  &lt;mapping x="xpath(/html/body[1]/h2[1]/b[1]/text()[1])" b="21" e="28" /&gt;
-  &lt;mapping x="xpath(/html/body[1]/h2[1]/text()[3])" b="28" e="29" /&gt;
-  &lt;mapping x="xpath(/html/body[1]/h2[1])" b="0" e="29" /&gt;
+ &lt;mapping x="xpath(/html/body[1]/h2[1]/text()[1])" b="0" e="11" /&gt;
+ &lt;mapping x="xpath(/html/body[1]/h2[1]/span[1]/text()[1])" b="11" e="17" /&gt;
+ &lt;mapping x="xpath(/html/body[1]/h2[1]/text()[2])" b="17" e="21" /&gt;
+ &lt;mapping x="xpath(/html/body[1]/h2[1]/b[1]/text()[1])" b="21" e="28" /&gt;
+ &lt;mapping x="xpath(/html/body[1]/h2[1]/text()[3])" b="28" e="29" /&gt;
+ &lt;mapping x="xpath(/html/body[1]/h2[1])" b="0" e="29" /&gt;
 &lt;/mappings&gt;</pre></div></div><ul><li><p id="its2nif-algorithm-step5">STEP 5: Create a context URI and attach the
-                whole concatenated text of the document as reference.</p></li><li><p id="its2nif-algorithm-step6">STEP 6: Attach any ITS metadata annotations from the XML/HTML/DOM input to the respective NIF URIs.</p></li><li><p id="its2nif-algorithm-step7">STEP 7: Omit all URIs that do not carry annotations (they will just bloat the data).</p></li></ul><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve">@prefix itsrdf: &lt;http://www.w3.org/2005/11/its/rdf#&gt; .
+              whole concatenated text <code>$(t0+t1+t2+...+tn)</code> of the document as reference.</p></li><li><p id="its2nif-algorithm-step6">STEP 6: Attach any ITS metadata annotations from the XML/HTML/DOM input to the respective NIF URIs.</p></li><li><p id="its2nif-algorithm-step7">STEP 7: Omit all URIs that do not carry annotations (they will just bloat the data).</p></li></ul><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve">@prefix itsrdf: &lt;http://www.w3.org/2005/11/its/rdf#&gt; .
 @prefix nif: &lt;http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#&gt;
 &lt;http://example.com/exampledoc.html#char=0,29&gt;
     rdf:type             nif:Context ;
@@ -3409,7 +3421,7 @@
             http://www.w3.org/TR/html401.</dd><dt class="label"><a name="html5" id="html5" shape="rect"/>HTML5</dt><dd>Robin Berjon et al. <a href="http://www.w3.org/TR/2012/CR-html5-20121217/" shape="rect"><cite>HTML5</cite></a>. W3C Candidate Recommendation 17 December 2012. Available at <a href="http://www.w3.org/TR/2012/CR-html5-20121217/" shape="rect">http://www.w3.org/TR/2012/CR-html5-20121217/</a>.
             The latest version of <a href="http://www.w3.org/TR/html5/" shape="rect">HTML5</a> is available at
             http://www.w3.org/TR/html5/.</dd><dt class="label"><a name="ianacharsets" id="ianacharsets" shape="rect"/>IANA Character Sets</dt><dd>
-               <a href="http://www.iana.org/assignments/character-sets" shape="rect"><cite>Character Sets</cite></a> Available at <a href="http://www.iana.org/assignments/character-sets" shape="rect">http://www.iana.org/assignments/character-sets</a>.</dd><dt class="label"><a name="NIF" id="NIF" shape="rect"/>NIF</dt><dd>Hellmann, S.  (ed.). <a href="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core" shape="rect">NIF 2.0 Core Ontology Version 1.0</a>, version April 2013. Available at http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core under CC-BY 2.0  license. </dd><dt class="label"><a name="qa-framework" id="qa-framework" shape="rect"/>QAFRAMEWORK</dt><dd>Karl Dubost, Lynne Rosental, Dominique
+               <a href="http://www.iana.org/assignments/character-sets" shape="rect"><cite>Character Sets</cite></a> Available at <a href="http://www.iana.org/assignments/character-sets" shape="rect">http://www.iana.org/assignments/character-sets</a>.</dd><dt class="label"><a name="nif-reference" id="nif-reference" shape="rect"/>NIF</dt><dd>Hellmann, S. et al. (ed.). <a href="http://persistence.uni-leipzig.org/nlp2rdf/" shape="rect">NIF Core Ontology Version 1.0</a>, as of May 2013. Available at http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core# under CC-BY 3.0  license. </dd><dt class="label"><a name="qa-framework" id="qa-framework" shape="rect"/>QAFRAMEWORK</dt><dd>Karl Dubost, Lynne Rosental, Dominique
             Hazaël-Massieux, Lofton Henderson. <a href="http://www.w3.org/TR/2005/REC-qaframe-spec-20050817/" shape="rect"><cite>QA Framework:
                 Specification Guidelines</cite></a>. W3C Recommendation 17 August 2005. Available at <a href="http://www.w3.org/TR/2005/REC-qaframe-spec-20050817/" shape="rect">
               http://www.w3.org/TR/2005/REC-qaframe-spec-20050817/</a>. The latest version of <a href="http://www.w3.org/TR/qaframe-spec/" shape="rect">QAFRAMEWORK</a> is available at
@@ -5875,24 +5887,28 @@
             algorithm</a>.</p><p>As a natural language processing (NLP) tool, we choose <a href="https://github.com/dbpedia-spotlight/dbpedia-spotlight#readme" shape="rect">DBpedia
             Spotlight</a>. For this example let's assume DBpedia Spotlight linked "Ireland" to
           DBpedia:</p><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve">&lt;http://example.com/exampledoc.html#char=21,28&gt; 
-    rdf:type                 nif:RFC5147String;
-    itsrdf:taIdentRef  &lt;http://dbpedia.org/resource/Ireland&gt; .
+ rdf:type nif:RFC5147String;
+ itsrdf:taIdentRef &lt;http://dbpedia.org/resource/Ireland&gt; .
 &lt;http://dbpedia.org/resource/Ireland&gt; 
-    rdf:type                 &lt;http:/nerd.eurecom.fr/ontology#Country&gt; .
-</pre></div></div><p id="nif2its-algorithm">The conversion algorithm to generate ITS out of NIF consists
-          of two steps.</p><ul><li><p id="nif2its-algorithm-step1">STEP 1: Send the text to any NIF Web service, which
-              creates the NLP annotation. The output of the Web service will be a NIF
-              representation.</p></li><li><p id="nif2its-algorithm-step3">STEP 2: Use the mapping from ITS2NIF (available
+ rdf:type &lt;http:/nerd.eurecom.fr/ontology#Country&gt; .</pre></div></div><p id="nif2its-algorithm">The conversion algorithm to generate ITS out of NIF consists
+          of two steps.</p><ul><li><p id="nif2its-algorithm-step1">STEP 1: NIF Web services accept two different types of input. It is possible to either send the extracted text (the object of the <code>nif:iString</code> property) directly or  NIF RDF to the NLP tool, i.e. the text is send as a <code>nif:Context</code> node and included as <code>nif:isString</code>. Either way, the output of the Web service will be a NIF representation.
+            </p><p>Accepting text will be the minimal requirement of a NIF web service. Ideally, you would be able to send the <code>nif:Context</code> node with the isString as RDF directly, which has the advantage, that all other annotations can be used by the NLP tool:</p><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve"><strong class="hl-tag" style="color: #000096">&lt;rdf:Description</strong> <span class="hl-attribute" style="color: #F5844C">rdf:about</span>=<span class="hl-value" style="color: #993300">"http://example.com/exampledoc.html#char=0,29"</span><strong class="hl-tag" style="color: #000096">&gt;</strong>
+ <strong class="hl-tag" style="color: #000096">&lt;nif:sourceUrl</strong> <span class="hl-attribute" style="color: #F5844C">rdf:resource</span>=<span class="hl-value" style="color: #993300">"http://example.com/exampledoc.html"</span><strong class="hl-tag" style="color: #000096">/&gt;</strong>
+ <strong class="hl-tag" style="color: #000096">&lt;nif:isString&gt;</strong>Welcome to Dublin in Ireland!<strong class="hl-tag" style="color: #000096">&lt;/nif:isString&gt;</strong>
+ <strong class="hl-tag" style="color: #000096">&lt;rdf:type</strong> <span class="hl-attribute" style="color: #F5844C">rdf:resource</span>=<span class="hl-value" style="color: #993300">"http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Context"</span><strong class="hl-tag" style="color: #000096">/&gt;</strong>
+<strong class="hl-tag" style="color: #000096">&lt;/rdf:Description&gt;</strong>
+</pre></div></div></li><li><p id="nif2its-algorithm-step3">STEP 2: Use the mapping from ITS2NIF (available
               after <a href="#its2nif-algorithm-step7" shape="rect">step 7</a> of the ITS2NIF algorithm) to
               reintegrate annotations in the original ITS annotated document.</p></li></ul><p>For step 2, three cases can occur.</p><p>CASE 1: The NLP annotation created in NIF matches the text node. Solution: Attach the
           annotation to the parent element of the text node.</p><div class="exampleInner"><div class="exampleOuter"><pre xml:space="preserve"># Based on:
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])&gt; 
-   itsrdf:nif &lt;http://example.com/exampledoc.html#char=21,28&gt; .
+&lt;http://example.com/exampledoc.html#char=21,28&gt;
+ nif:wasConvertedFrom
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])&gt; .
 # and:
 &lt;http://example.com/exampledoc.html#char=21,28&gt; 
-    itsrdf:taIdentRef  &lt;http://dbpedia.org/resource/Ireland&gt; .
+ itsrdf:taIdentRef  &lt;http://dbpedia.org/resource/Ireland&gt; .
 # we can attach the metadata to the parent node:
-&lt;b its-ta-ident-ref="http://dbpedia.org/resource/Dublin” 
+&lt;b its-ta-ident-ref="http://dbpedia.org/resource/Dublin" 
    translate="no"&gt;Ireland&lt;/b&gt;
 </pre></div></div><p>CASE 2: The NLP annotation created in NIF is a substring of the text node. Solution:
           Create a new element, e.g. for HTML "span". A different input example is given below as
@@ -5906,8 +5922,9 @@
  
 # ITS2NIF
  
-&lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])&gt;
-    itsrdf:nif &lt;http://example.com/exampledoc.html#char=0,29&gt;
+&lt;http://example.com/exampledoc.html#char=0,29&gt;
+ nif:wasConvertedFrom
+ &lt;http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])&gt; .
  
 # DBpedia Spotlight returns:
  
@@ -5918,8 +5935,8 @@
  
 &lt;html&gt;
   &lt;body&gt;
-     &lt;h2 &gt;Welcome to Dublin in &lt;span 
-          its-ta-ident-ref="http://dbpedia.org/resource/Ireland” &gt;Ireland&lt;/span&gt;!&lt;/h2&gt;
+     &lt;h2&gt;Welcome to Dublin in &lt;span 
+          its-ta-ident-ref="http://dbpedia.org/resource/Ireland"&gt;Ireland&lt;/span&gt;!&lt;/h2&gt;
   &lt;/body&gt;
 &lt;/html&gt;</pre></div></div><p>Case 3: The NLP annotation created in NIF starts in one region and ends in another.
           Solution: No straight mapping is possible; a mapping can be created if both regions have
--- /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/its20.odd	2013/05/26 10:33:49	1.429
+++ /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/its20.odd	2013/05/28 21:51:06	1.430
@@ -140,8 +140,7 @@
           concepts (such as <q>Translate</q>) that are important for internationalization and
           localization, and defines implementations of these concepts (termed “ITS data categories”)
           as a set of elements and attributes called the <emph>Internationalization Tag Set
-            (ITS)</emph>. The document provides implementations for HTML, serializations in <ref
-            target="http://nlp2rdf.org/nif-1-0">NIF (NLP Interchange Format)</ref>, and provides
+            (ITS)</emph>. The document provides implementations for HTML, serializations in <ref target="http://persistence.uni-leipzig.org/nlp2rdf/">NIF</ref> (NLP Interchange Format) <ptr target="#nif-reference" type="bibref"/>, and provides
           definitions of ITS elements and attributes in the form of XML Schema <ptr
             target="#xmlschema1" type="bibref"/> and RELAX NG <ptr target="#relaxng" type="bibref"
           />.</p>
@@ -1668,7 +1667,7 @@
           <head>Conversion to NIF</head>
           <p>This section defines an algorithm to convert XML or HTML documents (or their DOM
             representations) that contain ITS metadata to the RDF-based format based on <ptr
-              target="#NIF" type="bibref"/>. The conversion results in RDF triples.</p>
+              target="#nif-reference" type="bibref"/>. The conversion results in RDF triples.</p>
           <note><p>The algorithm is intended to extract the text from the XML/HTML/DOM for an NLP
               tool. It can produce a lot of <quote>phantom</quote> predicates from excessive
               whitespace, which 1) increases the size of the intermediate mapping and 2) extracts
@@ -1696,63 +1695,75 @@
                 now have a list of ordered tuples ((x0,t0), (x1,t1), ..., (xn,tn)).</p></item>
             <item><p xml:id="its2nif-algorithm-step4">STEP 4 (optional): Serialize as XML or as RDF.
                 The list with the XPath-to-text mapping can also be kept in memory. Part of a
-                serialization example is given below. Note that in the example consists both of an RDF part and
-                and XML part (the <code>mappings</code> element).</p></item>
+                serialization example is given below. The upper part is in RDF Turtle Syntax while the lower part
+                is in XML (the <code>mappings</code> element).</p></item>
           </list>
-          <eg rend="text"><![CDATA[@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
-<http://example.com/exampledoc.html#xpath(x0)> 
-    nif:convertedFrom <http://example.com/exampledoc.html#char=b0,e0>
-<http://example.com/exampledoc.html#xpath(x1)>
-    nif:convertedFrom <http://example.com/exampledoc.html#char=b1,e1>
+          <eg rend="text"><![CDATA[# Turtle example:
+@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
+@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
+<http://example.com/exampledoc.html#char=b0,e0>
+ nif:wasConvertedFrom  <http://example.com/exampledoc.html#xpath(x0)>  .
+<http://example.com/exampledoc.html#char=b1,e1> 
+ nif:wasConvertedFrom <http://example.com/exampledoc.html#xpath(x1)>  .
 # ...
-<http://example.com/exampledoc.html#xpath(xn)>
-    nif:convertedFrom <http://example.com/exampledoc.html#char=bn,en>
+<http://example.com/exampledoc.html#char=bn,en> 
+ nif:wasConvertedFrom <http://example.com/exampledoc.html#xpath(xn)> .
+<!-- XML Example -->
 <mappings>
-  <mapping x="xpath(x0)" b="b0" e="e0" />
-  <mapping x="xpath(x1)" b="b1" e="e1" />
-  <!-- ... --> 
-  <mapping x="xpath(xn)" b="bn" e="en" />
-</mappings>]]></eg>
+ <mapping x="xpath(x0)" b="b0" e="e0" />
+ <mapping x="xpath(x1)" b="b1" e="e1" />
+ <!-- ... --> 
+ <mapping x="xpath(xn)" b="bn" e="en" />
+</mappings>
+]]></eg>
           <p>where</p>
           <eg rend="text"><![CDATA[b0 = 0
 e0 = b0 + (Number of characters of t0) 
-b1 = e0 +1 
+b1 = e0
 e1 = b1 + (Number of characters of t1) 
 ...
-bn = e(n-1) +1 
+bn = e(n-1)
 en = bn + (Number of characters of tn) 
 ]]></eg>
           <p>Example (continued)</p>
-          <eg rend="text"><![CDATA[@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
+          <eg rend="text"><![CDATA[# Turtle example:
+@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
+@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
 # "Welcome to "
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])> 
-    itsrdf:nif <http://example.com/exampledoc.html#char=0,11> .
+<http://example.com/exampledoc.html#char=0,11>  
+ nif:wasConvertedFrom
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])>.
 # "Dublin"
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/span[1]/text()[1])> 
-    itsrdf:nif <http://example.com/exampledoc.html#char=11,17> .
+<http://example.com/exampledoc.html#char=11,17> 
+ nif:wasConvertedFrom
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/span[1]/text()[1])>.
 # " in "
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[2])> 
-    itsrdf:nif <http://example.com/exampledoc.html#char=17,21> .
+<http://example.com/exampledoc.html#char=17,21>
+ nif:wasConvertedFrom
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[2])> .
 # "Ireland"
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])> 
-    itsrdf:nif <http://example.com/exampledoc.html#char=21,28> .
+<http://example.com/exampledoc.html#char=21,28>
+ nif:wasConvertedFrom  
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])> .
 # "!"
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[3])> 
-    itsrdf:nif <http://example.com/exampledoc.html#char=28,29> .
+<http://example.com/exampledoc.html#char=28,29>
+ nif:wasConvertedFrom
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[3])> .
 # "Welcome to Dublin Ireland!"
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text())> 
-    itsrdf:nif <http://example.com/exampledoc.html#char=0,29> .
+<http://example.com/exampledoc.html#char=0,29>
+ nif:wasConvertedFrom
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text())> .
 <mappings>
-  <mapping x="xpath(/html/body[1]/h2[1]/text()[1])" b="0" e="11" />
-  <mapping x="xpath(/html/body[1]/h2[1]/span[1]/text()[1])" b="11" e="17" />
-  <mapping x="xpath(/html/body[1]/h2[1]/text()[2])" b="17" e="21" />
-  <mapping x="xpath(/html/body[1]/h2[1]/b[1]/text()[1])" b="21" e="28" />
-  <mapping x="xpath(/html/body[1]/h2[1]/text()[3])" b="28" e="29" />
-  <mapping x="xpath(/html/body[1]/h2[1])" b="0" e="29" />
+ <mapping x="xpath(/html/body[1]/h2[1]/text()[1])" b="0" e="11" />
+ <mapping x="xpath(/html/body[1]/h2[1]/span[1]/text()[1])" b="11" e="17" />
+ <mapping x="xpath(/html/body[1]/h2[1]/text()[2])" b="17" e="21" />
+ <mapping x="xpath(/html/body[1]/h2[1]/b[1]/text()[1])" b="21" e="28" />
+ <mapping x="xpath(/html/body[1]/h2[1]/text()[3])" b="28" e="29" />
+ <mapping x="xpath(/html/body[1]/h2[1])" b="0" e="29" />
 </mappings>]]></eg>
           <list type="unordered">
             <item><p xml:id="its2nif-algorithm-step5">STEP 5: Create a context URI and attach the
-                whole concatenated text of the document as reference.</p></item>
+              whole concatenated text <code>$(t0+t1+t2+...+tn)</code> of the document as reference.</p></item>
             <item><p xml:id="its2nif-algorithm-step6">STEP 6: Attach any ITS metadata annotations from the XML/HTML/DOM input to the respective NIF URIs.</p></item>
             <item><p xml:id="its2nif-algorithm-step7">STEP 7: Omit all URIs that do not carry annotations (they will just bloat the data).</p></item>
           </list>
@@ -4888,7 +4899,7 @@
               <ref target="http://www.iana.org/assignments/character-sets">Character Sets</ref>
             </title> Available at <ref target="http://www.iana.org/assignments/character-sets"
               >http://www.iana.org/assignments/character-sets</ref>.</bibl>
-          <bibl xml:id="NIF" n="NIF">Hellmann, S.  (ed.). <ref target="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core">NIF 2.0 Core Ontology Version 1.0</ref>, version April 2013. Available at http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core under CC-BY 2.0  license. </bibl>
+          <bibl xml:id="nif-reference" n="NIF">Hellmann, S. et al. (ed.). <ref target="http://persistence.uni-leipzig.org/nlp2rdf/">NIF Core Ontology Version 1.0</ref>, as of May 2013. Available at http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core# under CC-BY 3.0  license. </bibl>
           <bibl xml:id="qa-framework" n="QAFRAMEWORK">Karl Dubost, Lynne Rosental, Dominique
             Hazaël-Massieux, Lofton Henderson. <title>
               <ref target="http://www.w3.org/TR/2005/REC-qaframe-spec-20050817/">QA Framework:
@@ -5735,18 +5746,23 @@
             Spotlight</ref>. For this example let's assume DBpedia Spotlight linked "Ireland" to
           DBpedia:</p>
         <eg rend="text"><![CDATA[<http://example.com/exampledoc.html#char=21,28> 
-    rdf:type                 nif:RFC5147String;
-    itsrdf:taIdentRef  <http://dbpedia.org/resource/Ireland> .
+ rdf:type nif:RFC5147String;
+ itsrdf:taIdentRef <http://dbpedia.org/resource/Ireland> .
 <http://dbpedia.org/resource/Ireland> 
-    rdf:type                 <http:/nerd.eurecom.fr/ontology#Country> .
-]]></eg>
+ rdf:type <http:/nerd.eurecom.fr/ontology#Country> .]]></eg>
         <p xml:id="nif2its-algorithm">The conversion algorithm to generate ITS out of NIF consists
           of two steps.</p>
         <list type="unordered">
           <item>
-            <p xml:id="nif2its-algorithm-step1">STEP 1: Send the text to any NIF Web service, which
-              creates the NLP annotation. The output of the Web service will be a NIF
-              representation.</p>
+            <p xml:id="nif2its-algorithm-step1">STEP 1: NIF Web services accept two different types of input. It is possible to either send the extracted text (the object of the <code>nif:iString</code> property) directly or  NIF RDF to the NLP tool, i.e. the text is send as a <code>nif:Context</code> node and included as <code>nif:isString</code>. Either way, the output of the Web service will be a NIF representation.
+            </p>
+            <p>Accepting text will be the minimal requirement of a NIF web service. Ideally, you would be able to send the <code>nif:Context</code> node with the isString as RDF directly, which has the advantage, that all other annotations can be used by the NLP tool:</p>
+            <eg><![CDATA[<rdf:Description rdf:about="http://example.com/exampledoc.html#char=0,29">
+ <nif:sourceUrl rdf:resource="http://example.com/exampledoc.html"/>
+ <nif:isString>Welcome to Dublin in Ireland!</nif:isString>
+ <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Context"/>
+</rdf:Description>
+]]></eg>
           </item>
           <item>
             <p xml:id="nif2its-algorithm-step3">STEP 2: Use the mapping from ITS2NIF (available
@@ -5758,13 +5774,14 @@
         <p>CASE 1: The NLP annotation created in NIF matches the text node. Solution: Attach the
           annotation to the parent element of the text node.</p>
         <eg rend="text"><![CDATA[# Based on:
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])> 
-   itsrdf:nif <http://example.com/exampledoc.html#char=21,28> .
+<http://example.com/exampledoc.html#char=21,28>
+ nif:wasConvertedFrom
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/b[1]/text()[1])> .
 # and:
 <http://example.com/exampledoc.html#char=21,28> 
-    itsrdf:taIdentRef  <http://dbpedia.org/resource/Ireland> .
+ itsrdf:taIdentRef  <http://dbpedia.org/resource/Ireland> .
 # we can attach the metadata to the parent node:
-<b its-ta-ident-ref="http://dbpedia.org/resource/Dublin” 
+<b its-ta-ident-ref="http://dbpedia.org/resource/Dublin" 
    translate="no">Ireland</b>
 ]]></eg>
         <p>CASE 2: The NLP annotation created in NIF is a substring of the text node. Solution:
@@ -5780,8 +5797,9 @@
  
 # ITS2NIF
  
-<http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])>
-    itsrdf:nif <http://example.com/exampledoc.html#char=0,29>
+<http://example.com/exampledoc.html#char=0,29>
+ nif:wasConvertedFrom
+ <http://example.com/exampledoc.html#xpath(/html/body[1]/h2[1]/text()[1])> .
  
 # DBpedia Spotlight returns:
  
@@ -5792,8 +5810,8 @@
  
 <html>
   <body>
-     <h2 >Welcome to Dublin in <span 
-          its-ta-ident-ref="http://dbpedia.org/resource/Ireland” >Ireland</span>!</h2>
+     <h2>Welcome to Dublin in <span 
+          its-ta-ident-ref="http://dbpedia.org/resource/Ireland">Ireland</span>!</h2>
   </body>
 </html>]]></eg>
         <p>Case 3: The NLP annotation created in NIF starts in one region and ends in another.

Received on Tuesday, 28 May 2013 21:51:13 UTC