Question: What is the character role of Larry Hagman as a member of the cast in Dallas (that has Jim Beaver as a cast member)?
Choices:
Hans Moleman
Éamon de Valera
Dr. Hibbert
Peter Pan
Jack Ruby
David Pratt
Jamie Madrox
J. R. Ewing
John Russell, 1st Earl Russell
Patrick Star
Answer: J. R. Ewing
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Dallas" . ?e_1 <cast_member> ?e_3 . ?e_3 <pred:name> "Jim Beaver" . ?e_2 <pred:name> "Larry Hagman" . ?e_1 <cast_member> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <cast_member> ; <pred:fact_t> ?e_2 ] <character_role> ?qpv .  }
Program:
function: Find
inputs: Jim Beaver
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Dallas
function: And
dependencies: 1
2
function: Find
inputs: Larry Hagman
function: QueryRelationQualifier
dependencies: 3
4
inputs: cast member
character role