Back to Label Studio

Pairwise Classification

docs/source/templates/pairwise_comparison.md

2.2.10-11.2 KB
Original Source

Perform pairwise classification and comparison of different objects with Label Studio using this template.

Interactive Template Preview

<div id="main-preview"></div>

Labeling Configuration

html
<View>
  <Header>Select one of two items</Header>
  <Pairwise name="pw" toName="text1,text2" />
  <Text name="text1" value="$text1" />
  <Text name="text2" value="$text2" />
</View>

About the labeling configuration

All labeling configurations must be wrapped in View tags.

You can add a header to provide instructions to the annotator:

xml
<Header>Select one of two items</Header>

Use the Pairwise control tag to apply pairwise selections to two samples of text:

xml
<Pairwise name="pw" toName="text1,text2" />

Use the Text object tag to specify two samples of text with distinct names:

xml
<Text name="text1" value="$text1" />
<Text name="text2" value="$text2" />