Derive simple information about Obama

Allikas: Kursused
Redaktsioon seisuga 9. november 2015, kell 16:05 kasutajalt Tanel (arutelu | kaastöö) (Uus lehekülg: ' Suppose we have a triplet <pre> http://en.wikipedia.org/wiki/Barack_Obama, id:type, http://conceptnet5.media.mit.edu/web/c/en/person </pre> then we encode it in the otter form...')
(erin) ←Vanem redaktsioon | Viimane redaktsiooni (erin) | Uuem redaktsioon→ (erin)
Mine navigeerimisribale Mine otsikasti

Suppose we have a triplet

http://en.wikipedia.org/wiki/Barack_Obama,
id:type,
http://conceptnet5.media.mit.edu/web/c/en/person

then we encode it in the otter format like this:

  
  rdf("http://en.wikipedia.org/wiki/Barack_Obama",
      "id:type",
      "http://conceptnet5.media.mit.edu/web/c/en/person").

and then we add some of our handmade common-sense rules:

	  
  -rdf(X,"id:type",
      "http://conceptnet5.media.mit.edu/web/c/en/person") |
   rdf(X,"id:type",
      "http://conceptnet5.media.mit.edu/web/c/en/animal").
	  
   -rdf(X,"id:type",
      "http://conceptnet5.media.mit.edu/web/c/en/animal") |
   rdf(X,"id:type",
      "mortal").	  
  	  
  -rdf("http://en.wikipedia.org/wiki/Barack_Obama",
      "id:type",
      "mortal"). 	  

   -rdf(X,"id:type",
      "http://conceptnet5.media.mit.edu/web/c/en/person") |
    rdf(X,"id:CapableOf",
      "id:eat").