Relation Extraction

If you need to train a natural language processing model to perform relationship extraction tasks, use this template to create a dataset. This template prompts an annotator to label text spans and identify relationships between the spans. For example, identifying people and organizations, and adding relation arrows and labels to identify who founded an organization.

Labeling Configuration

<View>
   <Relations>
    <Relation value="org:founded_by"/>
    <Relation value="org:founded"/>
  </Relations>
  <Labels name="label" toName="text">
    <Label value="Organization" background="orange"/>
    <Label value="Person" background="green"/>
    <Label value="Datetime" background="blue"/>
  </Labels>
  <Text name="text" value="$text"/>
</View>

About the labeling configuration

All labeling configurations must be wrapped in View tags.

Use the Relations control tag to provide labels that can be applied to relations added between text spans:

<Relations>
    <Relation value="org:founded_by"/>
    <Relation value="org:founded"/>
</Relations>

Use the Labels control tag to specify labels to apply to spans of text:

<Labels name="label" toName="text">
    <Label value="Organization" background="orange"/>
    <Label value="Person" background="green"/>
    <Label value="Datetime" background="blue"/>
</Labels>

Use the Text object tag to display the text on the labeling interface:

<Text name="text" value="$text"/>