Presentation is loading. Please wait.

Presentation is loading. Please wait.

TopQuadrant TopMIND Semantic Web Technology Trainings & Workshops © Copyright 2001-2006, TopQuadrant Inc. The information in this presentation is proprietary.

Similar presentations


Presentation on theme: "TopQuadrant TopMIND Semantic Web Technology Trainings & Workshops © Copyright 2001-2006, TopQuadrant Inc. The information in this presentation is proprietary."— Presentation transcript:

1 TopQuadrant TopMIND Semantic Web Technology Trainings & Workshops © Copyright 2001-2006, TopQuadrant Inc. The information in this presentation is proprietary to TopQuadrant and should not be duplicated, used or disclosed without permission. “Ontology Modeling with TopBraid Composer™ ” Irene Polikoff, Holger Knublauch and Dean Allemang, TopQuadrant, Inc. Fifth Semantic Interoperability for E-Government Conference MITRE McLean October 11, 2006

2 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 2 Who is TopQuadrant?  Formed 2001  First Semantic Web Consulting Company in the US  Providing:  Implementation of Semantic Web Solutions  Semantic Web Tools and Platforms  Training and Consulting  East Coast Office - Alexandria, VA  225 Reinekers Lane, Suite 410 Alexandria, VA 22314 (724) 846-9300  West Coast Office - Mountain View, CA  NASA Research Park Building 19, Suite 2017 Moffett Field, California 94035

3 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 3 Agenda – part 1  Set up and introductions ~ 8:30 am  Quick overview of RDF, RDFS and OWL  Create a simple ontology with TopBraid Composer  owl:class, owl:objectProperty, rdfs:domain, rdfs:range  Convert XML files from http://www.mddl.org/default.asp site into RDF creating an ontology of US stateshttp://www.mddl.org/default.asp  Work with multiple ontologies  Use imports  Create bridging axioms – rdfs:subClassOf, rdfs:subPropertyOf  Combine modular models to describe regions of the US  Query RDF data using SPARQL  Review an ontology of French regions from http://rdf.insee.fr/geo/ site http://rdf.insee.fr/geo/  Bring together US regions and French regions  Break ~ 10:00 am

4 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 4 Agenda – part 2  Create classes using OWL restrictions  Convert the database of US zipcodes from http://www.civicspacelabs.org/home/zipcoded web site into a triple form http://www.civicspacelabs.org/home/zipcoded  Run queries in a multi-user mode against a Sesame back-end  Create a proxy ontology for RDB  Use SPARQL to query relational data directly (using MySQL)  Merge data from MySQL with the data in the owl files  Run SPARQL queries over merged data  Geo view and mashups  Review RDFa – a standard for embedding RDF tags in HTML  Experience RDFa in action  Open to Q&A with Holger Knublauch ~ 11:15  SPARQL Construct queries, SWRL Rules, More?

5 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 5 Installing and setting up TopBraid Composer  Instructions at: http://www.topbraidcomposer.com/download.html  Also at TopBraid Composer web site are:  Screencam demos  Getting Started Guide  Both can be found on the features page: http://www.topbraidcomposer.com/features.html http://www.topbraidcomposer.com/features.html  We recommend that you go through at least some of the exercises in the Getting Started guide before following this tutorial

6 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 6  The elementary unit in RDF is the Resource  The basic thing being described in RDF  Resources are generally identified by URIs  Two resources are the same exactly if they have the same URI  Properties  A characteristic or attribute of a resource  Properties are resources too! RDF Basics offers resources http://www.travel.com/hotel#Yellowstone http://www.travel.com/hotel#offers http://www.activity.com/sport#Backpacking URI’s Yellowstone Backpacking

7 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 7  Triple is always a triple - schema and data are expressed as triples  Triples connect together to form graphs  XML is just one way of serializing a graph Triples connect to form graphs rdf:type resources Location owl:Thing Yellowstone rdfs:subClassOf offers Backpacking

