SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
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: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
Como representar
 conhecimento?

                   4
<?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
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>
</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
http://dei.uc.pt/~sdsantos

                     student

attendsUniversity                 attendsCourse




       university                  course

      http://uc.pt          http://dei.uc.pt/~MEI



                                                    8
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
[…]
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
<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
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 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
•

•



•

•



    23
•

•

•

•

•



    24
•


•




•

    25
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
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
PREFIX uc: <http://uc.pt/syntax#>
SELECT ?aluno
FROM <studentsDB.rdf>
WHERE {
    ?aluno uc:attendsUniversity "#UC" .
    ?aluno uc:attendsCourse "#MEI" .
}



                                          29
•


•
    •
    •

    •




        30
Knowledge
 Portals

            31
•


•


•


•



    32
•
    •
    •
    •




•


•


        33
•




•




    34
•


    •
    •


•




        35
•
    •
    •
    •


•
    •
    •
    •


        36
^
Referencias

              37
•

•

•


•

•


•


•


    38

Mais conteúdo relacionado

Destaque

75 em jesus tens a palma da vitória
75   em jesus tens a palma da vitória75   em jesus tens a palma da vitória
75 em jesus tens a palma da vitória
Mylena Vasconcelos
 
Kpi and csf: KPI และ CSF
Kpi and csf: KPI และ CSFKpi and csf: KPI และ CSF
Kpi and csf: KPI และ CSF
maruay songtanin
 
LIAISON OFFICER CERTIFICATE
LIAISON OFFICER CERTIFICATELIAISON OFFICER CERTIFICATE
LIAISON OFFICER CERTIFICATE
Debby Kurnia
 

Destaque (18)

Se no.5792 c ku 2010
Se no.5792 c ku 2010Se no.5792 c ku 2010
Se no.5792 c ku 2010
 
Cerebro
CerebroCerebro
Cerebro
 
184 meu jesus, meu jesus
184   meu jesus, meu jesus184   meu jesus, meu jesus
184 meu jesus, meu jesus
 
Preduzetnistvo na tri kontinenta
Preduzetnistvo na tri kontinentaPreduzetnistvo na tri kontinenta
Preduzetnistvo na tri kontinenta
 
"Cultura mundo e medo" - fragmento para Resumo
"Cultura mundo e medo" - fragmento para Resumo"Cultura mundo e medo" - fragmento para Resumo
"Cultura mundo e medo" - fragmento para Resumo
 
Slide - Equipe Albert Graham
Slide - Equipe Albert GrahamSlide - Equipe Albert Graham
Slide - Equipe Albert Graham
 
Презентація М.Золотухіна " ЯК ВИНЕСТИ Е-УРЯДУВАННЯ ТА Е-ДЕМОКРАТІЮ НА ПОРЯДО...
Презентація М.Золотухіна " ЯК ВИНЕСТИ Е-УРЯДУВАННЯ  ТА Е-ДЕМОКРАТІЮ НА ПОРЯДО...Презентація М.Золотухіна " ЯК ВИНЕСТИ Е-УРЯДУВАННЯ  ТА Е-ДЕМОКРАТІЮ НА ПОРЯДО...
Презентація М.Золотухіна " ЯК ВИНЕСТИ Е-УРЯДУВАННЯ ТА Е-ДЕМОКРАТІЮ НА ПОРЯДО...
 
75 em jesus tens a palma da vitória
75   em jesus tens a palma da vitória75   em jesus tens a palma da vitória
75 em jesus tens a palma da vitória
 
04 p erda no 4 th 2004 ttg penyelenggaraan sistem pendidikan mod 4
04 p erda no 4 th 2004 ttg penyelenggaraan sistem pendidikan mod 404 p erda no 4 th 2004 ttg penyelenggaraan sistem pendidikan mod 4
04 p erda no 4 th 2004 ttg penyelenggaraan sistem pendidikan mod 4
 
Kpi and csf: KPI และ CSF
Kpi and csf: KPI และ CSFKpi and csf: KPI และ CSF
Kpi and csf: KPI และ CSF
 
