简体   繁体   中英

Amazon Mechanical Turk: How to use react/redux to implement HIT?

I have implemented a complex interactive HTML form using React and Redux. I want to show this form to mturk workers and retrieve the results as a json string (basically containing the redux state after completion of the form).

After some googling, I see three options how to do this:

1) Use a ExternalQuestion and host it on my own server. However, I can't find an option how to create an ExternalQuestion using the Mechanical Turk web-interface. I only found tutorials that explain how to create such a question using the mturk API. Is there no other way to do this? I want to avoid writing scripts for publishing, retrieving the results and approving the workers myself.

2) Use a pre-defined question type such as "Survey". In this question type I can embed an iframe pointing to my own server where the react app is hosted. Using additional javascript I could retrieve the results from the iframe, store it in a hidden field in the survey and submit that as my final result.

3) Compile my react app, upload the JS and CSS files to my own server, copy the HTML to mturk and reference the JS/CSS from there.

None of these options feels right to me. How can this be done correctly?

I think an ExternalQuestion would be my best bet, but I want to avoid writing my own API calls as bugs could result in money loss.

Option 3 is the typical pattern for this kind of use case.

You can reference your assets and then in your javascript put your submit value in a hidden input within the .

This blog post shows how to achieve a use case like this using Crowd HTML Elements with Amazon SageMaker Ground Truth . It should be a helpful starting point for how to do this using MTurk directly.

Please feel free to reach out to me at samhenry@amazon.com if you get stuck.

Thank you,

Amazon Mechanical Turk

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM