[Attempto] the case of mixing RDF vocabularies : a FOAF example
Jean-Marc Vanel
jeanmarc.vanel at gmail.com
Wed Jun 13 13:59:43 CEST 2012
Hi,
and thanks for the thorough - and quick - answer !
2012/6/13 Kaarel Kaljurand <kaljurand at gmail.com>
> ....
i.e. ACE does not support namespaces in the sense that different names
> have to be used for different things.
>
> In the context of ACE->OWL/SWRL you can have lexicon entries like:
> pn_sg('Mary', iri('http://www.example.com/names#Mary'))
>
I tried this and it works.
I updated my lexicon this way :
cat foaf-lexicon.pl
tv_finsg('has-homepage' , iri('http://xmlns.com/foaf/0.1/#homepage') ).
tv_infpl('have-homepage' , iri('http://xmlns.com/foaf/0.1/#homepage') ).
tv_finsg('has-current-project' , iri('
http://xmlns.com/foaf/0.1/#currentProject') ).
tv_infpl('have-current-project' , iri('
http://xmlns.com/foaf/0.1/#currentProject') ).
noun_sg( 'person', iri('http://xmlns.com/foaf/0.1/#Person'), neutr ).
( BTW there must be a better way to write this Prolog, by avoiding pasting
the FOAF prefix at every line, and do a string concatenation ).
BTW the iri/1 predicate should be indicated in the doc.
Then I rerun APE :
% ape.exe -uri http://eulergui.sf.net/contact.owl -ulexfile
foaf-lexicon.pl -text 'If P is a person that has-homepage something and
has-current-project something then P is an n:interesting-contact .' -solo
owlxml > interesting-contact2.owl
and now the result is exactly as expected :
<Ontology
xml:base="http://www.w3.org/2002/07/owl#"
xmlns="http://www.w3.org/2002/07/owl#"
ontologyIRI="http://eulergui.sf.net/contact.owl">
<SubClassOf>
<ObjectIntersectionOf>
<ObjectIntersectionOf>
<Class IRI="http://xmlns.com/foaf/0.1/#Person"/>
<ObjectSomeValuesFrom>
<ObjectProperty IRI="http://xmlns.com/foaf/0.1/#homepage"/>
<Class IRI="http://www.w3.org/2002/07/owl#Thing"/>
</ObjectSomeValuesFrom>
</ObjectIntersectionOf>
<ObjectSomeValuesFrom>
<ObjectProperty IRI="*http://xmlns.com/foaf/0.1/#currentProject*"/>
<Class IRI="http://www.w3.org/2002/07/owl#Thing"/>
</ObjectSomeValuesFrom>
</ObjectIntersectionOf>
<Class
IRI="*http://eulergui.sf.net/contact.owl#interesting-contact*"/>
</SubClassOf>
</Ontology>
But ... there is a but ...
If load the resulting OWL/XML file into Protégé + ACE View 1.3.1, I found
no way to load my lexicon ( and I looked the doc. ) .
Hence the paraphrases produced are bad .
Moreover , the Lexicon view table is not editable.
I wonder if ACEWiki has a way to load a lexicon , and I think I saw that.
> which allow you to use the word 'Mary' in an ACE text and "show" it to
> OWL as the IRI "http://www.example.com/names#Mary". This solution
> would not give you the namespace prefix construct, i.e. you will not
> be able to say
>
> ns1:Mary is ns2:Mary.
>
Anyway I recognize that it's not very natural language-like .
--
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web +
rules, XML, UML, eCore, Java bytecode
+33 (0)6 89 16 29 52
chat : irc://irc.freenode.net#eulergui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ifi.uzh.ch/pipermail/attempto/attachments/20120613/2e842782/attachment.html>
More information about the attempto
mailing list