Output of first lab converted to second lab

Allikas: Kursused
Mine navigeerimisribale Mine otsikasti

  % clear automatic strategy selection
clear(auto).

% use capital letters (A,X,T,...) as vars
set(prolog_style_variables).

% select the search strategy
set(hyper_res). % an alternative is to use set(binary_res).
set(factor).

% select sensible amount of output
clear(print_given). % uncomment to see input and process
set(print_kept).  % this is important: prints all generated and kept clauses
assign(stats_level, 0).

% just make it stop after N secs
assign(max_seconds, 10).

list(sos).

  
rdf(
  "http://en.wikipedia.org/wiki/Barack_Obama",
  "id:action",
  "id:local_1"
).
rdf(
  "id:local_1",
  "id:isactivity",
  "http://conceptnet5.media.mit.edu/web/c/en/go"
).
rdf(
  "id:local_1",
  "id:extrainfo",
  "http://conceptnet5.media.mit.edu/web/c/en/yesterday"
).
rdf(
  "http://en.wikipedia.org/wiki/Barack_Obama",
  "http://conceptnet5.media.mit.edu/web/c/en/live",
  "https://en.wikipedia.org/wiki/Grand_Hyatt_Beijing"
).
rdf(
  "https://en.wikipedia.org/wiki/Grand_Hyatt_Beijing",
  "http://conceptnet5.media.mit.edu/web/c/en/type/v/identify_as_belonging_to_a_certain_type",
  "id:local_2"
).
rdf(
  "id:local_2",
  "id:isobject",
  "http://conceptnet5.media.mit.edu/web/c/en/hotel"
).
rdf(
  "id:local_2",
  "id:extrainfo",
  "http://conceptnet5.media.mit.edu/web/c/en/superb"
).

  
-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(X,"id:type",
    "http://conceptnet5.media.mit.edu/web/c/en/person") |
  rdf(X,"id:CapableOf",
    "id:eat").
  
  -rdf(X , "http://conceptnet5.media.mit.edu/web/c/en/live", Y) | 
  rdf(X,"id:type", "http://conceptnet5.media.mit.edu/web/c/en/animal").    
   
  -rdf(X,"http://conceptnet5.media.mit.edu/web/c/en/type/v/identify_as_belonging_to_a_certain_type",Y) | 
  -rdf(Y,"id:isobject", Z) |
  rdf(X,"id:type",Z).
  
  -rdf(X,"http://conceptnet5.media.mit.edu/web/c/en/live",Y) | 
  -rdf(Y,"id:type","http://conceptnet5.media.mit.edu/web/c/en/hotel") |
  -rdf(Y,"http://conceptnet5.media.mit.edu/web/c/en/type/v/identify_as_belonging_to_a_certain_type",Z) |
  -rdf(Z,"id:extrainfo","http://conceptnet5.media.mit.edu/web/c/en/superb") | 
  rdf(X,"id:type","http://conceptnet5.media.mit.edu/web/c/en/rich").

end_of_list.