Question: What is the character role of Mark Williams (who has 1 child) in Harry Potter and the Prisoner of Azkaban (whose script was written by J. K. Rowling)?
Choices:
Lily Potter
Arthur Weasley
Hannibal Lecter
Porky Pig
Captain Jack Sparrow
Puss in Boots
Sabina Spielrein
Prue Halliwell
Johann Tetzel
Number Three
Answer: Arthur Weasley
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Harry Potter and the Prisoner of Azkaban" . ?e_1 <screenwriter> ?e_3 . ?e_3 <pred:name> "J. K. Rowling" . ?e_2 <pred:name> "Mark Williams" . ?e_2 <number_of_children> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> "1"^^xsd:double . ?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: J. K. Rowling
function: Relate
dependencies: 0
inputs: screenwriter
backward
function: Find
inputs: Harry Potter and the Prisoner of Azkaban
function: And
dependencies: 1
2
function: Find
inputs: Mark Williams
function: FilterNum
dependencies: 4
inputs: number of children
1
=
function: QueryRelationQualifier
dependencies: 3
5
inputs: cast member
character role