query($sql); if ($result === FALSE) db_die(); $data = $result->fetch_assoc(); if ($data == FALSE) db_die(); return $data; } function get_resolve_input() { global $mysqli; $ip = $_SERVER["REMOTE_ADDR"]; // printf("!"); $sql = sprintf("SELECT * FROM resolve_tasks WHERE ip = '%s'", $ip); $result = $mysqli->query($sql); $forbid_input_ids = Array(); while ($data = $result->fetch_assoc()) { $forbid_input_ids[] = $data["input_id"]; } // printf("@"); $sql = sprintf("SELECT * FROM resolve_tasks "); $where = ""; foreach ($forbid_input_ids as $forbidden_id) { if (strlen($where)) $where .= " AND "; $where .= sprintf("input_id <> '%d'", $forbidden_id); } if (strlen($where)) $sql .= " WHERE enable = 1 AND ip = '' AND " . $where; else $sql .= " WHERE enable = 1 AND ip = ''"; $sql .= " GROUP BY input_id ORDER BY rand()"; // printf($sql); $result = $mysqli->query($sql); if ($result->num_rows == 0) { printf("

Sorry, we have no more tasks available to you and we could not tell it before this point. Please return the HIT by pressing 'Return HIT' on the MTurk page. Thank you for your understanding.

"); exit(0); } $data = $result->fetch_assoc(); // print_r($result); if ($data === FALSE) { printf("

Sorry, we have no more tasks available to you and we could not tell it before this point. Please return the HIT by pressing 'Return HIT' on the MTurk page. Thank you for your understanding.

"); exit(0); } $hash = $data["hash"]; $input_id = $data["input_id"]; $output_id = $data["output_id"]; // printf("@@@@@@@@"); $sql = sprintf("SELECT *, output.id as output_id FROM input join output on output.hash = input.hash WHERE input.id = '$input_id' and output.id = '$output_id'"); $result = $mysqli->query($sql); if ($result === FALSE) db_die(); $data = $result->fetch_assoc(); if ($data == FALSE) db_die(); return $data; } function mark_use($hash) { global $mysqli; $sql = sprintf("UPDATE input SET count_output = count_output + 1 WHERE hash = '%s'", $hash); $result = $mysqli->query($sql); if ($result === FALSE) db_die(); } function seen($hash) { global $mysqli; $ip = $_SERVER["REMOTE_ADDR"]; $sql = sprintf("INSERT INTO seen (hash, ip) values ('%s', '%s')", $hash, $ip); $result = $mysqli->query($sql); if ($result === FALSE) db_die(); } function record_output($hash, $output_id, $eanswer) { global $mysqli; mark_use($hash); $ip = $_SERVER["REMOTE_ADDR"]; $sql = sprintf("INSERT INTO output (setup, hash, equestion, eanswer) VALUES ('resolve', '%s', '%s', '%s')", addslashes($hash), addslashes($output_id), addslashes($eanswer)); $result = $mysqli->query($sql); if ($result === FALSE) db_die(); $sql = sprintf("UPDATE resolve_tasks SET ip = '$ip' WHERE hash = '$hash' LIMIT 1;"); $result = $mysqli->query($sql); if ($result === FALSE) db_die(); } function get_verify_code_by_hash($hash) { global $mysqli; $sql = sprintf("SELECT * FROM input WHERE `hash` = '$hash'"); $result = $mysqli->query($sql); if ($result === FALSE) db_die(); $data = $result->fetch_assoc(); if ($data == FALSE) db_die(); return $data; } $mode = safe_get("mode"); if ($mode == "") $mode = "index"; switch ($mode) { case "index": display_intro(); break; case "form": display_form(); break; case "submit": submit_data(); break; case "code"; display_code(); break; case "display_results"; display_results(); break; } function open_page($title) { ?> <?php echo $title ?>

Instructions

We are doing a linguistic research in question answering. We study how people resolve "elliptic questions" as shown in the following dialog example:

Jim: "Who was the president of the United states in 2013?"
Jim asked the full question.
Larissa: "Barack Obama"
Larissa gave an answer
Jim: "And in 1992?"
This is an elliptic question. Jim omitted most of the words because it was clear that they had been talking about pre president of the US and he wanted to see what the situation was like back in 1992.
Equals to: "Who was the president of the United states in 1992?"
This is the actual meaning (the resolution) of the elliptic question.

We need your help to gather natural examples of resolutions of elliptic questions. Be natural, do not use (copy) the same pattern as in the provided examples.

For a given question, an answer, and a follow-up elliptic question you'll be supposed to come up with a full question that corresponds to the follow-up question. Think of it as an assignment in a grammar text book. Please don't overthink it, it's really easy. We kinda guess it's easy money :-).

You'll be filling forms such as this one:

Question: Who was the president of the United states in 2013?
Answer: Barack Obama
Category: Politics
 
Elliptic question: What shape was his office?
Reformulate as a full question:
Then we'll show you a code you will copy to the MTurk HID page.

OK, let's get started

$message

"); } ?>
Question:
Answer:
Category:       Give me a different question. Didn't like this one.
 
Elliptic question:

Resolve the Elliptic question into a Full question is using the Question and Answer above:
Resolved question:

Not sure what do to? No problem:

You'll see the code to copy to the MTurk after you submit this.

You can close this page when you're done copying the code.