如何使用 Perl SDK 在 Amazon Mechanical Turk 中使用 SetHITTypeNotification?
有人使用 Perl Amazon Mechanical Turk SDK 中的 createHITType 函数将通知属性添加到其 HIT 中吗?
我已经设法让一切正常运转。我可以从我的沙盒帐户和实时系统中获取余额。我已经使用示例目录中的各种技术成功创建了新的命中,但我需要启用 SetHITTypeNotification,传递告诉 Amazon 在有人接受/提交命中时通过电子邮件通知我的属性。
我已经检查了 AWS 上的文档,粗略的架构是这样的:
<Notification>
<Destination>[email protected]</Destination>
<Transport>Email</Transport>
<Version>2006-10-31</Version>
<EventType>AssignmentAccepted</EventType>
<EventType>AssignmentSubmitted</EventType>
</Notification>
我已经通过各种模块进行了一些 grep 查找通知,并发现了 BulkSupport.pm 模块,该模块似乎引用了包含为传递给 createHITType 函数的属性对象中的哈希值。
我还认为它可能是从属性文件中获取这些内容,但我已经专门学习了 Perl 来将 mturk 与另一个项目一起使用,所以我现在很难弄清楚该怎么做。我也对所有模块进行了perldoc'ed,但是从我能找到的内容来看,完全缺乏关于实现通知的文档。
Has anyone used the createHITType function in the Perl Amazon Mechanical Turk SDK to add Notification properties to their HIT?
I've managed to get it all working. I can grab the balance from both my sandbox account and the live system. I've successfully created new hits using the various techniques in the samples dir, but I need to enable SetHITTypeNotification, passing on properties that tell Amazon to notify me by email when someone accepts/submits a hit.
I've checked through the documentation on AWS and the rough schema would be this:
<Notification>
<Destination>[email protected]</Destination>
<Transport>Email</Transport>
<Version>2006-10-31</Version>
<EventType>AssignmentAccepted</EventType>
<EventType>AssignmentSubmitted</EventType>
</Notification>
I've done some grep'ing through the various modules looking for notification and came across the BulkSupport.pm module that seems to make reference to notifications contained as a hash within a properties object passed to the createHITType function.
I also think that it is taking these from perhaps a properties file, but I've specifically learnt Perl to use mturk along with another project, so I am now stumped to figure out what to do. I perldoc'ed the crap out of all the modules too, but there is a complete lack of documentation on implementing notifications from what I can find.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 perl 中找到了一个不需要 XML 结构的解决方案:
使用模块:Net::Amazon::MechanicalTurk
I found a solution in perl without the need of the XML structure:
using the module: Net::Amazon::MechanicalTurk