Metadata,Ontologies, and the Semantic Web http://www.datascience4all.org Introduction to

Metadata,Ontologies, and the Semantic Web http://www.datascience4all.org Introduction to

Metadata,Ontologies, and the Semantic Web http://www.datascience4all.org Introduction to Computational Thinking and Data Science Yolanda Gil University of Southern California [email protected] CC-BY Attribution ACI-1355475 Last Updated: September 2016

Intended Audience Designed for students with no programming background who want to have literacy in data and computing to better approach data science projects Computational thinking: a new way to approach problems through computing Abstraction, decomposition, modularity, Data science: a cross-disciplinary approach to solving data-rich problems Machine learning, large-scale computing, semantic metadata, workflows, https://creativecommons.org/licenses/ by/2.0/ These materials are

released under a CCBY License You are free to: Share copy and redistribute the material in any medium or format Adapt remix, transform, and build upon the material for any purpose, even commercially. Artwork taken from other sources is acknowledged The licensor cannot revoke these freedoms as long as you follow the where it license terms. appears. Under the following terms: Artwork that is

Attribution You must give appropriate credit, provide a link to not the license, acknowledged and indicate if changes were made. You may do so in any reasonable is by the manner, Please credit as: Gil, Yolanda (Ed.) Introduction to but not in any way that suggests the licensor endorses you or your author. Computational Thinking and Data Science. Available from use. http://www.datascience4all.org If you use an individual slide, please place the following at the bottom: Credit: http://www.datascience4all.org/

As editors of these materials, we welcome your feedback Acknowledgments ACI-1355475 These course training materials were originally developed and edited by Yolanda Gil (USC) with support from the National Science Foundation with award ACI-1355475 They are made available as part of http://www.datascience4all.org The course materials benefitted from feedback from many students at USC and student interns, particularly Taylor Alarcon (Brown University), Alyssa Deng (Carnegie Mellon University), and Kate Musen (Swarthmore College) We welcome new contributions and suggestions

Metadata Topics I. Semantic metadata II. Ontologies III. The Semantic Web 5 I. Semantic Metadata Introduction to Computational Thinking and Data Science

Yolanda Gil [email protected] Fall 2016 Semantic Metadata 1. Metadata 2. A basic introduction to knowledge representation 3. Knowledge bases and reasoning 4. Frame systems 5. Examples of frame systems 6. Representing metadata 7 Metadata versus Data

Publisher: New York Times Publication date: May 29, 2015 Author: Paul Krugman Title: The Insecure American 8 Data vs Metadata 9 Metadata 10 What is Metadata Metadata is information that provides context key to

understand what the data represents Metadata is typically Manually provided Often missing Metadata can be automatically captured By a sensor or instrument By a workflow system 11 Types of Metadata Descriptive metadata: Location, collection frequency, object (rock, patient), etc Data characteristics: Size, statistical properties,

Provenance metadata: What instruments was used, what method or software was used to generate it, how were parameters set, etc 12 Typical Metadata About Data Collection Collection time Collection location Collection instrument Collection frequency Collection process Attribution 13

Typical Metadata about Data Processing Method/algorithm/ codes Configuration/ settings Attribution Execution time 14 Semantic Metadata Structure Structure d

d and and explicit explicit (machine (machine readable) readable) Unstructured Unstructured and and not not explicit explicit (not (not machine machine

readable) readable) 15 Uses of Metadata 1. Facilitate reuse by others 2. Support queries on data repositories 3. Explain a data analysis by providing context for the data 4. Enable automated data integration 16 Metadata Vocabulary

A metadata vocabulary is the set of the terms used to describe metadata Average Hourly Average Population Average Average Age 17 A Well-Known Metadata Vocabulary: The Dublin Core From library sciences http://dublincore.org/documents/dcmi-terms/

http://dublincore.org/documents/dcq-rdf-xml/ 18 A Well-Known Provenance Vocabulary: PROV actedOnBehalfOf http://www.w3.org/TR/prov-primer/ 19 Metadata Standard A metadata standard is a vocabulary that is agreed upon by a

community and are adopted for structured metadata A vocabulary is designed based on its broad applicability and how well it supports uses of the metadata 20 Domain-Specific Metadata Concert admission time intermission time intermission duration

