Introduction to Ontology- Based Semantics Goals Service
Total Page:16
File Type:pdf, Size:1020Kb
Goals • To provide some insight into the usefulness of ontologies Introduction to Ontology- • To provide an understanding of the based Semantics features of RDFS and OWL and their use in automated reasoning Semantic Web, ontologies, RDF, OWL, • To provide an outline of the N3 syntax N3 • Use N3 to express RDFS and OWL – sufficient for later examples and exercises on service semantics With thanks to Declan O’Sullivan @ David Lewis @ David Lewis Service Semantics Functional Semantics • WSDL provides the syntax we need for interoperating with a service, but little in the way of semantics • What do ‘origin’ and ‘destination’ strings • Examining this example raises many questions about represent? functional and non-functional semantics – Country, city, airport, restrictions (airline, national, <message name=“getcheapestFlightRequest"> regional)? <part name=“origin" type="xsd:string"/> <part name=“destination" type="xsd:string"/> • What does ‘flight’ string represent? <part name=“date" type="xsd:date"/> – Airline, flight number, plane type? </message> <message name=“getcheapestFlightResponse"> • What does ‘time’ string represent? <part name=“flight" type="xsd:string"/> <part name=“time" type="xsd:time"/> – Departure time? <part name=“cost” type=“xsd:float”/> </message> – Note xsd:time probably is adequate - supports time- <portType name=“cheapestFlight"> zone information <operation name="getCheapestFlight"> <input message=“getcheapestFlightRequest"/> • What does ‘cost’ float represent? <output message=“getcheapestFlightResponse"/> </operation> – Currency, to how many decimal points? </portType> @ David Lewis @ David Lewis Non-functional Semantics Need more than XML Schema • XML is Syntax • Availability – DTDs talk about element nesting – Can we assume 24x7x365 availability globally for web – XML Schema schemas give you data types service unless otherwise stated – need anything else? => write comments! • XML DTDs and XML Schemas are sufficient for exchanging data • Channels between parties who have agreed to meaning of terms beforehand – WSDL binding to SOAP supports this • Domain Semantics are complex: • WSDL says nothing about: – implicit assumptions, hidden semantics – Charging Styles ⇒ sources seem unrelated to the non-expert • Need Structure and Semantics beyond XML trees! – Settlement ⇒ employ richer OO models – Service Quality ⇒ make domain semantics and “glue knowledge” explicit – Security and Trust ⇒ use ontologies to fix terminology and conceptualization – Ownership and Rights ⇒ avoid ambiguities by using formal semantics (logics) @ David Lewis @ David Lewis 1 Informally: What is an Ontology: A definition Ontology? •An "ontology” defines the common words and concepts (meaning) • Defines the terms used to describe and used to describe and represent an area of knowledge. represent an area of knowledge •An ontology can range from a – Taxonomy (knowledge with minimal hierarchy or a parent/child • Used by people, databases, applications structure) to a … that need to share domain information – Thesaurus (words and synonyms) to a …. – Conceptual Model (with more complex knowledge) to a… • Ontologies include computer-usable – Logical Theory (with very rich, complex, consistent and meaningful knowledge). definitions of basic concepts in the domain • A well-formed ontology is one that is expressed in a well-defined and the relationships among them syntax that has a well-defined machine interpretation consistent with the above ontology definition • They encode knowledge in a domain and knowledge that spans domains @ David Lewis @ David Lewis An explicit description of a domain An explicit description of a domain • Constraints or axioms on properties and concepts: animal • Concepts (aka: class, set, type, predicate) – value: integer – event, gene, gammaBurst, – domain: cat atrium, molecule, cat vermin domestic – cardinality: at most 1 animal • Properties of concepts and dog – range: 0 <= X <= 100 cat relationships between them – cows are larger than dogs rodent cow vermin domestic (aka: slot) eats – cats cannot eat only vegetation – Taxonomy: generalisation – cats and dogs are disjoint dog mouse cat ordering among concepts isA, cow partOf, subProcess • Values or concrete domains rodent eats – Relationship, Role or Attribute: isA – integer, strings functionOf, hasActivity location, relationships mouse eats, size @ David Lewis @ David Lewis [Carole Goble, Nigel Shadbolt, Ontologies and the Grid Tutorial] [Carole Goble, Nigel Shadbolt, Ontologies and the Grid Tutorial] An explicit description of a domain Types of Ontologies animal describe very general concepts like space, time, event, which are • Nominals independent of a particular problem or domain. It seems reasonable to have unified top-level ontologies for large – Similar to abstract classes/types communities of users. – Concepts that cannot have instances vermin domestic – Instances that are used in conceptual definitions dog cat – ItalianDog = Dog bornIn Italy cow rodent describe the describe the • Individuals or Instances eats vocabulary related to vocabulary related a generic domain by to a generic task – sulphur, trpA Gene, felix specializing the or activity by felix concepts introduced specializing the • Ontology versus Knowledge Base mouse in the top-level top-level ontology. –An ontology = tom ontologies. concepts+properties+axioms+values+ nominals mickey –A knowledge base = jerry These are the most specific ontologies. Concepts in ontology+instances application ontologies often correspond to roles played by domain entities while performing a certain activity. @ David Lewis @ David Lewis [Carole Goble, Nigel Shadbolt, Ontologies and the Grid Tutorial] [Carole Goble, Nigel Shadbolt, Ontologies and the Grid Tutorial] 2 Ontologies - Some Examples Semantic Web • General purpose ontologies: • Meta-Ontologies – WordNet / EuroWordNet, – Semantic Translation, • Initiative of W3C, strongly driven by Sir Tim Berners Lee http://www.cogsci.princeton.edu/~wn http://www.ecimf.org/contrib/o nto/ST/index.html – http://www.w3.org/2001/sw/ – The Upper Cyc Ontology, http://www.cyc.com/cyc- 2-1/index.html – RDFT, • To date Web has been developed as a medium for document http://www.cs.vu.nl/~borys/RD – IEEE Standard Upper Ontology, http://suo.ieee.org/ FT/0.27/RDFT.rdfs manipulation by people • Domain and application-specific – Evolution Ontology, • Aim to augment the web pages with data targeted at computers, and http://kaon.semanticweb.org/e add documents targeted solely at computers, e.g. semantic web ontologies: xamples/Evolution.rdfs – RDF Site Summary RSS, service descriptions http://groups.yahoo.com/group/rss- • Ontologies in a wider • Challenges dev/files/schema.rdf sense – UMLS, http://www.nlm.nih.gov/research/umls/ – Agreeing on standard Markup Language… OWL standardisation – Agrovoc, progressing – KA2 / Science Ontology, http://www.fao.org/agrovoc/ http://ontobroker.semanticweb.org/ontos/ka2.html – Art and Architecture, – Generating sufficient common ontologies that can be referred to people – RETSINA Calendering Agent, http://www.getty.edu/research/ in their own ontologies (e.g. definition of food, definition of person etc.) http://ilrt.org/discovery/2001/06/schemas/ical- tools/vocabulary/aat/ – Availability of indexing crawlers or web service repositories to take full/hybrid.rdf – UNSPSC, advantage of new approach – AIFB Web Page Ontology, http://eccma.org/unspsc/ – Tool support for people creating own ontologies http://ontobroker.semanticweb.org/ontos/aifb.html – DTD standardizations, e.g. – Web-KB Ontology, http://www- HR-XML, http://www.hr- – Tool support for automatic markup of documents for end users, e.g. 2.cs.cmu.edu/afs/cs.cmu.edu/project/theo- xml.org/ incorporation into Word or Frontpage etc. 11/www/wwkb/ – Tool support for automatic markup of web services for end users, e.g. – Dublin Core, http://dublincore.org/ incorporation into .NET, J2EE etc. @ David Lewis @ David Lewis [Carole Goble, Nigel Shadbolt, Ontologies and the Grid Tutorial] Resource Description Framework (RDF) Notational Verbosity •RDF is a W3C recommendation that enables encoding, exchange and reuse of structured metadata in XML • Semantic Web relies on a ‘stack’ of languages – Triples of assertions can be expressed using XML tags – XML for document formatting and referencing elements of other – A bit like “Subject, Property, Object” of a sentence document – XML Schema for encoding data types Concept – RDF – semantic description triple Concept Value – RDFS – definition of classes, properties and subclasses in RDF property – OWL – add assertions about relationships between RDF statement classes/properties – E.g. “Cabernet Sauvignon grape”, “is a type of” ,“Wine grape” • All aim to support machine processing and inference <rdf:Description rdf:about="Cabernet Sauvignon grape“> Subject <rdf:type rdf:resource=“#Wine grape" /> over the WWW </rdf:Description> • BUT …. Results in an incredibly verbose XML-based Property Object – Each resource can be assigned a different Universal Resource Identifier (URI) syntax! • Thus different meanings for the same term can be assigned different URIs – Fine for computers, bad for people – Reference: RDF Primer. W3C draft technical note, 2002 – Need less verbosity for sketching out ideas, presenting examples and teaching ontologies @ David Lewis @ David Lewis N3 Ontology Notation Syntactic shortcuts • Compact, text based language for playing • Several objects with same subject and around with ontologies • Python Platform CWM allows inference and predicate separated by