文本標註
文本標註的完整指南,涵蓋分類、多標籤標註、評分與自由文本,以及如何用可直接複製的配置在 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]內容稽核是經典的多標籤文本任務;毒性檢測設計把一個類別與一段高亮的跨度結合在一起。
在量表上為文本評分
要刻畫程度而非類別,使用李克特量表:
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獲得一致的文本標籤
文本是有歧義的,因此一致性來自周邊的流程,而非介面本身: