Net::Amazon::MechanicalTurk::Command::RetrieveResults - Retrieves answer data.
$mturk->retrieveResults( input => "loadhits-success.csv", output => "loadhits-results.csv", progress => \*STDOUT );
retrieveResults
Retrieves the available answers for each HITId in input and stores the answers in output.
input - The input parameter is something which should produce rows of data (hashes) with at least one column named HITId. The case does not matter, however all rows should use the same column name. Row 1 should not have hitid, if row 2 has HITId. This parameter may be of the following types: - Net::Amazon::MechanicalTurk::RowData - An array of hashes. (This is internally converted into an object of type: Net::Amazon::MechanicalTurk::RowData::ArrayHashRowData) - A reference to a subroutine. When the retrieveResults method asks for row data, the subroutine will be called and passed a subroutine reference, which should be called for every row generated by the input. The generated row should be a hash reference. (This is internally converted into an object of type Net::Amazon::MechanicalTurk::RowData::SubroutineRowData) - The name of a file. The file should be either a CSV or tab delimited file. If the file name ends with '.csv', it will read as a CSV, otherwise it is assumed to be tab delimited. The first row in the file should contain the column names. Each subsequence row becomes a hash reference based on the column names. (This is internally converted into an object of type Net::Amazon::MechanicalTurk::RowData::DelimitedRowData) output - Used to write answer information back to some form of data storage. This parameter may be of the following types: - A filename. The answers for an assignment will be written to the file name as a delimited file. It will be a CSV file if the file name ends with .csv, otherwise it will be a tab delimited file. The file will have the following named columns: AssignmentId AssignmentStatus HITId WorkerId There will be unnamed columns after those. These columns will come in pairs. A pair will have a question id and then a textual form of the answer, for that question. - A subroutine. The subroutine will be called back with a hash containing the following values: - mturk - A handle to the mturk client. - HITId - The HITId for the assignment. - row - The row from the input. - assignment - An assignment object as returned by GetAssignmentsForHITAll.
To install Net::Amazon::MechanicalTurk, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Amazon::MechanicalTurk
CPAN shell
perl -MCPAN -e shell install Net::Amazon::MechanicalTurk
For more information on module installation, please visit the detailed CPAN module installation guide.