Orientation to Methods SOCoP 2012 Workshop Gary Berg-Cross SOCoP Executive Secretary Nov. 29-30, 2012 U. S. Geological Survey National Center 12201 Sunrise Valley Dr., Reston VA Outline 1. Intro to ODPs 2. Ontology Engineering 1. Problems, Component and Relation Identification & Clarification 2. Conceptualization Phase 3. Systematic organization & framing with visual expression Formalization Geometry A point is the most fundamental object in geometry. A point represents position only; it has zero size Geometry In NeoGeo Ontology Super-class grouping all geometrical representations (includes non-RDF formats e.g. KML, GML, WKT..) URI http://geovocab.org/geometry#Geometry Orientation to Semantic Methods for Workshop 2 Examples of CPs Colon From PhD Course on Computational Ontologies @ University of Bologna 2011 Author(s): Valentina Presutti, Aldo Gangemi, Eva Blomqvist; http://stlab.istc.cnr.it/documents/slides/PhDCourse/Bologna2011/ExtremeD esign.pdf Orientation to Semantic Methods for Workshop 3 Conceptual Pattern- A Schema for Motion: All paths have a start point We can generally outline what we mean by Motion in a vocabulary of lexical terms to represent concepts (Start of a Path) typically used in this particular domain. G S onPath End point could be represented in a coordinate system We remain general in the pattern since this is a cognitive activity & the concept has flexible semantics depending on human intentions and perspectives. The pattern can generate alternate descriptions conforming to alternate interpretations. Orientation to Semantic Methods for Workshop 4 Just OWL Classes Motion is an OWL:Class Geo-VoCamp Patterns – Path from an info perspective is part of Motion hasPath hasPath Moving Object Path -name -start object -end object -path description -medium - surface has part Light constraints by relations and what is related Orientation to Semantic Methods for Workshop 5 Point of Interest (POI) Pattern: Geographic information constructs, not direct representations of real entities Groundable by adding data not more semantics Some placeholders Ideas for later analysis. Orientation to Semantic Methods for Workshop 6 Composing New ODP from Old: Semantic Trajectory •Preserves axioms from other ODPs •Adds concepts Data for Model :mikestrip a :SemanticTrajectory; :hasSegment [a :Segment; :from :fix1; // mikeshome:to :fix2;// rest stop :traversedBy :fordFocus], [a :Segment; :from :fix1; // rest stop :to :fix2],// WrightStateU :traversedBy :fordFocus], [a :Segment;:from :fix1; // WrightStateUniversity:to:fix2],//.. :fixn].:mike a foaf:Person:mikesFordFocus a motion:MovingObject.:garminEtrexVistaC a:Source.geo: Geometry rdfs:subClassOf :Position.:mikesFordFocus a motion:MovingObject]:motion1 a…… Orientation to Semantic Methods for Workshop 7 Step 1:Acquire Scoped Domain Knowledge & Vocabulary Principle: Clarify & Indentify Problem, Components & Relations Identify scope: We prefer working from scenario examples with potential data to help structure requirements, defining the purpose of the ontology and illustrate the nature of a problem topic. What are we talking about? What do you mean when you use these words.. Streams as objects (not processes?)….. What is the scope? Not how streams flood, or pools of water,… What is the purpose of this modeling? What data is relevant…. We should leverage existing work but not slavishly leverage thoughts & experiences from other groups that are collaborating on ontologies reference or include supporting vocabularies/ontologies, Terminologies can be a starting point, but the path should be to the concepts behind what the terms mean to domain people and be relatable to “data.” Controlled vocabularies and other terminologies are necessary lexical resources to refer to concepts Linguistics or conceptual analysis Handle multiple meaning and similarities Orientation to Semantic Methods for Workshop 8 Understanding from Definitions & Analysis Starts on partitioning experience into important/general parts & relations Example of semantics from definitions of a noun phrase “stream reach” – what we are talking about?: a continuous part of a physical object stream (in a network) between two specified points. Reaches are commonly defined by a length of stream between two confluences, or a lake or pond. Addition - Stream - physical container hosting a void in which water can be stored and through which it can flow. Natural Aggregation into Systems Platt? Orientation to Semantic Methods for Workshop Part of 9 Some Design Detail on the Problem Space/System of Stream Reach Reaches in a stream network are segments of surface water with similar hydrologic characteristics. Each reach is assigned a unique reach number and a flow direction. (attributes) The length of the reach, the type of reach, and differing important information are assigned as attributes to each reach depending on perspective. Ecologists and hydrologists will employ different concepts. Monitoring Void of water Reach Point R 101 Similar/uniform Characteristics streamReach hasProperty, uniform Flow to downstream end Reach Point R 102 Orientation to Semantic Methods for Workshop 10 Stream Reach by the Book – not everyday use “Reach” means a watercourse that has a continuous channel bed that meets one of the following requirements: (a) the channel bed is at least 100 m in length, measured from any of the following locations to the next of any of the following locations: (i) the location where the watercourse begins or ceases to have a continuous channel bed; (ii) the location where (iii) the location where (A) a significant change in morphology occurs, for example at the junction of a major tributary, and (B) the mean width of the channel bed, as measured over a representative 100 m length of channel bed, upstream and downstream of the morphological change is sufficient to change the riparian class of the watercourse, if the watercourse were a stream; (A) a significant change in morphology occurs, eg at the junction of a major tributary, and (B) the mean gradient of the channel bed, as measured over a representative 100 m length of channel bed upstream and downstream the morphological change, changes from less than 20% to 20% or more, or vice versa; (b) the channel bed is at least 100 m in length, made up of one or more segments, the boundaries of which are any of the locations referred to in paragraph (a); (c) the channel bed is less than 100 m in length, if the continuous channel bed (i) is known to contain fish, (ii) flows directly into a fish stream or a lake that is known to contain fish, or (iii) flows directly into a domestic water intake. See National Hydrography Datasettohttp://nhd.usgs.gov/ & http://nhd.usgs.gov/nhd_faq.html#q105 11 Orientation Semantic Methods for Workshop Conceptualization Qualities 1. Correctly captures intuitions of domain experts as they express intended content (expressivity) 1. These statements should be understandable to humans E.g. Touches” is symmetrical (StramReach-101 touches StramReach-102 so visa versa..Leg1ofTrip touches Leg2) • 2. 3. Formalization will make them processable by computing systems. Minimally redundant - no unintended synonyms Multiple possible meanings of concepts are reduced so that systems & people can recognize commonalities and differences in the semantics of the concepts that they use. Orientation to Semantic Methods for Workshop 12 Forge Consensus on Some of the Relevant Terms/ Concepts & Express Container To be a quality model (& later ontology) we should be able to make meaningful statements about what exists in our focused domain/topic and establish consensus about the meaning of terms (in general) Outside Inside Aha! Stream reach/segment is part of a stream A pattern.. Streams and their parts are watercourses Watercourses are containers Watercourses may contain water SpatialRegion Stream segment/reaches have stream direction Steams have constituents SpatialObject Constituents had Some stream reach constituents are uniform in character….. Controlled vocabulary suitable for OWL or CL helps Contained Object Boundary The water is in the stream. The water is surface water. The stream contains a water surface Orientation to Semantic Methods for Workshop 13 Conceptual Modeling & Design Phase Frames, Organizes, Structures, Visualizes Container Pattern Container IsA DUL:SocialObject Container Contains Containee Container hasLocation SpatialLocation Place IsA SpatialLocation Place denotesLocation Container Axiom: Some ContainedObjects are DUL:PhysicalObjects Axiom: Container contains 0-N contained objects…… Simple CM Language Spatial Location Pattern?? Region IsA SpatialLocation IsA Spatial Region Orientation to Semantic MethodsSpatialLocation for Workshop 14 Conceptual Modeling Activities Design the overall conceptual structure of the domain. This involves objects and their properties consistent with your purpose. Focus on the Parts needed to build a Conceptual Models as a product for input to Ontology 1. Identifying & defining the domain's principal concrete concepts & building a concept base (Objects ->Classes) 2. Identifying the relationships among the concepts 1. Arrange in taxonomical class hierarchy(s) 2. Clarify IsA hierarchies and part-whole relations 3. Link concepts via other Relations….. 3. Discuss constraints that characterize key concepts and their relations 1. A Container may contain 0-n objects (empty container idea) 2. FlowsInto relation is transitive Add concepts & relations & individuals to the level of detail necessary to satisfy your purposes. All these will provide commitments to tobe expressed in an ontological language Orientation Semantic Methods for Workshop 15 Class Hierarchies, Attributes & Relations (Path Ontology Examples) Arranging objects as class hierarchies (supporting transitivity) It depends on what vocabulary you adopt: 1. Path is a Feature, feature is a spatialThing, spatialThing is a Thing….OR 2. Path is a spatialFeature, spatialFeature is a PhysicalObject, (DOLCE) OR 3. Path is a Feature, Feature is a SpatialObject, SpatialObject is either a Feature or a Geometry (GeoSPARQL model) See 1. http://www.opengis.net/ont/OGC-GeoSPARQL/1.0/Feature 2. Attributes (class slots) Path has a startObject, Path has a Name, Path has a Description (“turn onto VA route 247”), some Descriptions are PathGeometries, Sunrise Valley Dr. hasQuantity Length DataPropertyAssertion(.21 :hasValue : " "^^xsd:integer, hasUnit: miles ) …. 3. Relations (Properties) includes such ideas as Contains & hasPart Path 101 hasPart Path101a, Path101a connectedTo Path101b….. Orientation to Semantic Methods for Workshop 16 Am I Doing Structural, Ontological or Conceptual Analysis & Design ? There are distinctions, but … each can provide something from its best practices that helps systematize the information. Leveraging a Good Conceptual model the formal ontology should represent: Meanings & Agreed upon Common Understanding Organization Taxonomy etc. Basic Vocabulary as agreed upon Some instantible connection to the “real world” and data from it. After Chris Welty’s: Ontology-Driven Conceptual Modeling http://ontolog.cim3.net/file/resource/presentation/OntoClean --ChrisWelty_20041118/OntoClean-2004v1--ChrisWelty_20041118.ppt Orientation to Semantic Methods for Workshop 17 Option of Aligning Concepts Each top-level concept in your model might be loosely “aligned” to a top-level concept in a foundational ontology like DUL. Given an alignment to top-level concepts, you can “define” some the relations between them perhaps by extending the foundational relations that are used in ontologies like DUL to relate their concepts. memberOf and partOf are examples of foundational relations. We can use them….. Orientation to Semantic Methods for Workshop 18 Tools It is often useful to start with hand/board drawings to accommodate conversational flow. PowerPoint graphics can be used to tidy things up for presentation. Better yet is a modeling tool like CMAP with support for model constructs and automatic translation into OWL/TTL etc. Orientation to Semantic Methods for Workshop 19 Formally Committing to our Conceptualization with Axiomatized Semantics 1. Formal –can be represented/put into a form amenable to automated processing [formal language] 1. Ontologies formalize concepts with axioms defined on such concept vocabularies Sufficiently axiomatized – include detailed constraining descriptions, such as transitivity, as axioms (not just text descriptions) 2. Rigorous – stands up to rational analysis 1. Distinguish which concepts have instances 1. Named classes can (potentially) have instances Orientation to Semantic Methods for Workshop 20 Formalization with Axiomatized Semantics RDFS is Modestly Formal - Used to Define a Scale with a small concept vocabularies scale:hasPoint (members); 2. rdfs:subPropertyOf scovo:datasetOf ; 3. rdfs:label "has point" ; 4. rdfs:comment "Associates a Scale with the Point(s) of which it is comprised." 5. rdfs:domain scale:Scale ; 6. rdfs:range scale:Point . 1. From VoCamp with Ordnance Survey Orientation to Semantic Methods for Workshop 21 Nearness Model- uses Scale Model The web of logical statements carries the meaning. 4 Point Scale of here, nearest, nearer & close using before & after Properties Orientation to Semantic Methods for Workshop 22 Better Semantics Using OWL Language Transitive, inverse, symmetrical, reflexive/irreflexive properties Using RDFS we can’t say that: isPartOf is a transitive property (branch isPartOf River and tributary isPartOf branch), Need Transitive property for Regions to say that the subRegionOf property between regions is transitive <owl:TransitiveProperty rdf:ID="subRegionOf"> <rdfs:domain rdf:resource="#Region"/> <rdfs:range rdf:resource="#Region"/> </owl:TransitiveProperty> hasPart is the inverse of isPartOf or A=A is reflexive but part relations are irreflexive These are things that can be saidtoin OWL (Web Ontology Language) Orientation Semantic Methods for Workshop 23 Descriptive Logic OWL uses a subset of 1st Order Logic called Descriptive Logic (DL) that is decidable and simple enough to represent and describe objects and properties Has a terminological (T-box) part to create classes some by sub-typing and saying that physical objects are a sub-type of object <flood isa disaster> Has an assertional (A-box) part to describe relations (other than sub-type) between instances (Reston is_located_in VA) and to use axioms to constrain meaning. Orientation to Semantic Methods for Workshop 24 Motion / Path RDF/ontology in Turtle (TTL): (Terse RDF Triple Language – uses a . , ;]) Namespace prefixes @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix geo: <http://www.opengis.net/def/geosparql/> . @prefix sf: <http://www.opengis.net/def/sf/> . @prefix gml: <http://www.opengis.net/def/gml/> . @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix spw: <http://www.w3.org/2001/sw/BestPractices/OEP/SimplePa rtWhole/part.owl> . @prefix event: <> . @prefix : <http://vocamp.org/ontology/movement/spatial/> . (Default prefix) # Ontology description :Ontology a owl:Ontology; owl:versionInfo "0.5"; rdfs:comment “A geospatial instantation of the generic Movement & Path pattern created at GeoVoCampSB2012."; dc:title "Spatial Motions and Paths" . # Motion class rdfs:comment "A motion is an event in which some entity moves through space" ; rdfs:subClassOf [ a owl:Restriction; owl:onProperty :startEvent; owl:allValuesFrom event:Event ]; :Motion a owl:Class; rdfs:subClassOf event:Event; rdfs:label "Motion"; rdfs:subClassOf [ a owl:Restriction; owl:onProperty :endEvent; owl:allValuesFrom event:Event ]; rdfs:subClassOf [ a owl:Restriction; owl:onProperty :path; owl:allValuesFrom :Path ]; rdfs:subClassOf [ a owl:Restriction; owl:onProperty spw:hasPart; owl:allValuesFrom :Motion ]; rdfs:subClassOf [ a owl:Restriction; owl:onProperty :startEvent; owl:allValuesFrom event:Event ]. A restriction class should have exactly one triple linking the restriction to a particular Orientation to Semantic Methods for Workshop property, using owl:onProperty. 25 Container in TTL for Owl @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix DUL: <http://localhost/DUL#> . @prefix rdfs: <http://www.w3.org/2000/01/rdfschema#> . @prefix daml: <http://www.daml.org/2001/03/daml+oil#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdfsyntax-ns#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix : <http://localhost/default#> . :SpatialLocation rdf:type owl:Class . :Place rdf:type owl:Class ; :IsA :SpatialLocation ; :denotesLocation :Container . :Container rdf:type owl:Class ; :IsA DUL:SocialObject ; :hasLocation :SpatialLocation . DUL:SocialObject rdf:type owl:Class . From CMAP draft Orientation to Semantic Methods for Workshop 26