Geodata wars and castles

Allikas: Lambda

The example below was built for Tanel's Estonian geodata. It first says that if something "happenedIn" then it is probably war (since this is so in our data), unless we explicitly know it is not war (like it has type wikicat_Events_in_Tallinn or wikicat_Riots).

Then we have a version of wars in cities "iscitywar" and also define a "warcity" which is a city associated with a war (i.e. war happened in the city) or has a castle of some kind.

[ 

  {"@role": "assumption", 
   "@confidence": 0.9,
   "@logic": 
    [["$arc", "?:X", "<happenedIn>", "?:Y"],"=>",
      [["iswar","?:X"],"|",
       ["$block",0,["$not",["iswar","?:X"]]]]]
   },    
   
   {"@role": "assumption", 
   "@confidence": 0.9,
   "@logic": 
    [[["$arc", "?:X", "<happenedIn>", "?:Y"],"&",
      ["$arc", "?:Y", "rdf:type", "<wikicat_Cities_and_towns_in_Estonia>"]],"=>",
     [["iscitywar","?:X"],"|",
      ["$block",0,["$not",["iswar","?:X"]]]]]
   }, 
  
   {"@role": "assumption", 
   "@confidence": 0.8,
   "@logic": 
    [[["$arc", "?:X", "<happenedIn>", "?:Y"],"&",
      ["$arc", "?:Y", "rdf:type", "<wikicat_Cities_and_towns_in_Estonia>"]],"=>",
     [["warcity","?:Y"],"|",
      ["$block",0,["$not",["iswar","?:X"]]]]]
   }, 

   

   {"@role": "assumption", 
   "@confidence": 0.9,
   "@logic": 
    [[["$arc", "?:X", "<isLocatedIn>", "?:Y"],"&",
      ["$arc", "?:X", "rdf:type", "<Castle>"],"&",
      ["$arc", "?:Y", "rdf:type", "<wikicat_Cities_and_towns_in_Estonia>"]],"=>",
     ["warcity","?:Y"]]      
   }, 

   
   {"@role": "assumption", 
   "@confidence": 0.9,
   "@logic": 
    [[["$arc", "?:X", "<isLocatedIn>", "?:Y"],"&",
      ["$arc", "?:X", "rdf:type", "<wikicat_Castles>"],"&",
      ["$arc", "?:Y", "rdf:type", "<wikicat_Cities_and_towns_in_Estonia>"]],"=>",
     ["warcity","?:Y"]]      
   },   
   

  {"@role": "assumption", 
   "@confidence": 100,
   "@logic": 
    [["$arc", "?:X", "rdf:type", "<wikicat_Events_in_Tallinn>"],"=>",
      ["-iswar","?:X"]]
   }, 

   {"@role": "assumption", 
   "@confidence": 100,
   "@logic": 
    [["$arc", "?:X", "rdf:type", "<wikicat_Riots>"],"=>",
      ["-iswar","?:X"]]
   },

   {"@role": "assumption", 
   "@confidence": 100,
   "@logic": 
    [[["$arc", "?:X", "<isLocatedIn>", "?:Y"],"&",
      ["$arc", "?:Y","rdf:type", "<wikicat_Cities_and_towns_in_Estonia>"]],"=>",
      ["-iswar","?:X"]]
   }, 

  //  {"@question": ["warcity","<Narva>"]}

  {"@question": ["warcity","?:Y"]}

  
]