文本标注
文本标注的完整指南,涵盖分类、多标签标注、评分与自由文本,以及如何用可直接复制的配置在 Potato 中搭建每一类文本任务。
文本标注是指为书面语言打标签:将文档归入类别、标出文章中的主题、就质量给一段文字评分,或写出一处修正。它是自然语言处理中最常见的标注任务,也是 Potato 最初为之打造的功能。 本指南讲解面向整篇文档的文本任务;要标记文本内部的区域,请参见跨度标注。
文本任务一览
分类:每篇文档一个标签
文本标注的主力任务。当类别互斥时,使用 radio:
yaml
annotation_schemes:
- annotation_type: radio
name: sentiment
description: "What is the overall sentiment of this review?"
labels: [Positive, Negative, Neutral]
sequential_key_binding: truesequential_key_binding 会把标签映射到 1、2、3 键,让标注者的手不离键盘。在成千上万个条目的任务中,这能带来很大的提速。可参考实时演示的情感分析设计,看一个可用的示例。
多标签:一次多个标签
当可以同时适用多个标签时,使用 multiselect。把可选数量限定在符合你的指南的范围内:
yaml
annotation_schemes:
- annotation_type: multiselect
name: content_warnings
description: "Select every content warning that applies."
labels: [Violence, Profanity, Sexual content, Self-harm, None]
min_selections: 1
max_selections: 5内容审核是经典的多标签文本任务;毒性检测设计把一个类别与一段高亮的跨度结合在一起。
在量表上为文本评分
要刻画程度而非类别,使用李克特量表:
yaml
annotation_schemes:
- annotation_type: likert
name: helpfulness
description: "How helpful is this answer?"
size: 5
min_label: "Not helpful"
max_label: "Very helpful"关于量表设计的陷阱,例如默许偏差以及应使用多少个刻度,请参见评分量表。
自由文本与修正
有时最有用的标签是标注者写下的一句话——一段说明、一次改写或一份转写。把它与一个类别结合,并只在相关时显示:
yaml
annotation_schemes:
- annotation_type: radio
name: factuality
description: "Is the claim supported by the source?"
labels: [Supported, Contradicted, Not enough info]
- annotation_type: text
name: evidence
description: "Quote the sentence that supports your choice."
label_requirement:
required: false获得一致的文本标签
文本是有歧义的,因此一致性来自周边的流程,而非界面本身: