<div class="gmail_extra">Sorry for the late reply; was busy with EulerGUI release.<br><br><div class="gmail_quote">2012/4/14 Kaarel Kaljurand <span dir="ltr"><<a href="mailto:kaljurand@gmail.com" target="_blank">kaljurand@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div class="im"><br>
On Thu, Apr 12, 2012 at 14:54, Jean-Marc Vanel <<a href="mailto:jeanmarc.vanel@gmail.com">jeanmarc.vanel@gmail.com</a>> wrote:<br>
> How to define OWL datatype properties ?<br>
> An example is "Every man has a name." , but is there a way to declare that<br>
> name is always a string ? And if yes, does it translate as expected to OWL ?<br>
<br>
</div>The OWL datatype support in the ACE->OWL/SWRL converter (that is part<br>
of APE) works so that if the argument of a transitive verb or<br>
of-construct or comparative/transitive adjective is a data item<br>
(number or string) then the relation is interpreted as a data<br>
property. Examples:<br>
<br>
/*1*/ Paul has "Paul".<br>
/*2*/ Paul's name is "Paul".<br>
/*3*/ A name of Paul is "Paul".<br>
/*4*/ Every man whose name is "Paul" is younger than 1000.<br>
<br>
The data property support in OWL goes beyond that: (1) in addition to<br>
talking about numbers and strings, one can talk about the more general<br>
data ranges (e.g. a number between 13-19), (2) one can talk about the<br>
data properties themselves (functionality, keyness). This is not<br>
supported in the ACE->OWL/SWRL mapping because we did not find a nice<br>
corresponding representation for these things in ACE.<br>
<br>
Your options are:<br>
<br>
1. Augment your ACE text with an OWL syntax that can express these<br>
things (e.g. the Manchester syntax)<br>
<br>
2. Post-process the OWL form which ACE->OWL/SWRL delivers, e.g. you<br>
could tag in the lexicon the words which you want to stand for data<br>
properties and data types:<br>
<br>
$ ./ape.exe -text "Every name is a string." -ulextext "noun_sg(name,<br>
dp_name, neutr). noun_sg(string, d_string, neutr)." -solo owlfsspp<br>
<br>
And then rewrite the resulting OWL:<br>
<br>
   SubClassOf(<br>
      :dp_name<br>
      :d_string<br>
   )<br>
<br>
into the OWL that you actually want:<br>
<br>
   DataPropertyRange(<br>
      :name<br>
      xsd:string<br>
   )<br>
<br>
In this case it seems quite trivial but I'm not sure about the general<br>
case. If there is a clear and general way to do it and we can come up<br>
with conventions how to tag the lexicon then this could be also<br>
integrated into the ACE->OWL/SWRL converter. </blockquote><div><br></div><div>I tried this expression that both expresses waht I wads searching, and actually works (with the git version ) :</div><div><br></div><div><div>
./ape.exe -text 'If X v:has-a-name Y then Y is a n:xsd_string.' -solo owlfsspp</div><div>Prefix(:=<<a href="http://attempto.ifi.uzh.ch/ontologies/owlswrl/test#">http://attempto.ifi.uzh.ch/ontologies/owlswrl/test#</a>>)</div>
<div>Ontology(<<a href="http://attempto.ifi.uzh.ch/ontologies/owlswrl/test">http://attempto.ifi.uzh.ch/ontologies/owlswrl/test</a>></div><div>   ObjectPropertyRange(</div><div>      :has-a-name</div><div>      :xsd_string</div>
<div>   )</div><div>)</div></div><div><br></div><div>And this nicely brings me to the next question I planed to ask (I asked it before, but nothing happened AFAIK ).</div><div>What is the best practice for refering to OWL classes and properties in another RDF namespace ?</div>
<div><br></div><div>I this particular case, I want to obtain directly ( no hacking and regular expressions ) :</div><div><br></div><div><div>ObjectPropertyRange(</div><div>      :has-a-name</div><div>      xsd:string</div>
<div> )</div></div><div><br></div><div>( I don't particularly recommend the underscore notation, it's just an example; some syntax must be standardized, and the OWL translator has to leverage on it  )</div><div><br>
</div><div>I consider that this is main missing feature in ATTEMPTO tool chain.</div><div>Defininig an ontology from scratch is the current ATTEMPTO use case, but extending one or more ontologies is also very important ( reuse is good practice ! ).</div>
<div>ATTEMPTO was born before the Semantic Web, and it has not yet fully adapted to it .</div><div><br></div><div>I'll enter this in the GitHub site in issues :</div><div><a href="https://github.com/Attempto/APE/issues">https://github.com/Attempto/APE/issues</a></div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Btw, APE is now on GitHub<br>
and easily forkable. </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Everybody's ideas are welcome in the form of<br>
GitHub pull requests. :)<br>
<br>
<a href="https://github.com/Attempto/APE" target="_blank">https://github.com/Attempto/APE</a><br>
<br>
</blockquote><div>Very good news !</div><div>It should have been announced on the list !</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Best regards,<br>

Kaarel<br>
_______________________________________________<br>
attempto mailing list<br>
<a href="mailto:attempto@lists.ifi.uzh.ch">attempto@lists.ifi.uzh.ch</a><br>
<a href="https://lists.ifi.uzh.ch/listinfo/attempto" target="_blank">https://lists.ifi.uzh.ch/listinfo/attempto</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jean-Marc Vanel<br>Déductions SARL - Consulting, services, training,<br>Rule-based programming, Semantic Web<br><a href="http://jmvanel.free.fr/" target="_blank">http://jmvanel.free.fr/</a> - EulerGUI, a turntable GUI for Semantic Web + rules, XML, UML, eCore, Java bytecode<br>
+33 (0)6 89 16 29 52<br>chat :  irc://<a href="http://irc.freenode.net#eulergui" target="_blank">irc.freenode.net#eulergui</a><br>
</div>