Question: Is there a greater area in Tasmania (the one that is located in or next to Pacific Ocean) or South Island?
Choices:
Ireland
South Island
Maui
Trinidad
Long Island
Newfoundland
Guernsey
Hawaii
Puerto Rico
Tasmania
Program:
function: Find
inputs: Pacific Ocean
function: Relate
dependencies: 0
inputs: located in or next to body of water
backward
function: Find
inputs: Tasmania
function: And
dependencies: 1
2
function: Find
inputs: South Island
function: SelectBetween
dependencies: 3
4
inputs: area
greater
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Tasmania" . ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "Pacific Ocean" .   } UNION { ?e <pred:name> "South Island" .  } ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: South Island