LIAISON OFFICER CERTIFICATE
LIAISON OFFICER CERTIFICATELIAISON OFFICER CERTIFICATE
LIAISON OFFICER CERTIFICATE
 
Plano de ações para 2015
Plano de ações para 2015Plano de ações para 2015
Plano de ações para 2015
 
59 eu creio sim
59   eu creio sim59   eu creio sim
59 eu creio sim
 
No2
No2No2
No2
 
122 fogo divino
122   fogo divino122   fogo divino
122 fogo divino
 
106 viva cristo
106   viva cristo106   viva cristo
106 viva cristo
 
Сумма технологий: +5 к скорости разработки
Сумма технологий: +5 к скорости разработкиСумма технологий: +5 к скорости разработки
Сумма технологий: +5 к скорости разработки
 
Procedimentos argumentativos
Procedimentos argumentativosProcedimentos argumentativos
Procedimentos argumentativos
 

Semelhante a Ontologias

Hooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQLHooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQL
Samuel Lampa
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the web
shellac
 
Needle in an enterprise haystack
Needle in an enterprise haystackNeedle in an enterprise haystack
Needle in an enterprise haystack
Andrew Mleczko
 
Open (linked) bibliographic data edmund chamberlain (university of cambridge)
Open (linked) bibliographic data   edmund chamberlain (university of cambridge)Open (linked) bibliographic data   edmund chamberlain (university of cambridge)
Open (linked) bibliographic data edmund chamberlain (university of cambridge)
RDTF-Discovery
 
Repository koloniale architectuur v1.0
Repository koloniale architectuur v1.0Repository koloniale architectuur v1.0
Repository koloniale architectuur v1.0
psuijker
 
Don't keep it under your hat: A Fez design description and case study
Don't keep it under your hat: A Fez design description and case studyDon't keep it under your hat: A Fez design description and case study
Don't keep it under your hat: A Fez design description and case study
mrangryfish
 
A candidate dataset_discovery_and_linkage_recommendation_system_for_linked_data
A candidate dataset_discovery_and_linkage_recommendation_system_for_linked_dataA candidate dataset_discovery_and_linkage_recommendation_system_for_linked_data
A candidate dataset_discovery_and_linkage_recommendation_system_for_linked_data
STIinnsbruck
 

Semelhante a Ontologias (20)

REST teori og praksis; REST in theory and practice
REST teori og praksis; REST in theory and practiceREST teori og praksis; REST in theory and practice
REST teori og praksis; REST in theory and practice
 
Hooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQLHooking up Semantic MediaWiki with external tools via SPARQL
Hooking up Semantic MediaWiki with external tools via SPARQL
 
Knowledge Representation and Research in the Real World
Knowledge Representation and Research in the Real WorldKnowledge Representation and Research in the Real World
Knowledge Representation and Research in the Real World
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the web
 
Integrating a Domain Ontology Development Environment and an Ontology Search ...
Integrating a Domain Ontology Development Environment and an Ontology Search ...Integrating a Domain Ontology Development Environment and an Ontology Search ...
Integrating a Domain Ontology Development Environment and an Ontology Search ...
 
Facilitating Data Curation: a Solution Developed in the Toxicology Domain
Facilitating Data Curation: a Solution Developed in the Toxicology DomainFacilitating Data Curation: a Solution Developed in the Toxicology Domain
Facilitating Data Curation: a Solution Developed in the Toxicology Domain
 
BioSD Tutorial 2014 Editition
BioSD Tutorial 2014 EdititionBioSD Tutorial 2014 Editition
BioSD Tutorial 2014 Editition
 
Needle in an enterprise haystack
Needle in an enterprise haystackNeedle in an enterprise haystack
Needle in an enterprise haystack
 
Milleks meile õpitehnoloogia standardid?
Milleks meile õpitehnoloogia standardid?Milleks meile õpitehnoloogia standardid?
Milleks meile õpitehnoloogia standardid?
 
