Difference between revisions of "Help:Adding External Ontologies"

From Biowikifarm Metawiki
Jump to: navigation, search
Line 2: Line 2:
  
 
==Reusing Ontology in Semantic Media Wiki==
 
==Reusing Ontology in Semantic Media Wiki==
The way in which Semantic MediaWiki represents knowledge was partially inspired by Web Ontology Language(OWL DL) and one can naturally relate the elements of the wiki, i.e. the individual content pages, to the basic vocabulary of OWL. Complex features of OWL are not used in Semantic MediaWiki
+
The way in which Semantic MediaWiki represents knowledge was partially inspired by the Web Ontology Language(OWL DL) and one can naturally relate the elements of the wiki, i.e. the individual content pages, to the basic vocabulary of OWL. Complex features of OWL are not used in Semantic MediaWiki, but it makes use of some characteristic OWL features such as equality reasoning and transitive roles.  
and it make use of some characteristic OWL features such as equality reasoning and transitive roles. Dividing OWL DL ontological elements into instances that represent '''individual elements''' of the described domain, '''classes''' that represent sets of individuals, and '''roles''' which represent binary relations between individuals.
+
 
Semantic MediaWiki can naturally relate the elements of the wiki to the basic vocabulary of OWL, i.e.:
+
OWL DL ontological elements are divided into those that represent '''individual elements''' of the described domain, '''classes''' that represent sets of individuals, and '''roles''' which represent binary relations between individuals.
* '''OWL individuals''' are represented by normal article pages which usually belongs to Main namespace. But several additional namespaces, such as Image or User, also could be interpreted as individuals.
+
* '''OWL individuals''' are represented by normal article pages which primarily belong to the default (= article) namespace. Several additional namespaces, such as Image or User, could also be interpreted as individuals.
 
* '''OWL classes''' in turn have counterparts in the wiki in form of MediaWiki categories in the Category namespace. These can be organized hierarchically, so one category could contain other categories.
 
* '''OWL classes''' in turn have counterparts in the wiki in form of MediaWiki categories in the Category namespace. These can be organized hierarchically, so one category could contain other categories.
 
* '''OWL properties''', (roles in description logic), do not have a natural counterpart in MediaWiki, and were introduced by the Semantic MediaWiki extension. The '''object-properties''' (describing relationships between two individuals from OWL DL) from '''data-properties''' (associating individuals with values of a given datatype). Both are represented by pages in Property namespace in Semantic MediaWiki (properties and attributes are unified now in SMW).
 
* '''OWL properties''', (roles in description logic), do not have a natural counterpart in MediaWiki, and were introduced by the Semantic MediaWiki extension. The '''object-properties''' (describing relationships between two individuals from OWL DL) from '''data-properties''' (associating individuals with values of a given datatype). Both are represented by pages in Property namespace in Semantic MediaWiki (properties and attributes are unified now in SMW).
 +
 
The export function that generates OWL/RDF documents associates URIs with all wiki pages.  
 
The export function that generates OWL/RDF documents associates URIs with all wiki pages.  
This very simple schema information allows also the main functionality of wiki, that is mainly used to provide concrete descriptions of individuals and their relationship (ABox in description logics).
+
This very simple schema information allows also the main functionality of wiki, that is mainly used to provide concrete descriptions of individuals and their relationship (ABox in description logics).  
Employing an OWL external ontology in combination with OWL wiki content depends on the type of entity that one considers, this is achieved with
+
 
''owl:sameAs'', ''owl:equivalentClass'', and ''owl:equivalentProperty''. Usually the only problem in doing so is the mapping between elements of the two ontologies. OWL provides us with expressive means to describe that two different URIs represent the same entity (with respect to its extensional interpretation).  
+
Employing an OWL external ontology in combination with wiki content depends on the type of entity that one considers. This is achieved with ''owl:sameAs'', ''owl:equivalentClass'', and ''owl:equivalentProperty''. Usually the only problem in doing so is the mapping between elements of the two ontologies. OWL provides expressive means to describe that two different URIs represent the same entity (with respect to its extensional interpretation).
  
  article pages           owl:sameAs URI            <nowiki>[[equivalent URI:=URI]]</nowiki>  
