Docsity

AI & Knowledge Engineering with Protege & Ontologies at University of San Francisco - Prof, Study Guides, Projects, Research of Computer Science

Partial preview of the text

Download AI & Knowledge Engineering with Protege & Ontologies at University of San Francisco - Prof and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

Artificial Intelligence Programming^ Ontologies and Protege

Chris BrooksDepartment of Computer ScienceUniversity of San Francisco

Department of Computer Science — University of San Francisco – p. 1/

17-2: Graphical Representations^ •^ Logic is a very powerful representation language, but it can bedifficult for humans to work with.^ •^ In addition, the lack of structure between sentences in a KB canmake inference difficult.^ •^ A^ semantic network

is a way to graphically represent and reason about some logical concepts.

Department of Computer Science — University of San Francisco – p. 2/

17-4: Inference in a Semantic Net^ •^ Inference becomes easy in a semantic net; to answer questionsabout John, we follow the labeled edges emanating from the^ John^ node.^ ◦^ This is the same sort of inference done by modern OOlanguages to resolve inheritance.^ •^ Strengths: Knowledge is easily visualized, relationshipsbetween objects are clearer.^ •^ Weaknesses: only binary relations, no negation, disjunction, orexistential quantifiers.^ ◦^ We can extend semantic nets to include these features, butwe lose the transparency.^ ◦^ Instead, use a semantic net to model class/propertyrelations, and FOL (or something similar) to model rules.

Department of Computer Science — University of San Francisco – p. 4/

17-5: Knowledge Engineering^ •^ Logic provides one answer to the question of

how^ to say things.

-^ It does not tell us

what^ to say.

-^ Typically, this is the hard part. •^ We want to give our agent enough knowledge to solve all of theproblems we are interested in. •^ The process of building a knowledge base is referred to as^ knowledge engineering^ ◦^ Many of the same principles as software engineering.

Department of Computer Science — University of San Francisco – p. 5/

17-7: Knowledge Enginering^ •^ Select a vocabulary of classes, functions, predicates andconstants^ ◦^ This vocabulary is called an

ontology

-^ Encode general knowledge about the domain^ ◦^ Formally represent the knowledge gathered in step 2.^ ◦^ This may require revisiting step 3. •^ Encode specific queries or problems to be solved.^ ◦^ This may require returning to steps 3 and 4.

Department of Computer Science — University of San Francisco – p. 7/

17-8: Ontologies^ •^ An ontology is a vocabulary that describes all of the objects ofinterest in the domain and the relations between them.^ ◦^ All of the relevant knowledge about a problem we areinterested in.^ •^ Ontolgies allow knowledge about a domain to be sharedbetween agents (including humans).^ •^ This can allow knowledge to be reused more easily.^ •^ Allows an agent to perform inference with its current knowledge.

Department of Computer Science — University of San Francisco – p. 8/

17-10: Ontologies vs OO design^ •^ Classes are a primary focus of ontology design.^ •^ In many ways, this looks like object-oriented design.^ •^ We have classes and subclasses, and properties of classesthat look like data members.^ •^ However, properties have richer semantics than data members.^ •^ A property may attach to several classes at once.^ •^ Properties can have subproperties^ •^ We can specify constraints on the values in a property’s range.^ •^ Slots can exist without being assigned to a class.

Department of Computer Science — University of San Francisco – p. 10/

17-11: Protege^ •^ Protege is a Java-based graphical tool for constructingontologies.^ •^ Has a rich set of plugins for performing inference andvisualizing data.^ •^ Can export data in RDF and OWL for use with the SemanticWeb.

Department of Computer Science — University of San Francisco – p. 11/

17-13: The Pizza Tutorial^ •^ The pizza tutorial provides a nice tour of the issues involved increating an ontology in Protege with OWL.^ •^ We begin by asking

competency questions

  • these are

questions we’d like our KB to be able to answer.^ ◦^ What toppings are on a Margherita pizza?^ ◦^ Is the Americana pizza vegetarian?^ ◦^ What can I put on my pizza to make it spicy?^ ◦^ What pizzas have Tomato on them?

Department of Computer Science — University of San Francisco – p. 13/

17-14: Classes^ •^ As with OO design, we can work top-down, bottom-up, or in acombination of the two.^ •^ Let’s start by making a Pizza class.^ •^ We then make PizzaBase and PizzaTopping.^ ◦^ Make these disjoint.

Department of Computer Science — University of San Francisco – p. 14/

17-16: Properties^ •^ Now we can start to create Properties.^ •^ Add a ’hasIngredient’ property.^ ◦^ In Protege, properties can have subProperties.^ ◦^ Add subproperties hasTopping, hasBase.^ •^ We can also add inverse properties.^ •^ Also functional, inverse functional, symmetric, and transitive.^ •^ make hasBase functional.

Department of Computer Science — University of San Francisco – p. 16/

17-17: Domains and ranges^ •^ We can specify that properties can only apply to certain typesof objects.^ •^ set the range of hasTopping to be PizzaTopping^ •^ Set the domain of hasTopping to be Pizza.^ •^ Same for hasBase

Department of Computer Science — University of San Francisco – p. 17/

17-19: Types of pizzas^ •^ Add a subclass of pizza called NamedPizza.^ •^ Add a subclass of this: MargheritaPizza.^ •^ existential restriction: has Tomato and Mozzarella toppings.^ •^ Add Americana Pizza: clone Margherita, add Pepperoni^ •^ Add AmericanaHotPizza: clone Americana, add jalapenos.^ •^ Add SohoPizza: Margherita plus Olives, Parmesan.

Department of Computer Science — University of San Francisco – p. 19/

17-20: Reasoners^ •^ As your ontology gets large, it can be difficult to maintain:^ ◦^ Do you have the hierarchy right?^ ◦^ Are there contradictions?^ ◦^ Are there other relations that are entailed?^ •^ A big advantage of using this sort of tool is the ability to performthis inference automatically.^ •^ Tools for doing this are known as reasoners.^ •^ We’ll be using a particular reasoner known as RACER.

Department of Computer Science — University of San Francisco – p. 20/