8 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 8 RDFS Classes  Classes are categories into which resources can be grouped  Members of classes are instances  subClassOf creates a hierarchy of classes  Multiple inheritance is allowed/encouraged subClassOf rdfs:Class rdf:type City VacationDestination Syntax

9 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 9 Interpretation of classes as sets  Classes can be organized in a hierarchy (by subClassOf)  Direct instances of subclass are also (inferred) instances of any super classes  This reflects ordinary understanding of subclass as set inclusion NewYorkCity Newark Oxford London

10 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 10 Properties  Domains and Ranges Specify limits on the types of objects that can be the subject of a property and what types can be the object Syntax hasAccomodation rdfs:domainrdfs:range VacationDestination Hotel

11 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 11 OWL vs. RDF vs. RDFS rdfs:subClassOf  Use RDFS to extend itself. OWL terms are defined in terms of old RDFS ones. rdfs:Class owl:Class owl:DatatypeProperty rdf:Property owl:ObjectProperty owl:Restriction rdfs:subClassOf owl:SymmetricProperty rdfs:subClassOf … … owl:TransitiveProperty

12 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 12 Exercise 1  Create a folder where you will store models created during this exercise  Create a new ontology, call it geo-regions.owl  Create a class Region  Create two properties, inverses of each other:  hasSubregion, isSubregionOf  Set domain and range of hasSubregion to be Region  Examine the source code in different serializations  Create a prefix for your namespace, call the prefix ‘region’  Hint: Use Resources -> Navigate to Ontology menu option

13 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 13 Re-using existing XML data

14 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 14 Exercise 2  Convert XML file of the US states into RDF http://www.mddl.org/ext/scheme/uspsStatePossession.xml http://www.mddl.org/ext/scheme/uspsStatePossession.xml  Create a new OWL/RDF file, call it US-states.owl  Create a class called ‘value’  Create two datatype properties: short and full  Save and close, then open the file with the text editor  Hint: to open the file with the text editor, right click on the file in the Navigator View and select ‘Open with …’  Click on the XML file above  Once it is opened in the browser, right click and select View Source  Copy and paste the XML into your RDF/OWL file  Hint: Copy everything from the first tag to the last tag  Paste right before the tag  Save US-states.owl file, close it and re-open with TopBraid Composer  Select value class and click on Instances view. You should see all the states as instances of the class value  Rename the class to USPostalState  Create a prefix for your namespace, call the prefix states

15 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 15 SPARQL SPARQL is for query-based access to RDF graphs. A specification of the RDF Data Access Working Group, SPARQL is currently a W3C Candidate Recommendation. SPARQL = Query Language + Protocol + XML Results Format

16 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 16 SPARQL Query PREFIX dc: SELECT ?title2 WHERE { ?doc dc:title "SPARQL at speed". ?doc dc:creator ?c. ?docOther dc:creator ?c. ?docOther dc:title ?title2 } On an abstracts/papers database: “Find other papers by the authors of a given paper. Adapted from: Andy Seaborne, “Publishing data on the Web (with SPARQL)”, Semantic and Adaptive Systems Dept., HP, 2006

17 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 17 Exercise 3  Create new OWL/RDF file, call it US-regions.owl  Using owl:import statements merge with it US-states and geo-region models  Create a SPARQL query to fetch all states with their full names  Hint: Your query may look something like SELECT ?subject ?fullname WHERE { ?subject states:full ?fullname }  Hint: import sparql.owl found in the TBC folder (one of the libraries you have downloaded from the web during the install process). To save your query as part of the model:  select USPostalState class,  drag and drop j.0:query annotation property on to the form,  copy and paste your query into the resulting widget  Create regions  NorthEast, West, etc.  Connect regions and states using isSubregionOf property  Hint: Drag and drop into the form directly from the SPARQL results panel

18 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 18

19 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 19

20 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 20 Schema and Inference Schema is used to derive information that was not in the given data – in this case based on the range of the property rdf:type isSubregionOf rdf:type isSubregionOf rdfs:domain rdfs:range New York Region NorthEast

