0
我正嘗試在boto中使用boto在Amazon Mechanical Turk中創建一些自動HIT,並且有興趣爲問題添加一個AnswerFormatRegex限制。如何將這個約束添加到問題中?下面是我編寫問題的一個片段。使用BOTO爲Mechanical Turk項目添加AnswerFormatRegex約束
from boto.mturk.connection import MTurkConnection
from boto.mturk.question import QuestionContent,Question,QuestionForm,
Overview,AnswerSpecification,SelectionAnswer,FormattedContent,FreeTextAnswer
### JUMPING TO RELEVANT CODE ###
qc1 = QuestionContent()
qc1.append_field('Title','Question 1')
fta1 = FreeTextAnswer(num_lines=1)
q1 = Question(identifier="question1",
content=qc1,
answer_spec=AnswerSpecification(fta1))