2015-03-30 29 views
1

我有XML形式的问题,我在循环中为每个问题创建它们。然后在给出输入问题文件的每个循环中创建HIT。但是每次创建HIT时,url看起来都是一样的,我以前的HIT会被覆盖。任何帮助表示赞赏。Mechanical Turk Java API:在循环中创建HITS

在以下代码荫参照

字符串URL = service.getWebsiteURL()+ “/ mturk /预览?的groupId =” + hit.getHITTypeId()

其中所形成的URL是用于相同所有HITS。

我如何创建不同的HIT网址?

HITQuestion question = new HITQuestion(questionFile); 
HITProperties props = new HITProperties(propertyFile); 
//Creating the HIT and loading it into Mechanical Turk 
HIT hit = service.createHIT(null, // HITTypeId 
      props.getTitle(), 
      props.getDescription(), 
      props.getKeywords(), // keywords 
      question.getQuestion(), 
      props.getRewardAmount(), props.getAssignmentDuration(), 
      props.getAutoApprovalDelay(), props.getLifetime(), 
      props.getMaxAssignments(), props.getAnnotation(), 
      props.getQualificationRequirements(), 
      null // responseGroup 
     ); 
System.out.println("Created HIT: " + hit.getHITId());\ 

System.out.println("You may see your HIT with HITTypeId '" + hit.getHITTypeId() + "' here: "); 

System.out.println(service.getWebsiteURL() + "/mturk/preview?groupId=" + hit.getHITTypeId()); 

回答

0

当您创建具有相同资格和付款的HIT时,它们出现在同一个groupid下。当你作为工人完成一个HIT时,另一个将变得可用。如果您登录到mturk.com上的请求者视图,您将能够单独看到您的所有HIT

+0

感谢Jonathan,当我以工作人员身份登录时Iam能够使用Skip HIT查看所有不同的HITS,并且一旦我接受它我可以开始研究它。它看起来不同于我,因为我首先使用模板创建了HIT,现在使用了Java API。但我认为即使URL相同,也可以看到所有的HITS。 – SujayP 2015-04-01 22:20:14

相关问题