gpt4 book ai didi

xml - 如何在 Amazon Mechanical Turk 命令行工具中将图像添加到资格测试?

转载 作者:数据小太阳 更新时间:2023-10-29 02:23:46 24 4
gpt4 key购买 nike

我正在尝试使用 Amazon Mechanical Turk 命令行工具将外部图像 URL 添加到资格测试。这需要编辑标题为“qualification.question”的 XML 文件以包含图像 URL。

如果我想插入 URL http://upload.wikimedia.org/wikipedia/commons/6/6f/Earth_Eastern_Hemisphere.jpg进入文本“这是什么图片?”下方“qualification.question”中的代码,我该怎么做?

<Question>
<QuestionIdentifier>question1</QuestionIdentifier>
<QuestionContent>
<Text>What is this a picture of?</Text>
</QuestionContent>
<AnswerSpecification>
<SelectionAnswer>
<StyleSuggestion>radiobutton</StyleSuggestion>
<Selections>
<Selection>
<SelectionIdentifier>1a</SelectionIdentifier>
<Text>Earth</Text>
</Selection>
<Selection>
<SelectionIdentifier>1b</SelectionIdentifier>
<Text>Sun</Text>
</Selection>
</Selections>
</SelectionAnswer>
</AnswerSpecification>
</Question>

最佳答案

想出如何去做。下面是有问题显示图像的更新代码。

#set( $image_url = "http://upload.wikimedia.org/wikipedia/commons/6/6f/Earth_Eastern_Hemisphere.jpg" )
<Question>
<QuestionIdentifier>question1</QuestionIdentifier>
<QuestionContent>
<Binary>
<MimeType>
<Type>image</Type>
<SubType>jpg</SubType>
</MimeType>
<DataURL>${image_url}</DataURL>
<AltText>Image</AltText>
</Binary>
<Text>What is this a picture of?</Text>
</QuestionContent>
<AnswerSpecification>
<SelectionAnswer>
<StyleSuggestion>radiobutton</StyleSuggestion>
<Selections>
<Selection>
<SelectionIdentifier>1a</SelectionIdentifier>
<Text>Earth</Text>
</Selection>
<Selection>
<SelectionIdentifier>1b</SelectionIdentifier>
<Text>Sun</Text>
</Selection>
</Selections>
</SelectionAnswer>
</AnswerSpecification>
</Question>

关于xml - 如何在 Amazon Mechanical Turk 命令行工具中将图像添加到资格测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28051800/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com