Open (linked) bibliographic data edmund chamberlain (university of cambridge)
Open (linked) bibliographic data   edmund chamberlain (university of cambridge)Open (linked) bibliographic data   edmund chamberlain (university of cambridge)
Open (linked) bibliographic data edmund chamberlain (university of cambridge)
 
Linked Data in Learning Analytics Tools
Linked Data in Learning Analytics ToolsLinked Data in Learning Analytics Tools
Linked Data in Learning Analytics Tools
 
Open (linked) bibliographic data
Open (linked) bibliographic dataOpen (linked) bibliographic data
Open (linked) bibliographic data
 
06 gioca-ontologies
06 gioca-ontologies06 gioca-ontologies
06 gioca-ontologies
 
Introduction to Linked Data
Introduction to Linked DataIntroduction to Linked Data
Introduction to Linked Data
 
The Place of Schema.org in Linked Ocean Data
The Place of Schema.org in Linked Ocean DataThe Place of Schema.org in Linked Ocean Data
The Place of Schema.org in Linked Ocean Data
 
Linked Data at the OU - the story so far
Linked Data at the OU - the story so farLinked Data at the OU - the story so far
Linked Data at the OU - the story so far
 
Repository koloniale architectuur v1.0
Repository koloniale architectuur v1.0Repository koloniale architectuur v1.0
Repository koloniale architectuur v1.0
 
Metadata as Linked Data for Research Data Repositories
Metadata as Linked Data for Research Data RepositoriesMetadata as Linked Data for Research Data Repositories
Metadata as Linked Data for Research Data Repositories
 
Don't keep it under your hat: A Fez design description and case study
Don't keep it under your hat: A Fez design description and case studyDon't keep it under your hat: A Fez design description and case study
Don't keep it under your hat: A Fez design description and case study
 
A candidate dataset_discovery_and_linkage_recommendation_system_for_linked_data
A candidate dataset_discovery_and_linkage_recommendation_system_for_linked_dataA candidate dataset_discovery_and_linkage_recommendation_system_for_linked_data
A candidate dataset_discovery_and_linkage_recommendation_system_for_linked_data
 

Mais de Sérgio Santos

Mais de Sérgio Santos (9)

Launching tech products
Launching tech productsLaunching tech products
Launching tech products
 
Simple MongoDB design for Rails apps
Simple MongoDB design for Rails appsSimple MongoDB design for Rails apps
Simple MongoDB design for Rails apps
 
Rails + mongo db
Rails + mongo dbRails + mongo db
Rails + mongo db
 
Ultra fast web development with sinatra
Ultra fast web development with sinatraUltra fast web development with sinatra
Ultra fast web development with sinatra
 
Agoge - produtividade & multitasking
Agoge - produtividade & multitaskingAgoge - produtividade & multitasking
Agoge - produtividade & multitasking
 
Workshop Django
Workshop DjangoWorkshop Django
Workshop Django
 
Gestão De Projectos
Gestão De ProjectosGestão De Projectos
Gestão De Projectos
 
Django Vs Rails
Django Vs RailsDjango Vs Rails
Django Vs Rails
 
Gestor - Casos De Uso
Gestor - Casos De UsoGestor - Casos De Uso
Gestor - Casos De Uso
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Ontologias

  • 1. Ontologias Sérgio Santos Inteligência Artificial Novembro 2009 1
  • 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
  • 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. university student student student address course 6
  • 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. http://dei.uc.pt/~sdsantos student attendsUniversity attendsCourse university course http://uc.pt http://dei.uc.pt/~MEI 8
  • 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. […] 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
  • 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
  • 14. 14
  • 15. • • • • 15
  • 16. 16
  • 17. 17
  • 20. Trabalhar com ontologias 20
  • 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
  • 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. 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
  • 29. PREFIX uc: <http://uc.pt/syntax#> SELECT ?aluno FROM <studentsDB.rdf> WHERE { ?aluno uc:attendsUniversity "#UC" . ?aluno uc:attendsCourse "#MEI" . } 29
  • 30. • • • • • 30
  • 33. • • • • • 33
  • 34. • • 34
  • 35. • • • 35
  • 36. • • • • • • • 36