National Parks max elevation campground entrance river Musicians band singer drummer 21 Domain-Independent Metadata Events timepoint interval

year Geography point line region Authorship name affiliation birthplace birthdate location

22 A World of Metadata: From General to Specific More general Events timepoint interval year More specific Concert admission time intermission time

intermission duration Geography point line region Authorship name affiliation birthplace birthdate location

National Parks max elevation campground entrance river Musicians band singer drummer 23 A World of Metadata: Interconnections More general

Events timepoint interval year More specific Concert admission time intermission time intermission duration Geography point line region

Authorship name affiliation birthplace birthdate location National Parks max elevation campground entrance river

Musicians band singer drummer 24 Representing Metadata Metadata captures knowledge about objects in the domain of interest Sensors People Locations Communications Events

It is important to learn computational concepts for knowledge representation These representations are key to communicate important expertise to collaborating data scientists and computer scientists 25 A Basic Introduction to Knowledge Representation

26 Knowledge Representation Knowledge is a set of beliefs held by an agent that determine its behavior I know two major events that took place in 1492 My cat knows where to find her food Siri knows who won the Superbowl Knowledge representation is a field of artificial intelligence devoted to developing and implementing computer languages to capture knowledge AI, logic, philosophy, 27

Meta-Knowledge Knowledge Objects My car Their properties My car is blue Events I parked my car this morning Abstract processes Every Tuesday I drive to campus and teach a class

MetaKnowledge Uncertainty I suspect B I am confident that B Attitude He hopes that B They regret that B Intentions Id like to go to the beach, but I will study instead

28 Our Our focu focu ss Descriptive Knowledge Descriptive Classes (types) of objects Bicycles, tricycles, Instances of those

classes My bicycle Property types Spouse, sibling (brother, sister) Property values All spouses are people Procedural Abstractions Ill go to the airport (by car,

bus, or taxi) Sequences First you wash, then you rinse Complex orderings Once you turn left on Sunset you may find parking on the left or on the right but dont park in the street Resources To open the canister, use a sharp object 29

Knowledge Bases and Reasoning 30 Knowledge Base Symbols are labels that can be used to refer to entities in the world Several symbols may exist for the same object 7, VII Beijing,

Peking, A knowledge representation language specifies A notation for how to use symbols to represent beliefs An algorithm and associated rules for how to use symbols to do reasoning An example of a knowledge representation language is first-order logic A knowledge base is a set of beliefs expressed in a knowledge representation language and used by a system to generate its behavior 31

Knowledge Systems Knowledge systems contain a knowledge base of beliefs that is used to generate their behavior Their behavior changes when new beliefs are added If they exhibit wrong behaviors, beliefs can be changed to

fix them They can generate an explanation (or proof) about how their behavior results from using logical inference 32 Reasoning Reasoning is done over symbols much like calculations are done over numbers Reasoning uses a logic

system to do inference: a system of general logic rules to deduce new beliefs from initial beliefs in a knowledge base Natural deduction is an example of a logic system modus ponens is a rule in natural deduction If I believe that if A then B, and A is true, then I can deduce that B must be true

33 Knowledge Representation 55 miles measurement value number unit distancevalue 55-mile 55

distance-unit mile 3 Knowledge Representation System Three components: 1. Knowledge representation language: what symbols can be used and how to combine them so the system understands 2. Logic rules: how can the system infer new things given what it is told 3. Reasoning algorithm: how will the system use the symbols and the logic rules 35

Representing Descriptive Knowledge: Common Expressions Needed Types Faculty, staff, students Subtypes Student: graduate, undergraduate Disjointness Student vs faculty Exhaustiveness University student: graduate, undergraduate, post-graduate

Inverses Advisor/advisee Symmetry Classmate Restrictions/constraints Students must be registered for courses Definitions Engineering students are those that declare Engineering as their major 36 Frame Systems 37

Frame Systems: Representation Individual frames: represent specific objects or entities Paul, George, John, Ringo, The Beatles Generic frames: represent categories or classes of individuals Person, Musician, Band Slots: represent

properties that are attached to a frame Bands have members Values: represent fillers of a frames slots, which can be other frames The members of The Beatles were Peter, 38 An Example Frame System: Bracket notation Formal Language (I)

is-a instance-of [Person [George instance-of Musician] [Ringo instance-of Musician] [age Number] [John instance-of Musician] [birthplace Location] [Paul instance-of Musician]

] [Musician [Yoko instance-of Person] [is-a Person] [TheBeatles ] [instance-of Band] [Band [member Musician] [member Paul]

[debutYear Year] [member George] [groupie Person] [member Ringo] [member John] [groupie Yoko] ] ] 39 An Example Frame System: Formal Language (II) Multiple parents

[John instance-of Musician] [Songwriter [John instance-of Songwriter] [is-a Person] ] 40 An Example Frame System: Logic Rules (I) Inheritance from parent classes (Multiple inheritance) [John instance-of Musician] [Songwriter

[John instance-of Songwriter] [is-a Person] [John instance-of Guitarist] ] [Guitarist [is-a Musician] [plays Guitar] ] Is [John plays Guitar] true? Yes, inherited by the frame John from its parent

frame Guitarist 41 An Example Frame System: Logic Rules (II) sification: organizing generic frames according to generalization/specia [Songwriter [is-a Person] ] [Musician [is-a Person] ] [Guitarist [is-a Musician] [plays Guitar] ]

[Singer [is-a Musician] Is [Singer is-a Person] true? Yes, by classification of the frame Singer as an specialization of the generic frame 42 An Example Frame System: Logic Rules (III) cognition: whether a new individual frame is an instance of a generic fra [Songwriter [is-a Person]

[Bruce instance-of Musician] [Bruce plays Guitar] ] [Guitarist [is-a Musician] [plays Guitar] ] Is [Bruce instance-of Guitarist] true? Yes, by recognition of the frame Bruce as an instance of the generic frame 43

An Example Frame System: Logic Rules (IV) Mark Yoko as inconsistent? Or assume Yoko to be a Musician? [Person [age Number] [birthplace Location] [George instance-of Musician] [Ringo instance-of Musician] [John instance-of Musician] [Paul instance-of Musician] [Yoko instance-of Person]

] [Musician [is-a Person] [TheBeatles ] [instance-of Band] [Band [member Musician] [member Paul] [debutYear Year]

[member George] [groupie Person] [member Ringo] [member John] [groupie Yoko] [member Yoko] ] ] 44 An Example Frame System: ReasoningAlgorithm:

Algorithm Given: A knowledge base KB of generic frames and individual frames A question about a belief B about frame F Output: Yes/No 1. Classify generic frames If inconsistency is detected, return Inconsistent If belief B is in KB then return Yes,

otherwise continue 2. Recognize individual frames If inconsistency is detected, return Inconsistent If belief B is in KB then return Yes, otherwise continue 3. Inherit slot values for all frames If inconsistency is detected, return Inconsistent If belief B is in KB then return Yes, otherwise continue

45 Logic Systems: Summary To describe a frame system as a logic system we had to specify: 1. A formal language is-a, instance-of, etc 2. Logic rules Inheritance, classification, etc. Decide whether to flag inconsistencies or make

assumptions Important characteristics of a logic system: Expressivity What its formal language can represent Soundness The logic works as intended Decidability Undecidable if it may never return an answer Computational complexity How much computation is

required to get an answer Explainability Can an understandable proof/explanation be generated 46 Examples of Frame Systems 47 A More Complex Frame System: Moreimmediately Logic Rules

IF-ADDED: slot computed IF-NEEDED: slot computed if asked [Person [George instance-of Musician] [age Number] [Ringo instance-of Musician] [birthplace Location] [John instance-of Musician] ] [Paul instance-of Musician]

[Musician [Yoko instance-of Person] [is-a Person] ] [TheBeatles [Band [member Musician] [instance-of Band] [debutYear Year] [member Paul]

[groupie Person] [member George] [age [member Ringo] IF-ADDED[offset(debutYear)]] [member John] [size IF-NEEDED[count(enumerate(member))]] ] [groupie Yoko] ]

48 A More Expressive Frame System: An Extended Language Constraints on slots Rules [PopularBand [Musician [is-a Band]

[is-a Person] [debutYear Year] ] [exists 1 groupie] [Guitarist ] [is-a Musician] [plays Guitar] [If [and [B instance-of Band] ]

[B member M] [Band [P married-to M]] [member at-least 2 Musician] [member [one-of Guitarist Vocalist ] Then [B groupie P] ] [debutYear Year] [groupie Person] ] 49

A Simpler Frame System: Wikipedias Categories and Infoboxes 50 A Simpler Frame System: The Google Knowledge Graph 51 Representing Metadata 52 Representing Metadata

Metadata usually descriptive knowledge about objects and their properties and can be represented in a frame language A playlist: metadata about songs A timeseries: metadata about timestamps and variables A phone company: metadata about call time and duration Twitter: metadata about followers Beyond metadata, knowledge representation languages can be used to describe formally a domain Source of useful features for machine learning 53 Knowledge Representation System

Three components: 1. Knowledge representation language: what symbols can be used and how to combine them so the system understands 2. Logic rules: how can the system infer new things given what it is told 3. Reasoning algorithm: how will the system use the symbols and the logic rules 54 Challenges Knowledge Bases Logic System Can be:

Can be: Incomplete Are missing some fact Undecidable Cannot guarantee to Inaccurate Contains false beliefs Inconsistent Contain mutually exclusive beliefs generate a yes/no answer to a question through logic

inference Computationally complex Time to get an answer as a function of the size of the knowledge base e.g., O(2n) 55 Semantic Metadata 1. Metadata 2. A basic introduction to knowledge representation 3. Knowledge bases and reasoning 4. Frame systems 5. Examples of frame systems 6. Representing metadata

56 II. Ontologies and the OWL Web Ontology Language Introduction to Computational Thinking and Data Science Yolanda Gil [email protected] Fall 2016 Ontologies 1. The expressivity/complexity tradeoff 2. OWL: The Web Ontology Language 1. Classes in OWL 2. Properties

3. Class definitions 4. Logic rules 5. Reasoning algorithm 6. Dialects of OWL 3. 4. Designing an ontology Expressivity/ Complexity Tradeoffs Challenges of Using Knowledge Systems Knowledge Bases Logic System

Can be: Can be: Incomplete Are missing some fact Undecidable Cannot guarantee to Inaccurate Contains false beliefs Inconsistent Contain mutually exclusive beliefs

generate a yes/no answer to a question through logic inference Computationally complex Time to get an answer as a function of the size of the knowledge base e.g., O(2n) 60 Representing Descriptive Knowledge: Common Expressions Needed Types Faculty, staff, students Subtypes Student: graduate,

undergraduate Disjointness Student vs faculty Exhaustiveness University student: graduate, undergraduate, post-graduate Inverses Advisor/advisee Symmetry Classmate Restrictions/constraints Students must be registered for courses

Definitions Engineering students are those that declare Engineering as their major 61 Ontologies An ontology is a shared conceptualization of the world containing descriptive knowledge More information than just a vocabulary (ie a collection of terms) Ontology refers to generic frames, not individual frames Thought the distinctions are hard to make sometimes

Eg is a Prius a generic frame or an individual frame? Ontologies are more expressive than frame systems OWL: The Web Ontology Language OWL Topics 1. OWL overview 2. Representing knowledge in OWL 1. Classes in OWL 2. Properties 3. Class definitions 4. Logic rules 5. Reasoning algorithm 6. Dialects of OWL 6

OWL: The Web Ontology Language A standard language for the web (like HTML) Logic system: a description logic Represents descriptive knowledge (ie, about objects) A more elaborate version of a frame system As with any logic system, we will study The language The rules The reasoning algorithm There are actually 3 versions (species) of it with different expressivity and complexity OWL Classes Root Classes

Root classes are major categories of objects A root class is a subclass of Thing Musician subClassOf Thing . MusicalGroup subClassOf Thing . Instrument subClassOf Thing . Parent/Sibling Classes Sibling classes share the same parent class Thing has no parents Musician subClassOf Thing . MusicalGroup subClassOf Thing . Instrument subClassOf Thing . Disjoint Classes Make classes disjoint if instances cannot belong to more

than one sibling class Consider specifying sets of sibling classes that are disjoint Musician subClassOf Thing . MusicalGroup subClassOf Thing . Instrument subClassOf Thing Person subClassOf Thing . DisjointSubClasses Musician MusicalGroup Instrument . Class Hierarchies Create classes for terms/categories that you use to describe

objects, and relate them to one another Instrument subClassOf Thing . Saxophone subClassOf WindInstrument . WindInstrument subClassOf Instrument . Bassoon subClassOf WindInstrument . StringInstrument subClassOf Instrument . Trumpet subClassOf WindInstrument . Voice subClassOf Instrument . PercussionInstrument subClassOf Instrument .

Piano subClassOf KeyboardInstrument . What about electric instruments? Violin subClassOf StringInstrument . Cello subClassOf StringInstrument . ElectricGuitar subClassOf StringInstrument. Alto subClassOf Voice . Tenor subClassOf Voice . Bass subClassOf Voice . DrumSet subClassOf PercussionInstrument . Piano subClassOf KeyboardInstrument . Multiple Class Hierarchies (Multiple Parent Classes) Instrument subClassOf Thing .

Saxophone subClassOf WindInstrument . WindInstrument subClassOf Instrument . Bassoon subClassOf WindInstrument . StringInstrument subClassOf Instrument . Trumpet subClassOf WindInstrument . Voice subClassOf Instrument . PercussionInstrument subClassOf Instrument . Accordion subClassOf Instrument . ElectricInstrument subClassOf Instrument .

Violin subClassOf StringInstrument . Cello subClassOf StringInstrument . ElectricGuitar subClassOf StringInstrument . Alto subClassOf Voice . Keyboard subClassOf ElectricInstrument . Tenor subClassOf Voice . ElectricGuitar subClassOf ElectricInstrument . Bass subClassOf Voice . DrumSet subClassOf PercussionInstrument . hat about a percussion string instrument? Piano

subClassOf KeyboardInstrument. Disjoint Classes (but only for some sibling classes) Instrument subClassOf Thing . Saxophone subClassOf WindInstrument . WindInstrument subClassOf Instrument . Bassoon subClassOf WindInstrument . StringInstrument subClassOf Instrument . Trumpet subClassOf WindInstrument . Voice subClassOf Instrument . PercussionInstrument subClassOf

Instrument . KeyboardInstrument subClassOf Instrument . ElectricInstrument subClassOf Instrument . Violin subClassOf StringInstrument . Cello subClassOf StringInstrument . ElectricGuitar subClassOf StringInstrument . Alto subClassOf Voice . Keyboard subClassOf ElectricInstrument . Tenor subClassOf Voice . ElectricGuitar subClassOf ElectricInstrument . Bass subClassOf Voice .

DisjointClasses WindInstrument DrumSet subClassOf PercussionInstrument . StringInstrument Voice PercussionInstrument . Piano subClassOf KeyboardInstrument. OWL Properties Instances Instances are the objects in a class Instances can belong to more than one class Beatles type MusicalGroup . Beatles type PopularCulture.

7 Properties Properties represent relations between entities Properties can be organized into classes MusicalGroup hasMember Musician . MusicalGroup hasManager Manager . Musician playsInstrument Instrument . playsViolin subPropertyOf playsInstrument . 7 Datatypes Special classes for very common kinds of data Already defined in the system

Include: String, Integer, PositiveInteger, NonNegativeInteger, Decimal, Date, DateTime, MusicalGroup ensembleSize positiveInteger. Beatles ensembleSize 4. 7 Property Domains and Ranges Property domain: the class that the property applies to Property range: the class of the propertys values hasMember domain MusicalGroup ; range Musician .

7 Property Constraints (I) Inverse, disjoint, reflexive, symmetric, hasManager inverseOf manages . hasManager propertyDisjointWith hasMember . x type ReflexiveProperty . x type SymmetricProperty . x type AsymmetricProperty . 7 Property Constraints (II) Cardinality constraints on the amount of property

values Quartet type [ type Restriction ; cardinality 4 ; onProperty hasMember ] . 7 Property Constraints (III) Constraints on the types of property values someValuesFrom: at least one value is from the given range allValuesFrom: if there are any values, they are from the given range SymphonyOrchestra type Class ;

equivalentClass [ type Restriction ; hasMember someValuesFrom StringInstrumentPlayer; ] . StringEnsemble type Class ; equivalentClass [ type Restriction; hasMember allValuesFrom StringInstrumentPlayers ; ] . 8 OWL: Class Definitions Class Definitions Any instance of the class satisfies the definition

Any instance that satisfies the definition is in the class Is this a good definition? Band equivalentClass [ type Restriction ; hasMember someValuesFrom Musician; hasManager someValuesFrom Manager; ] . 8 Class Definitions Any instance of the class satisfies the definition Any instance that satisfies the definition is in the class

Is this a good definition? Band equivalentClass [ type Restriction ; hasMember someValuesFrom Musician; hasManager someValuesFrom Manager; ] . No, because this allows a non-Manager to be a manager of a band. 8 Class Definitions Any instance of the class satisfies the definition Any instance that satisfies the definition is in the class

This is a good definition: Band equivalentClass [ type Restriction ; hasMemeber someValuesFrom Musician; hasManager allValuesFrom Manager; hasMemeber allValuesFrom (Musician Groupie) ; ] . A band with only musicians and groupies as members and managers as managers 8 Class Definitions (Contd) Can have property definitions using the same constructs NonWindInstrumentPlayer equivalentClass

[ intersectionOf ( [complementOf WindInstrumentPlayer] InstrumentPlayer ) ] . locatedIn a TransitiveProperty , ObjectProperty ; inverseOf locationOf. 8 Class Unions All individuals are in at least one of the classes The classes do not have to be disjoint Quartet equivalentClass [ type Class ;

unionOf ( StringQuartet WindQuartet BarbershopQuartet ) ] . 8 Class Intersections All individuals are in both classes ElectricGuitarist equivalentClass [ type Class intersectionOf ( ElectricInstrumentPlayer Guitarist) ] . 8 Description Logics Description logics are logic systems that allow

classes to have descriptions, and the reasoning algorithm uses those descriptions to do classification and recognition Classification: detect that a class is a subclass of another Recognition: detect that an instance belongs to a class All instances of a subclass are also instances of the parent class 8 OWL: Logic Rules OWL: Logic Rules 1. Inheritance, multiple inheritance 2. Classification, given class definitions

3. Recognition of instances, given class definitions and instance properties 4. Assume whatever is needed to make things consistent 5. 9 Determining Truth in a Knowledge Base In a database, all is thoroughly listed E.g., all students E.g., all employees

We assume that if not listed, it is not included E.g., an person not listed is not a student In a knowledge base, things may not be listed because it is expected that they will be inferred E.g., groupies of a band are persons that attend more than 3 concerts Julie has attended 4 concerts of ColdPlay

So if something is not listed, we cannot assume it is not included 9 Closed- and Open-World Reasoning Paul member TheBeatles ; John member TheBeatles ; Ringo member TheBeatles ; George member TheBeatles ; Yoko groupie TheBeatles ; Closed-World If B is in the KB, then the answer is true

If not B is in the KB, then the answer is false If nothing is known about B, then the answer is false Databases Paul member TheBeatles ; John member TheBeatles ; Ringo member TheBeatles ; George member TheBeatles ; Yoko groupie TheBeatles ; Is this true: Obama groupie TheBeatles Open-World

If B is in the KB, then the answer is true If not B is in the KB, then the answer is false If nothing is known about B, then the answer is unknown OWL OWL: Logic Rules 1. Inheritance, multiple inheritance 2. Classification, given class definitions 3. Recognition of instances, given class

definitions and instance properties 4. Assume whatever is needed to make things consistent 5. Open-world assumption 9 OWL: Reasoning Algorithm OWL Reasoning Algorithm Very complicated, we will not cover it The more advanced constructs in the language, the more complicated the algorithm is

Higher computational complexity as well OWL has several versions of the language with different tradeoffs in 9 Dialects of OWL The Three Original Dialects of OWL 1. OWL DL Expressivity of description logics: boolean combinations of class restrictions, disjointness, union, intersection Decidable (it will give an answer)

2. OWL Lite A subset of OWL DL: class hierarchy, a few constraints (atLeast, atMost, exactly 1 or 0) 3. OWL Full Most expressive: classes can be instances, arbitrary cardinality Undecidable 9 Class Exercise Running Example: Describing Pizzas Crust thickness wheat vs gluten-free

Toppings meats, veggies, Cheeses mozzarella, parmesan, Classic pizzas Margherita, meat lovers, Classes vs instances Is pepperoni an instance? Or a class? Properties A pizza has toppings, but is

cheese a topping or a separate property? Class definitions What makes a pizza a pizza? Multiple views Topping food type (veggie, meat) Topping spiciness Philosophical matters Class Exercise Classes vs instances Is pepperoni an instance? Or a class?

Properties A pizza has toppings, but is cheese a topping or a separate property? Class definitions What makes a pizza a pizza? Multiple views Topping food type (veggie, meat) Topping spiciness Philosophical matters Assume you work for a

business, and would like to represent pizzas so you can bill customers 1. A phone-order pizza business 2. A self-service restaurant 3. A fancy restaurant 4. A supermarket Your task is to create some frames for: crust, toppings, cheeses, and classic pizzas Take Aways from Exercise: Ontology Design 1. Purpose and uses 2. Scope 3. Granularity

4. Modeling decisions 1 Designing An Ontology Collect typical queries that will be asked of a KB Identify the objects in the queries and the answers Create beliefs that describe the objects/properties in those queries Each of those objects should have a corresponding class

Discern what properties are common to sets of objects, that may be a candidate for a class Question types: The 5 Ws Who What Where When How Ontologies 1. The expressivity/complexity tradeoff 2. OWL: The Web Ontology Language 1. Classes in OWL

2. Properties 3. Class definitions 4. Logic rules 5. Reasoning algorithm 6. Dialects of OWL 3. 4. Designing an ontology III. The Semantic Web Introduction to Computational Thinking and Data Science Yolanda Gil [email protected] Fall 2016

The Semantic Web 1. Example: biomedical knowledge on the Web 2. Distributed ontologies on the Web 3. RDF 4. Finding Ontologies on the Web 5. Linked Data on the Web 1 Why Distributed Ontologies: Biomedical Knowledge on the Web 1

In the Beginning (circa 1998) GenBank 107 The Gene Ontology (GO) http://www.geneontology.org/ Three Organisms Three Focus Areas Cellular component Biological process Molecular function

108 Concepts and the Relationships Among Them 109 Sample GO Term http://geneontology.org/page/ontologydocumentation 110 111 112 Concepts and the

Relationships Among Them 113 Distributed Ontologies on the Web 1 Ontologies On the Web: Friend of a Friend (FOAF) https://en.wikipedia.org/wiki/FOAF_(ontology) namespace 115

Linking Ontologies 1) Through URLs/URIs @prefix @prefix @prefix @prefix @prefix : . foaf: . time: . rdf: . owl: . :faculty rdfs:subClassOf foaf:Person . :student rdfs:subClassOf foaf:Person .

:graduation rdfs:subclassOf time:event. namespace 116 Linking Ontologies 2) Mapping Terms In owl: sameAs yale:professor owl:sameAs usc:faculty . Using the SKOS standard vocabulary broader narrower