21 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 21 Exercise 4  Create SPARQL query to get all regions that consist of other regions  Hint: It may look something like: SELECT ?region ?subregion ?subname WHERE { ?region rdf:type region:Region. ?region region:hasSubregion ?subregion. ?subregion states:full ?subname }  Run inferences  Hint: You can invoke inferences using Inference menu option. You can also specify the level of inferencing when you run the query using Preferences icon in the SPARQL view  Re-run the query  Hint: You can see all the inferences in the Inferences view. Additionally, when you look at any resource, information with the light blue-grey background is inferred

22 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 22

23 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 23 Exercise 5  Download and open ontology of France regions from http://rdf.insee.fr/geo/ http://rdf.insee.fr/geo/  Hint: When you save the owl file, you can save it directly into your workspace directory. Refresh the folder in the workspace to see the downloaded file. To refresh right click on the folder and select Refresh.  Download RDF files for regions and departments  Adjust namespaces for regions and departments file  Open the files in the text editor and modify the URL in the xml:base statement  The url should be the same as the one that is indicated by rdf:about in the rdf:Description statement – see example in the next slide  Open regions file  Hint: You will get a warning statement about adding import statement, click ‘yes’

24 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 24

25 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 25 Exercise 6  Create world-regions.owl  Import models representing US Regions (the one we have created in the earlier exercise) and France Regions (the one we have downloaded)  Make geo:subdivision rdf:subPropertyOf region:hasSubregion  Make geo:nom rdf:subPropertyOf states:full  Re-run SPARQL query for subregions  You will now see regions from the US, we have created, as well as French regions  Open departments file  Experiment with transitivity

26 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 26

27 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 27 Key take aways  RDF makes it easy to merge data from different sources  Often a single axiom is enough to make significant merges possible  RDFS and OWL statements are defined in terms of inferences they entail  It is not necessary to agree with (or even fully understand) an ontology created by another party to make use of it  Smaller is better - modularity is key to Re-use and Manageability  It is possible to bring in and query a new knowledge base without changing queries your application is already using

28 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 28 A new data source: Database of zip codes

29 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 29 Exercise 7  Create connection to Sesame database  Hint: Select File -> New -> Other and then select OWL/RDFS Sesame Repository Connection in the dialog that pops up  You will need to know connection strings and password for the Sesame repository. To use TopQuadrant’s Sesame server, specify the following: ServiceURL=http://204.15.1.11:8080/sesame RemoteUser= RemotePassword=opensesame RemoteRepositoryID=zipcodes BaseURI=http://www.owl-ontologies.com/zipCodes.owl  Once connection is established, you will be able to browse the zip code data directly from the RDF (triple) store  Sesame is a multi-user environment where multiple people could be viewing and modifying the content, but you will only have read access  Hint: You are looking at the data converted from the relational database into RDF store. You can user Composer to perform the conversion  Use the Geo view in Composer for mashups  Hint: To have the Geography view show up, go to Window -> Show View -> Other, then select Geography and click OK  Select any instances of the Zipcode class and have them show up on the map

30 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 30

31 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 31 Exercise 8  Download the database from the Civic Space site  Hint: You will need to have MySQL running  Create proxy ontology for MySQL database  Hint: Use Import -> OWL/RDFS View on Relational Database  Query database data using SPARQL  Hint: This may be a good query to try: Select ?z Where { ?z schema:zipcodes_state "NY"^^xsd:string.}  Merge data in the database with the US-regions model

32 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 32

33 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 33

34 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 34 RDFa – embedding RDF in HTML pages Web pages are a great source of data – who, what, and where is commonly shown. Old question: How can someone reading a page reverse engineer (“scrape”) structured data from HTML? New question: How can a page author embed structured information in a page, to make it easy to get out?

35 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 35 <td width="1" rowspan="2" valign="top" class="bodytext" <font face="Arial Black" size="5" >Getting Ready for the Semantic Web Next Classes: Oct. 30 - Nov. 2, 2006. <td width="1" rowspan="2" valign="top" class="bodytext" about="http://www.topquadrant.com/seminars/topmind.htm#Fall06" rel="rdf:type" href="http://www.w3.org/2002/12/cal/ical#Vevent" > <font face="Arial Black" size="5" property="cal:summary" datatype="xsd:string“ >Getting Ready for the Semantic Web Next Classes: Oct. 30 - Nov. 2, 2006.... Extra markup within HTML