+
  article pages   individual owl:sameAs URI            <nowiki>[[equivalent URI:=URI]]</nowiki>  
  on category pages       owl:equivalentClass URI    <nowiki>[[equivalent URI:=URI]]</nowiki>
+
  category pages class      owl:equivalentClass URI    <nowiki>[[equivalent URI:=URI]]</nowiki>
  on property pages       owl:equivalentProperty URI <nowiki>[[equivalent URI:=URI]]</nowiki>
+
  property pages property  owl:equivalentProperty URI <nowiki>[[equivalent URI:=URI]]</nowiki>
  
 
==Use cases==
 
==Use cases==
  
* Inserting in any article page of <nowiki>[[Equivalent URI::http://biowikifarm.net/meta/]]</nowiki> will be translated in RDF export as:
+
* Inserting <nowiki>[[Equivalent URI::http://biowikifarm.net/meta/x]]</nowiki> in any article page will be translated in RDF export as:
  
 
  ....
 
  ....
  <nowiki><owl:sameAs rdf:resource="http://biowikifarm.net/meta/"/></nowiki>
+
  <nowiki><owl:sameAs rdf:resource="http://biowikifarm.net/meta/x"/></nowiki>
 
  ....
 
  ....
  
Line 28: Line 29:
 
  This is a property of type <nowiki>[[Has type::URI]]</nowiki>.
 
  This is a property of type <nowiki>[[Has type::URI]]</nowiki>.
 
  Having
 
  Having
  <nowiki>[[Equivalent URI::http://biowikifarm.net/meta/]]</nowiki>
+
  <nowiki>[[Equivalent URI::http://biowikifarm.net/meta/p]]</nowiki>
  
 
The RDF export represents this equivalence as:
 
The RDF export represents this equivalence as:
Line 36: Line 37:
 
   <swivt:page rdf:resource="http://biowikifarm.net/test/Property:Test_Equivalent"/>
 
   <swivt:page rdf:resource="http://biowikifarm.net/test/Property:Test_Equivalent"/>
 
   <rdfs:isDefinedBy rdf:resource="http://biowikifarm.net/test/Special:ExportRDF/Property:Test_Equivalent"/>
 
   <rdfs:isDefinedBy rdf:resource="http://biowikifarm.net/test/Special:ExportRDF/Property:Test_Equivalent"/>
   <owl:equivalentProperty rdf:resource="http://biowikifarm.net/meta/"/>
+
   <owl:equivalentProperty rdf:resource="http://biowikifarm.net/meta/p"/>
 
  </owl:ObjectProperty>
 
  </owl:ObjectProperty>
  
Line 57: Line 58:
 
  </owl:Class>
 
  </owl:Class>
  
'''Note:''' Take care to the equivalent URI property use because one of them could lead to a meaningless specification. For example, one could assign the same URI to both a class and an individual, or one could even assign the URIs of language constructs such as rdf:type to wiki elements.
+
'''Note:''' Take care when using the equivalent URI property use because one of them could lead to a meaningless specification. For example, one could assign the same URI to both a class and an individual, or one could even assign the URIs of language constructs such as rdf:type to wiki elements.
  
  
 
[[Category:Help]]
 
[[Category:Help]]

Revision as of 11:40, 9 May 2010

Help sections
Contents · Semantic MediaWiki · Semantic Forms
Add Ontology · Semantic links and import/export features · Import external vocabulary
Other SemanticMW extensions · Other extensions



Reusing Ontology in Semantic Media Wiki

The way in which Semantic MediaWiki represents knowledge was partially inspired by the Web Ontology Language(OWL DL) and one can naturally relate the elements of the wiki, i.e. the individual content pages, to the basic vocabulary of OWL. Complex features of OWL are not used in Semantic MediaWiki, but it makes use of some characteristic OWL features such as equality reasoning and transitive roles.

OWL DL ontological elements are divided into those that represent individual elements of the described domain, classes that represent sets of individuals, and roles which represent binary relations between individuals.

  • OWL individuals are represented by normal article pages which primarily belong to the default (= article) namespace. Several additional namespaces, such as Image or User, could also be interpreted as individuals.
  • OWL classes in turn have counterparts in the wiki in form of MediaWiki categories in the Category namespace. These can be organized hierarchically, so one category could contain other categories.
  • OWL properties, (roles in description logic), do not have a natural counterpart in MediaWiki, and were introduced by the Semantic MediaWiki extension. The object-properties (describing relationships between two individuals from OWL DL) from data-properties (associating individuals with values of a given datatype). Both are represented by pages in Property namespace in Semantic MediaWiki (properties and attributes are unified now in SMW).

The export function that generates OWL/RDF documents associates URIs with all wiki pages. This very simple schema information allows also the main functionality of wiki, that is mainly used to provide concrete descriptions of individuals and their relationship (ABox in description logics).

Employing an OWL external ontology in combination with wiki content depends on the type of entity that one considers. This is achieved with owl:sameAs, owl:equivalentClass, and owl:equivalentProperty. Usually the only problem in doing so is the mapping between elements of the two ontologies. OWL provides expressive means to describe that two different URIs represent the same entity (with respect to its extensional interpretation).

article pages   individual owl:sameAs URI             [[equivalent URI:=URI]] 
category pages  class      owl:equivalentClass URI    [[equivalent URI:=URI]]
property pages  property   owl:equivalentProperty URI [[equivalent URI:=URI]]

Use cases

  • Inserting [[Equivalent URI::http://biowikifarm.net/meta/x]] in any article page will be translated in RDF export as:
....
<owl:sameAs rdf:resource="http://biowikifarm.net/meta/x"/>
....
  • For property page, Test Equivalent property contains:
This is a property of type [[Has type::URI]].
Having
[[Equivalent URI::http://biowikifarm.net/meta/p]]

The RDF export represents this equivalence as:

<owl:ObjectProperty rdf:about="http://biowikifarm.net/test/Special:URIResolver/Property-3ATest_Equivalent">
 <rdfs:label>Test Equivalent</rdfs:label>
 <swivt:page rdf:resource="http://biowikifarm.net/test/Property:Test_Equivalent"/>
 <rdfs:isDefinedBy rdf:resource="http://biowikifarm.net/test/Special:ExportRDF/Property:Test_Equivalent"/>
 <owl:equivalentProperty rdf:resource="http://biowikifarm.net/meta/p"/>
</owl:ObjectProperty>
  • For classes, for example, we defined Category:TestCategory as sub-category of Category:Metadata Sources.

The page for Category:TestCategory looks like:

This category uses the form [[Has default form::TestForm]].
Define equivalence with Foaf vocabulary here:
  http://xmlns.com/foaf/spec/#term_Person
[[Category:Metadata Sources]]

In RDF export, Category:TestCategory page will be represented as:

<owl:Class rdf:about="http://biowikifarm.net/test/Special:URIResolver/Category-3ATestCategory">
  <rdfs:label>TestCategory</rdfs:label>
  <swivt:page rdf:resource="http://biowikifarm.net/test/Category:TestCategory"/>
  <rdfs:isDefinedBy rdf:resource="http://biowikifarm.net/test/Special:ExportRDF/Category:TestCategory"/>
  <owl:equivalentClass rdf:resource="http://xmlns.com/foaf/spec/#term_Person"/>
  <rdfs:subClassOf rdf:resource="http://biowikifarm.net/test/Special:URIResolver/Category-3AMetadata_Sources"/>
</owl:Class>

Note: Take care when using the equivalent URI property use because one of them could lead to a meaningless specification. For example, one could assign the same URI to both a class and an individual, or one could even assign the URIs of language constructs such as rdf:type to wiki elements.