related 1 RDF 1 RDF: The Resource Description Framework Simple logic language where beliefs are triples: Examples:

1 p://www.w3.org/TR/2014/NOTE-rdf11-primer-20140624/ 1 Giving Meanings to Hyperlinks on the Web tp://www.w3.org/TR/2014/NOTE-rdf11-primer-20140624/ 1 Wikidata [Vrandecic et al @ WikiMedia Foundation 2012]

1 Wikidata [Vrandei and Krtzsch, CACM 2014] http://www.wikidata.org/wiki/Q123076 1 Finding Ontologies on the Web 1 Finding Ontologies on the Web: Semantic Search Engines http://watson.kmi.open.ac.uk/WatsonWUI/

1 Popular Ontologies: schema.org 1 Microdata Microdata is markup added to HTML files that search engines use 1 Ontologies vs Taxonomies vs Vocabularies Vocabularies: a set of terms Taxonomies: a hierarchical organization of terms

Ontologies: formal taxonomies with logic constraints 1. Mathematical logic provides formal semantics for what the hierarchies mean Subclasses imply containment of instances Instances of a class have all the properties of the class 2. Logic constraints Example: all humans have exactly one biological mother 128 Linked Data: Beliefs on the Web

1 Connecting Data on the Web 1 Interlinked Data and Ontologies on the Web Open Data cloud diagram 2014, by Max Schmachtenberg, Christian Bizer, Anja Jentzsch and Richard Cyganiak. http://lod-cloud.net/" 1 LinkedEarth: A Project Using Linked Data Estimate Age of Water

