Question: What character does John Mahoney, born Charles Jonathan Mahoney, play on Frasier?
Choices: Martin Crane
Bill Haydon
Éamon de Valera
Mrs. Potato Head
Padmé Amidala
Homer Van Meter
Marion Silver
Meyer Wolfshiem
Ninth Doctor
Time Traveller
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Frasier" . ?e_2 <pred:name> "John Mahoney" . ?e_2 <birth_name> ?pv . ?pv <pred:value> "Charles Jonathan Mahoney" . ?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: Frasier
function: Find
inputs: John Mahoney
function: FilterStr
dependencies: 1
inputs: birth name
Charles Jonathan Mahoney
function: QueryRelationQualifier
dependencies: 0
2
inputs: cast member
character role
Answer: Martin Crane