36 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 36 cal:dtend RDFa markup parses as triples Fall06 cal:Vevent rdf:type “Getting Ready for the Semantic Web”^^xsd:string cal:summary “Oct. 30, 2006 9:00 am^^xsd:datetime “Nov 2, 2006 5:00 pm^^xsd:datetime cal:dtsart

37 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 37 cal:dtsart rdf:type cal:dtend Fall06 cal:Vevent “Getting Ready for the Semantic Web” cal:summary “Oct. 30, 2006 9:00 am” “Nov 2, 2006 5:00 pm” rdf:type cal:dtsart :teaches Federating info from multiple sources cal:dtend Spring07 “Getting Ready for the Semantic Web” cal:summary “Feb 12, 2007 9:00 am” “Feb 15, 2007 5:00 pm” Person1 “Dean Allemang” foaf:name FEARMO “FEA Ontology Modeling White Paper” foaf:maker dc:title “1800 Diagonal Road, Alexandria, VA 22314 ” “NASA Research Park, Moffett Field, CA 94035”

38 TopQuadrant TopMIND Semantic Web Technology Trainings & Workshops © Copyright 2001-2006, TopQuadrant Inc. The information in this presentation is proprietary to TopQuadrant and should not be duplicated, used or disclosed without permission. Questions & Answers Holger Knublauch E-mail: holger@topquadrant.comholger@topquadrant.com Irene Polikoff E-mail: irene@topquadrant.comirene@topquadrant.com www.topquadrant.com (703) 960-1028

39 TopQuadrant TopMIND Semantic Web Technology Trainings & Workshops © Copyright 2001-2006, TopQuadrant Inc. The information in this presentation is proprietary to TopQuadrant and should not be duplicated, used or disclosed without permission. TopMIND Semantic Technologies Briefings & Workshops “Getting Ready for the Semantic Web” TopMIND = TopQuadrant + Jim Hendler Dean Allemang, Ph.D. Professor Jim Hendler Next Class Oct. 30 - Nov. 2, 2006, Washington, DC area Brochures: at TQ Exhibit Register: www.topquadrant.com 4-day ‘hands-on’ training in semantic web technology standards, languages, best practices … featuring Thanks! See you there.

40 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 40 Announcing the first in a new Webinar Series An Introduction to Ontology Development with TopBraid Composer™ When: Friday, November 17, 2006, 2:30pm ET Register at: www.topbraidcomposer.comwww.topbraidcomposer.com Additional sessions will cover topics such as:  Using DL-based reasoning  Using rule-based reasoning  Creating mash-ups and applications

41 TopQuadrant © Copyright 2001-2006 TopQuadrant Inc., “Building Ontologies using TopBraid Composer”, slide 41 Where to Find Out More  Polikoff et al, “Capability Cases”, Addison-Wesley, 2005  WEB Resources  CapabilityCases.org  http://www.capabilitycases.org http://www.capabilitycases.org  http://del.icio.us/CapabilityCases http://del.icio.us/CapabilityCases  TopQuadrant Capability Cases Galleries: http://www.topquadrant.com/topGallery/tq _topgallery.htm http://www.topquadrant.com/topGallery/tq _topgallery.htm  TopQuadrant Reports: http://www.topquadrant.com/tq_white_pap ers.htm http://www.topquadrant.com/tq_white_pap ers.htm  TopQuadrant Services  http://www.topquadrant.com/FPweb/tq_ser vice_offerings.htm http://www.topquadrant.com/FPweb/tq_ser vice_offerings.htm


Download ppt "TopQuadrant TopMIND Semantic Web Technology Trainings & Workshops © Copyright 2001-2006, TopQuadrant Inc. The information in this presentation is proprietary."

Similar presentations


Ads by Google