0
Ontologias
      Sérgio Santos
  Inteligência Artificial
    Novembro 2009
                            1
<rdf:RDF
       xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#"
       xmlns="http://dei.uc.pt/works-syntax">

      <rdf:...
3
Como representar
 conhecimento?

                   4
<?xml version="1.0" encoding="utf-8" ?>
<university name="Universidade de Coimbra" id="504">
  <students>
     <student na...
university

     student    student     student

address    course


                                      6
[…]
xmlns:uc="http://uc.pt/syntax#"
[…]
<rdf:Description about="http://uc.pt">
  <uc:name>Universidade de Coimbra</uc:name...
http://dei.uc.pt/~sdsantos

                     student

attendsUniversity                 attendsCourse




       unive...
http://uc.pt/syntax


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:rdfs="http://www.w3....
[…]
xmlns="http://uc.pt/syntax#"
[…]
<university rdf:id="UC">
  <name>Universidade de Coimbra</name>
</university>


<stud...
•
•
•
    •
    •
    •


        11
<owl:Ontology rdf:about="">
   <rdfs:comment>Example ontology.</rdfs:comment>
</owl:Ontology>


<owl:Class rdf:ID="Person"...
13
14
•
    •
    •


•


•


        15
16
17
•

•

•


•




    18
•


•


•


    19
Trabalhar com
  ontologias

                20
1. Determinar o domínio e abrangência da ontologia
2. Considerar a reutilização de ontologias existentes
3. Enumerar os te...
•
    •
    •



•
    •
    •




        22
•

•



•

•



    23
•

•

•

•

•



    24
•


•




•

    25
String   personURI =    "http://somewhere/JohnSmith";
String   givenName =    "John";
String   familyName =   "Smith";
Str...
public class SomeClientAgent extends Agent
                            implements SomeVocabulary
{

   private Codec codec...
•
•
•
•


    28
PREFIX uc: <http://uc.pt/syntax#>
SELECT ?aluno
FROM <studentsDB.rdf>
WHERE {
    ?aluno uc:attendsUniversity "#UC" .
    ...
•


•
    •
    •

    •




        30
Knowledge
 Portals

            31
•


•


•


•



    32
•
    •
    •
    •




•


•


        33
•




•




    34
•


    •
    •


•




        35
•
    •
    •
    •


•
    •
    •
    •


        36
^
Referencias

              37
•

•

•


•

•


•


•


    38
Upcoming SlideShare
Loading in...5
×

Ontologias

1,083

Published on

Apresentação sobre Ontologias e Web Semântica, para a cadeira de Inteligência Artificial.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,083
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
29
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Ontologias"

  1. 1. Ontologias Sérgio Santos Inteligência Artificial Novembro 2009 1
  2. 2. <rdf:RDF xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#" xmlns="http://dei.uc.pt/works-syntax"> <rdf:Description about="http://dei.uc.pt/works#1337"/> <Title> Ontologias </Title> Sérgio Santos </Author> <Author> <Subject> Inteligência Artificial </Subject> <PublishDate> Novembro 2009 </PublishDate> </rdf:RDF> 2
  3. 3. 3
  4. 4. Como representar conhecimento? 4
  5. 5. <?xml version="1.0" encoding="utf-8" ?> <university name="Universidade de Coimbra" id="504"> <students> <student name="Sérgio Santos" id="2006125508"> <address>Espinheiro, Penela</address> <course id="123"> Mestrado em Engenharia Informática </course> </student> ... </students> </university> 5
  6. 6. university student student student address course 6
  7. 7. […] xmlns:uc="http://uc.pt/syntax#" […] <rdf:Description about="http://uc.pt"> <uc:name>Universidade de Coimbra</uc:name> </rdf:Description> <rdf:Description about="http://dei.uc.pt/~sdsantos"> <uc:name>Sérgio Santos</uc:name> <uc:num>2006125508</uc:num> <uc:attendsCourse rdf:resource="http://dei.uc.pt/~MEI" /> <uc:attendsUniversity rdf:resource="http://uc.pt" /> </rdf:Description> 7
  8. 8. http://dei.uc.pt/~sdsantos student attendsUniversity attendsCourse university course http://uc.pt http://dei.uc.pt/~MEI 8
  9. 9. http://uc.pt/syntax <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <rdfs:Class rdf:ID="student"/> <rdfs:Class rdf:ID="university"/> <rdfs:Class rdf:ID="course"/> </rdf:RDF> 9
  10. 10. […] xmlns="http://uc.pt/syntax#" […] <university rdf:id="UC"> <name>Universidade de Coimbra</name> </university> <student rdf:id="sdsantos"> <name>Sérgio Santos</name> <num>2006125508</num> <attendsCourse rdf:resource="#MEI" /> <attendsUniversity rdf:resource="#UC" /> </student> 10
  11. 11. • • • • • • 11
  12. 12. <owl:Ontology rdf:about=""> <rdfs:comment>Example ontology.</rdfs:comment> </owl:Ontology> <owl:Class rdf:ID="Person"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/> </owl:Class> <owl:Class rdf:ID="Student"> <rdfs:subClassOf rdf:resource="#Person"/> </owl:Class> 12
  13. 13. 13
  14. 14. 14
  15. 15. • • • • • 15
  16. 16. 16
  17. 17. 17
  18. 18. • • • • 18
  19. 19. • • • 19
  20. 20. Trabalhar com ontologias 20
  21. 21. 1. Determinar o domínio e abrangência da ontologia 2. Considerar a reutilização de ontologias existentes 3. Enumerar os termos importantes na ontologia 4. Definir as classes e a sua hierarquia 5. Definir as propriedades das classes 6. Definir os tipos de propriedades 7. Criar os indivíduos 21
  22. 22. • • • • • • 22
  23. 23. • • • • 23
  24. 24. • • • • • 24
  25. 25. • • • 25
  26. 26. String personURI = "http://somewhere/JohnSmith"; String givenName = "John"; String familyName = "Smith"; String fullName = givenName + " " + familyName; Model model = ModelFactory.createDefaultModel(); Resource johnSmith = model.createResource(personURI) .addProperty(VCARD.FN, fullName) .addProperty(VCARD.N, model.createResource() .addProperty(VCARD.Given, givenName) .addProperty(VCARD.Family, familyName)); 26
  27. 27. public class SomeClientAgent extends Agent implements SomeVocabulary { private Codec codec = new SLCodec(); private Ontology ontology = SomeOntology.getInstance(); protected void setup() { // Register language and ontology getContentManager().registerLanguage(codec); getContentManager().registerOntology(ontology); ... } ... 27
  28. 28. • • • • 28
  29. 29. PREFIX uc: <http://uc.pt/syntax#> SELECT ?aluno FROM <studentsDB.rdf> WHERE { ?aluno uc:attendsUniversity "#UC" . ?aluno uc:attendsCourse "#MEI" . } 29
  30. 30. • • • • • 30
  31. 31. Knowledge Portals 31
  32. 32. • • • • 32
  33. 33. • • • • • • 33
  34. 34. • • 34
  35. 35. • • • • 35
  36. 36. • • • • • • • • 36
  37. 37. ^ Referencias 37
  38. 38. • • • • • • • 38
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×