Artificial Intelligence -- mini-project:
ontology creation
-
[preparation]
Read the theory of knowledge representation with the OWL ontology:
-
[10 points] Pizza tutorial:
(a) Get familiar with the Protégé tool for working with OWL ontologies
(http://protege.stanford.edu/). Get access to the working system
in the lab, or install it on your own computer. (There is also
Webprotege, but starting any serious work with this system may be risky.)
(b) Work the so-called OWL Pizza Tutorial (version 1.3):
http://mowl-power.cs.man.ac.uk/protegeowltutorial/resources/ProtegeOWLTutorialP4_v1_3.pdf
Please note the following issues/concepts:
- Open World Assumption / Reasoning
- Unique Names Assumption
- role, action, and effects of the reasoner (classifier)
- the effects of defining the domain and scope of object properties
- necessary conditions (SubClassOf), necessary and sufficient conditions
(EquivalentTo), and value restrictions in class definitions
- description logic (DL) elements in expressions: existential,
universal, and cardinality restrictions
In the assignment report, give the exercise numbers from the Pizza tutorial,
to which you have doubts, or which you have not successfully completed.
(c) Practice querying the ontology using description logic expressions (in
the DL Query tab). These are the expressions by which you created the
class restriction conditions in the Description panel. In Protégé (same in
TopBraid Composer) they are written in the so-called Manchester syntax, which
is described, among others, in the lecture PDF. Do the following exercises:
- Create and test the DL expressions defining the class for which you can
get some concise (short) non-empty result for the category: direct
superclasses, equivalence classes, direct subclasses, and instances. In
the report from this assignment provide four developed expressions and
the results obtained.
- To the created pizza ontology, add a condition for every pizza to have
exactly one base (PizzaBase). Synchronize the reasoner, to see whether
it detects errors in the ontology. Give the developed logical expression.
Explain why it is acceptable (and correct) that the created pizza instances
do not have a base.
- Create a MildPizza class as a defined subclass of the Pizza class with
a condition that it only has mild additives. Try to create a robust
definition, that is, formulated generally (and not eg. by enumerating all
permitted add-ons). Make sure the reasoner accepts the definition and
classified at least PizzaMargherita as mild. Give your defining expression.
(d) Practice polling the ontology with SPARQL (in the SPARQL Query tab).
In the report include examples of two complete queries and the results obtained.
Note: Protégé is a mature open source program that has existed since the 1980s
and probably has the largest user base in the world.
However, the current version 5 is new, and there are bugs (anyway it is the
recommended version - I do not recommend working with version 4 and especially
not with version 3, though the latter is very stable). It is good practice to
periodically save the developed ontology on file, and to have limited trust in
the Undo operation.
There are many alternative tools for ontological modeling. An example is the
commercial system Top Braid Composer (there is a free version suitable for
small projects). SPARQL queries can be performed using the ARQ utility that
can check the graph in the given local file, download afile from the specified
location on the Internet, or submit a query to the Internet `` SPARQL end
point.
-
[10 points] Exercise with the FOAF ontology.
Get familiar with the FOAF ontology (Friend-of-a-Friend):
http://en.wikipedia.org/wiki/foaf_(software). Then build your own
own profile using this ontology:
http://xmlns.com/foaf/0.1/.
Your profile should define one new property that does not exist in FOAF.
Note the correct definitions of the namespace, domain, and scope.
At least one of the domain or scope must be a normal FOAF class.
Save your FOAF ontology in two formats: N3 and RDF in two files (with
the ".rdf" and ".n3" sufixes) and place them on any web page you have
access to (if necessary, ask the instructor). Validate both with the RDF
validator: http://www.w3.org/RDF/Validator/.
Query your ontology using both DL and SPARQL.
In the assignment report, specify: (i) the URLs of both created files
(alternatively, defining expressions in RDF-XML or N3), and (ii) full DL and
SPARQL queries along with the responses.
-
[10 points] Explore some well-publicized domain ontologies available in the
Internet. Select one such domain ontology (ontology for a selected branch of
science, technology, or some aspect of life), find a SPARQL endpoint for this
ontology and show examples of acquiring knowledge by asking SPARQL queries and
obtaining answers. Explain the results.
Subsequently, create a small body of knowledge for your selected ontology
using Protégé. Show how you can query your ontology using both DL and SPARQL.
Your queries should not be limited to the facts you created, but should be
answered in connection with the domain ontology available in the Internet.