• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Ontologies and Semantic in OpenSource projects
 

Ontologies and Semantic in OpenSource projects

on

  • 1,858 views

This presentation was used in Madrid during a session to talk about Ontologies and Legal Issues.

This presentation was used in Madrid during a session to talk about Ontologies and Legal Issues.

Statistics

Views

Total Views
1,858
Views on SlideShare
1,854
Embed Views
4

Actions

Likes
0
Downloads
40
Comments
0

2 Embeds 4

http://www.linkedin.com 3
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Ontologies and Semantic in OpenSource projects Ontologies and Semantic in OpenSource projects Presentation Transcript

    • Ontologies and Semantic Jose Gato Luis<jose.gato@atosresearch.eu> (4-09-2012)
    • © 2009,2011 Jose Gato Luis Some rights reserved. This presentation is distributed under the “Attribution-ShareAlike 3.0” license, by Creative Commons, available at04/09/12 Ontologies and Semantic 2 http://creativecommons.org/licenses/by-sa/3.0/
    • Summary Introduction Ontologies OWL and RDF. QualiPSo: Information management Semantic Queries 04/09/12 Ontologies and Semantic 3
    • IntroductionDefinition: “ Ontology is the philosophical study of the nature of being, existence or reality in general, as well as of the basic categories of being and their relations. Traditionally listed as a part of the major branch of philosophy known as metaphysics, ontology deals with questions concerning what entities exist or can be said to exist, and how such entities can be grouped, related within a hierarchy, and subdivided according to similarities and differences.” - Wikipedia 04/09/12 Ontologies and Semantic 4
    • IntroductionComputers engineering vision: “Ontology is a formal representation of a set of concepts within a domain and the relationships between those concepts. It is used to reason about the properties of that domain, and may be used to define the domain.” - WikipediaHow to make an standard, in order to define the parts ofa concept.04/09/12 Ontologies and Semantic 5
    • OntologiesVocabularies to define entities and concepts.For example, the ontology of an email or a a tree.Knowledge representation.Knowledge understandable by machines andcomputer programs.Similar to object orientation paradigm.04/09/12 Ontologies and Semantic 6
    • Ontologies This is not understandable by a machine: Car Colour Price Ford Fiesta Blue 30 Ferrari F40 Red 1004/09/12 Ontologies and Semantic 7
    • OntologiesInformation clasified and structured:I want to rent a Ford Fiesta car by 60€Class car -> Model -> Ford FiestaClass car -> Colour -> BlueClass Money -> Type -> CoinClass Money -> Value -> 60Class Money -> Coin -> euro04/09/12 Ontologies and Semantic 8
    • OntologiesSomething understandable by a machine: <rdf:RDF xmlns:rdf="http://w.o/1999/02/22-rdf- syntax-ns#" xmlns:coche="http://car/spec/"> <rdf:Description rdf:about="http://car/FordFiesta”> <car:colour> blue </car:colour> <car:price> 30 </car:price> </rdf:Description> </rdf:RDF>04/09/12 Ontologies and Semantic 9
    • OntologiesAnd relations... <rdf:RDF xmlns:rdf="http://w.o/1999/02/22-rdf- syntax-ns#" xmlns:coche="http://car/spec/"> <rdf:Description rdf:about="http://car/FordFiesta”> <car:colour> blue </car:colour> <car:price> 30 </car:price> <manufacturer:id> http://manufacturer/FordSpain </manufacturer:id> </rdf:Description> </rdf:RDF>04/09/12 Ontologies and Semantic 10
    • OntologiesAn ontology should allow to define all theinformation of a concept:Is this possible?Standards -> Competency vs CommunityDifferent persons will define concepts in very differentways.Are we able to define the world around us?Specific concepts Tree: { Root, Trunk, type... }Difficult to define abstract concepts04/09/12 Ontologies and Semantic 11
    • Ontologies Ontologies are useful when...You can define enough information about a concept.Used by many people/projects/communitiesWidely spread <-> Standard <-> Community04/09/12 Ontologies and Semantic 12
    • Ontologies: FOAFFriend of a Friend: http://www.foaf-project.org/PeopleActivitiesPeople relations: People living in Europe, commonfriends <foaf:Person rdf:ID=”PeterParker”> <foaf:name>Peter Parker</foaf:name> <foaf:gender> Male </foaf:gender> <foaf:title> Mr </foaf:title> <foaf:givenname>Pet</foaf:givenname> <foaf:knows rdf:nodeID="harry"/> </foaf:Person> 04/09/12 Ontologies and Semantic 13
    • Ontologies: SIOCSemantically-Interlinked Online Communities http://sioc-project.org/ontology 04/09/12 Ontologies and Semantic 14
    • Ontologies: SIOC <sioc:Post rdf:about="http://..../post/7#post"> <dc:title>Example post</dc:title> <sioc:has_creator> <sioc:User rdf:about="person/pepe"> <sioc:name>John</sioc:name> </sioc:User> </sioc:has_creator> <sioc:content>there was a time</sioc:content> <sioc:has_reply> <sioc:Post rdf:about="post/3#post" /> </sioc:has_reply> </sioc:Post>04/09/12 Ontologies and Semantic 15
    • Ontologies: MixingTo define a concept (resource), usually, you donthave enough with only one ontology <foaf:Person rdf:ID=”PeterParker”> <foaf:name>Peter Parker</foaf:name> <foaf:gender> Male </foaf:gender> <foaf:title> Mr </foaf:title> <foaf:givenname> Peter </foaf:givenname> <foaf:knows rdf:nodeID="harry"/> <sioc:email>spiderman@gmail.com</sioc:email> </foaf:Person> 04/09/12 Ontologies and Semantic 16
    • RDFResource Description FrameworkClasses A ressource with the property rdf:type Class OOP and abstract charcteristics of an object, properties and behaviors RDF class does not define behaviors. It is a data modelResource Description FrameworkSubject, predicate y object Subject -> Resource (Jose)04/09/12 Ontologies and Semantic 17
    • 04/09/12 Ontologies and Semantic 18
    • RDF: Triplets <Subject> <Predicate><Object><http://es.person/jose> <http://foaf/#name> "Jose" .<http://es.person/jose> <http://foaf/#has> "car" .<http://es.person/jose> <http://foaf/#friend_of> <http://es.person/jose>.04/09/12 Ontologies and Semantic 19
    • RDF: Schemas Schemas to define the namespaces of the resources Property names must be associated to schemas<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description about="http://www.cs.vassar.edu/~ide/rdf/"> <dc:creator>Nancy Ide</dc:creator> </rdf:Description> </rdf:RDF>04/09/12 Ontologies and Semantic 20
    • RDF: Schemas RDF Schema: "http://www.w3.org/1999/02/22-rdf-syntax-ns# DC Dublin Core: light weight RDFS vocabulary for describing generic metadata: “http://purl.org/dc/elements/1.1”<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description about="http://www.cs.vassar.edu/~ide/rdf/"> <dc:creator>Nancy Ide</dc:creator> </rdf:Description> </rdf:RDF>04/09/12 Ontologies and Semantic 21
    • RDF/XMLFoaf: friend of a friend ontology: http://http://xmlns.com/foaf/spec/ <rdf:RDF xmlns:rdf="http://w.o/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <rdf:Description rdf:about="http://es.person/jose"> <rdf:type>http://xmlns.com/foaf/spec/#Person</rdf:type> <foaf:has> car </foaf:has> <foaf:friend_of> http://es.person/jose </foaf:friend_of> </rdf:Description> </rdf:RDF> 04/09/12 Ontologies and Semantic 22
    • RDF/XMLYou can use the resource type as an element name. Abbreviated RDF syntax<rdf:RDF xmlns:rdf="http://w.o/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <foaf:Person rdf:about="http://es.person/jose"> <foaf:has> car </foaf:has> <foaf:friend_of> http://es.person/jose</foaf:friend_of> </foaf:Person></rdf:RDF> 04/09/12 Ontologies and Semantic 23
    • RDF/XML... but tripletsWhere are the triplets? <foaf:Group rdf:about="http://groups/ILRT"> <foaf:name>ILRT staff</foaf:name> <foaf:member> <foaf:Person> <foaf:name>Martin Poulter</foaf:name> <foaf:workplaceHomepage rdf:resource="http://www.ilrt.bris.ac.uk/"/> </foaf:Person> </foaf:member> </foaf:Group> 04/09/12 Ontologies and Semantic 24
    • RDF/XML... but tripletsHere they are.. 04/09/12 Ontologies and Semantic 25
    • RDF/XML... and graphs04/09/12 Ontologies and Semantic 26
    • RDF Extensibility!!!!!! How do you extend the properties in your data model? If you have a DDBB? Change tables, queries, inserts, update and modify. A nightmare. OOP. New properties in your class, incompatibility. RDF: add new triplets to the resources using new properties. Nothing changes. See example of Tutorial Ivan Herman (pag 55)04/09/12 Ontologies and Semantic 27
    • RDF/XMLParsing toolhttp://www.w3.org/RDF/Validator/ 04/09/12 Ontologies and Semantic 28
    • OWLOntology Web LanguageMarkup language in order to publish and shareinformation using ontologies.Extension of RDF/XMLClasses and relationsTerminology Instance: object Class: collection of objects. Description concept. All classes maybe a subclass of another (base: Thing)04/09/12 Ontologies and Semantic 29 Properties: A property is a directed binary relation
    • OWLTerminology Classes Descriptions: property restrictions, intersections, unions, constraints... Axioms: subClassOf, equivalentClass have a range which is the class Person04/09/12 Ontologies and Semantic 30
    • <owl:Class rdf:ID="WhiteBurgundy"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Burgundy" /> <owl:Class rdf:about="#WhiteWine" /> </owl:intersectionOf> </owl:Class>04/09/12 Ontologies and Semantic 31
    • <owl:Class rdf:ID="WhiteWine"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Wine" /> <owl:Restriction> <owl:onProperty rdf:resource="#hasColor" /> <owl:hasValue rdf:resource="#White" /> </owl:Restriction> </owl:intersectionOf></owl:Class>04/09/12 Ontologies and Semantic 32
    • <owl:Class rdf:ID="Fruit"> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#SweetFruit" /> <owl:Class rdf:about="#NonSweetFruit" /> </owl:unionOf></owl:Class>04/09/12 Ontologies and Semantic 33
    • <owl:Class rdf:ID="SweetFruit"> <rdfs:subClassOf rdf:resource="#EdibleThing" /> </owl:Class> <owl:Class rdf:ID="NonSweetFruit"> <rdfs:subClassOf rdf:resource="#EdibleThing" /> <owl:disjointWith rdf:resource="#SweetFruit" /> </owl:Class>04/09/12 Ontologies and Semantic 34
    • OWL <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#Tosca" /> <owl:Thing rdf:about="#Salome" /> </owl:oneOf> </owl:Class> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#Turandot" /> <owl:Thing rdf:about="#Tosca" /> </owl:oneOf> </owl:Class> </owl:intersectionOf> </owl:Class>04/09/12 Ontologies and Semantic 35
    • OWLTerminology Properties: A property is a directed binary relation that specifies class characteristics Datatype properties: modelName (String datatype) is the property of Manufacturer class Object properties: ownedBy may be an object type property of the Vehicle class and may have a range which is the class Person04/09/12 Ontologies and Semantic 36
    • OWL <owl:Classrdf:about="http://....../qualipso_maillinglist#Mail"> <rdf:typerdf:resource="http://..../2002/07/owl#Class"/> <rdfs:label >Mail</rdfs:label> <rdfs:comment >An electronicmail.</rdfs:comment> <rdfs:subClassOfrdf:resource="http://..../ns#Post" /> </owl:Class> 04/09/12 Ontologies and Semantic 37
    • OWLOnline ontologies browserhttp://owl.cs.manchester.ac.uk/browser/ontologies/ExamplesPizza: http://www.co-ode.org/ontologies/pizza/2007/02/12/pizza.ow 04/09/12 Ontologies and Semantic 38
    • QualiPSo“Issues” in OpenSource projects Huge amount of data in different information sources Heterogeneous information Information neither classified nor structured No relations between data in different information sources Outdated forges04/09/12 Ontologies and Semantic 39
    • QualiPSo – Information managementRelations between different information sources.Extractors searching for relations and then they putmarks of meta-info using ontologies.Relations searching for patterns: #bug 396Some relations:Bugs -> commits -> lines of codeBugs -> emailsDocs -> emails04/09/12 Ontologies and Semantic 40
    • Semantic Queries (SPARQL)SPARQL:SPARQL Protocol and RDF Query LanguageQueries language http://sparql.org/query.htmlPREFIX dc:<http://purl.org/dc/elements/1.1/>SELECT ?titleWHERE{<http://example.org/books> dc:title ?title}04/09/12 Ontologies and Semantic 41
    • ExamplesCommit related with bugs: PREFIX rdf: <http://.../-rdf-syntax-ns#> PREFIX relation:<"http://www.q.org/ont/qr#"> PREFIX qvc:<"http://www.q.org/ont/qvc#"> SELECT ?resource WHERE { ?resource relation:commitAboutIssue ?bugID . }04/09/12 Ontologies and Semantic 42
    • ExamplesCommit related with the bug #252: PREFIX rdf: <http://.../-rdf-syntax-ns#> PREFIX relation:<"http://www.q.org/ont/qr#"> PREFIX qvc:<"http://www.q.org/ont/qvc#"> SELECT ?resource ?message WHERE { ?resource relation:commitAboutIssue “252” . ?resource qvc:message ?message . }04/09/12 Ontologies and Semantic 43
    • "Introduction to the Semantic Web" - Ivan Herman - http://www.w3.org/2009/Talks/0829-Nanjing-IH/04/09/12 Ontologies and Semantic 44
    • Play with SPARQL http://dbpedia.org/snorql/ Extract all the films PREFIX ont: <http://dbpedia.org/ontology/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?e WHERE { ?e rdf:type ont:Film . }04/09/12 Ontologies and Semantic 45
    • Play with SPARQL http://dbpedia.org/snorql/ Extract all the films starred by cruise from the year 1990 PREFIX ont: <http://dbpedia.org/ontology/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?e WHERE { ?e rdf:type ont:Film . ?e ont:starring <http://dbpedia.org/resource/Tom_Cruise> . ?e ont:releaseDate ?date. ?e ont:producer ?producer ?producer FILTER (?date >= "1990"^^xsd:date) }04/09/12 Ontologies and Semantic 46
    • Play with SPARQL http://dbpedia.org/snorql/ Extract all the films (and producers name) starred by cruise from the year 1990 PREFIX ont: <http://dbpedia.org/ontology/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?e ?producer ?productor_name WHERE { ?e rdf:type ont:Film . ?e ont:starring <http://dbpedia.org/resource/Tom_Cruise> . ?e ont:releaseDate ?date. ?e ont:producer ?producer . ?producer dbpedia2:name ?productor_name FILTER (?date >= "1990-01-01"^^xsd:date) }04/09/12 Ontologies and Semantic 47
    • Play with SPARQL http://dbpedia.org/snorql/ Abstracts of movies starring Tom Cruise, released before 1999 SELECT ?subject ?label ?released ?abstract WHERE { ?subject rdf:type <http://dbpedia.org/ontology/Film>. ?subject dbpedia2:starring <http://dbpedia.org/resource/Tom_Cruise>. ?subject rdfs:comment ?abstract. ?subject rdfs:label ?label. FILTER(lang(?abstract) = "en" && lang(?label) = "en"). ?subject <http://dbpedia.org/ontology/releaseDate> ?released. FILTER(xsd:date(?released) < "2000-01-01"^^xsd:date). } ORDER BY ?released LIMIT 2004/09/12 Ontologies and Semantic 48
    • Jose Gato Luis <jose.gato@atosresearch.eu> http://www.linkedin.com/in/josegatoluis04/09/12 Ontologies and Semantic 49