cltl / NAFFoLiAPy

Library for converting between FoLiA and NAF
GNU General Public License v3.0
2 stars 0 forks source link

[naf2folia] Questions regarding external reference resources #16

Open proycon opened 8 years ago

proycon commented 8 years ago

NAF makes heavy use of external references. In FoLiA it is preferred to delegate this to the set as much as possible, i.e. the classes in the set definition may refer to an external resource rather than referring elsewhere straight from the document. The document just refers to the classes and declares which set is used (a URI). Conversion of most of the wordnet/ODWN external references in NAF terms, to FoLiA's sense element, is done in this way now.

Nevertheless, various external references are of a higher order and will need to be handled as such in FoLiA as well. FoLiA calls this alignments and also has facilities to refer to elements inside external resources. An external resource has to be pointed at using a URI , otherwise it isn't a valid external reference. My problem now is that NAF's external references, however, don't explicitly refer to the resources, only by name. This would leave software in the dark as to where to obtain the resources and how to parse them.

My question is, where are the various resources you use as external references located? And in what format are they? I identified the following resources in some of the example documents, but this is not exhaustive:

For example, I managed to resolve one resource type fully already, an external reference to the ESO ontology. This was an external reference on a predicate (semantic role layer). Please correct me if I'm wrong:

NAF:

<externalRef reference="Motion" resource="ESO" />

FoLiA:

<alignment format="application/rdf+xml" class="ESO" xlink:href="https://raw.githubusercontent.com/newsreader/eso/master/ESO_Version2.owl" xlink:type="simple">                                                                             
    <aref id="http://www.newsreader-project.eu/domain-ontology#Motion" type="rdf:description"/>
</alignment>

FoLiA alignments themselves follow the set/class paradigm. The class of an alignment typically expresses what kind of reference it is. I opted for setting classes that correspond to the resources (i.e. ESO, wordnet, ODWN).

I suppose it's preferable if we can refer to these resources in RDF form where applicable.

In some cases, such as external references to Wikipedia or DBpedia on entities, you do already explicitly refer to the resource. Then I just convert it as-is, pointing to the web location:

<alignment format="text/html" class="wikipedia-db-nlEn" confidence="0.9999999" xlink:href="http://dbpedia.org/resource/Macintosh" xlink:type="simple"/>

and

<alignment format="text/html" class="spotlight_v1" confidence="0.9999999" xlink:href="http://nl.dbpedia.org/resource/Apple_Macintosh" xlink:type="simple"/>
proycon commented 6 years ago

(question still open)