Isotopes Springflow levels Quelccaya Oxygen -16 Ice Cap Vegetation Estimates PROV Quelccaya 20C Physical sample Ice

Core Neotoma Navier-Stokes 1 Interlinked Data and Ontologies on the Web 2007 2011 2015 Datasets 294 571 3426 Triples

2B 31B 85B Crossrefs 2M 500M 74% of datasets in a weakl connected component FOAF: from 27% to 59% DC: from 31% to 56% http://lod-cloud.net

http://stats.lod2.eu 1 The Semantic Web 1. Example: biomedical knowledge on the Web 2. Distributed ontologies on the Web 3. RDF 4. Finding Ontologies on the Web 5. Linked Data on the Web 1 Metadata Topics I.

Semantic metadata II. Ontologies III. The Semantic Web 135

Recently Viewed Presentations

  • Chapter One: Definitions of Animal Cruelty, Abuse, and Neglect

    Chapter One: Definitions of Animal Cruelty, Abuse, and Neglect

    (e.g., St. Thomas Aquinas, Emmanuel Kant). Defining animal cruelty as an evil based on the harm to the animal itself is relatively recent. (e.g., Reverend Humphrey Primatt).
  • NoC presentation - Technion

    NoC presentation - Technion

    What is Different in NoC QNoC NoC is Best Motivation - SoC Communication Current Solutions NoC Concept QNoC Arch. & Design Process QNoC Example NoC Cost Summary 12.06.02 1998 Asic - 0.35 mm 2003 SoC - 0.1 mm Memory, I/O...
  • Roman Achievements - PC\|MAC

    Roman Achievements - PC\|MAC

    Islamic Achievements. Muslims during the Islamic Empire developed . innovations. that are still used today. The lands and people of the Islamic Empire were . diverse, rich, and . creative; Greeks, Chinese, Hindus, Arabs, Persians, Turks and others all ....
  • Western Civilization II - Central Texas College

    Western Civilization II - Central Texas College

    Western Civilization II. Central Texas College. Fort Knox, Kentucky. Bruce A. McKain. Chapter 17 - The Age of Enlightenment. Period of the Philosophes. ... Denis Diderot (1713-84) Encyclopedia or Classified Dictionary of the Sciences, Arts, and Trades.
  • Strings, Branes, Black Holes and Quantum Field Theory

    Strings, Branes, Black Holes and Quantum Field Theory

    Thanks 1987 - 1991 Cambridge (PhD) - Paul Townsend 1991 - 1994 Chicago (Postdoc) - Jeff Harvey 1994 - 1996 CALTECH (Postdoc) - John Schwarz 1996 - 2003 Queen Mary (Lecturer, Reader, Professor) - Chris Hull 2003 - Imperial Collaborators...
  • Gender - University of Warwick

    Gender - University of Warwick

    Gender and the Enlightenment. Debates on gender differences and roles intensified during Enlightenment 'Feminocentric' as male writers focused on 'woman' and 'woman's nature' Issues of female rights permeated fiction, poetry, plays, essays on political economy, treatises on law, philosophy, animal...
  • Punnett Square Review - Ms. Grant's Bio Site

    Punnett Square Review - Ms. Grant's Bio Site

    Scenario 1: Rain Love/Hate. There are two types of people in the PNW: Rainlovers, and rain haters.The allele "R" produces rain lovers, and this allele is dominant over the allele "r" which produces rain haters. A couple who are both...
  • Family Medicine in Scottsbluff Mitchell Chlopek

    Family Medicine in Scottsbluff Mitchell Chlopek

    My schedule involved me rounding on hospital patients in the morning and then clinic from 8am to 5pm. I worked for the first 4 weeks with Dr. Lacey and for the last 3 weeks with Dr. Mosel. The staff in...