CrossRE: Cross-Domain Relation Extraction
Cross-domain relation extraction across 6 domains (news, politics, science, music, literature, AI). Annotators identify entities and label 17 relation types between entity pairs, enabling study of domain transfer in relation extraction.
Configuration Fileconfig.yaml
This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.
# CrossRE: Cross-Domain Relation Extraction
# Based on Bassignana & Plank, Findings EMNLP 2022
# Paper: https://aclanthology.org/2022.findings-emnlp.263/
# Dataset: https://github.com/mainlp/CrossRE
#
# CrossRE provides relation extraction annotations across 6 diverse domains:
# news, politics, natural science, music, literature, and AI.
# This enables studying how relation extraction models transfer across domains.
#
# Entity Types (simplified):
# CrossRE reuses CrossNER's fine-grained, per-domain named-entity types.
# This template uses a generic set (Person, Organization, Location, Event,
# Date, Number, Other) as a simplification.
#
# 17 Relation Types (CrossRE):
# - artifact: something produced/created by an entity (written_by, made_by)
# - cause-effect: one entity causes or leads to another
# - compare: comparison between entities
# - general-affiliation: general affiliation
# - named: entity is named after another
# - opposite: opposition or antonymy between entities
# - origin: entity originates from another
# - part-of: one entity is part of another
# - physical: physical or spatial relationship
# - related-to: general relatedness not covered above
# - role: business-related role (member_of, founder, citizen_of)
# - social: non-business personal/social relationship
# - temporal: temporal relationship
# - topic: entity is about a topic
# - type-of: one entity is a type of another
# - usage: one entity makes use of another
# - win-defeat: outcome of a competition, award, or war
#
# Note: CrossRE has no "no-relation" label; unrelated pairs are left
# unlinked, and a pair may carry more than one relation label.
#
# Annotation Guidelines:
# 1. Read the sentence and note the domain
# 2. Identify all named entities and classify them
# 3. For each entity pair, determine the relation type
# 4. Optionally add notes about ambiguous cases
annotation_task_name: "CrossRE: Cross-Domain Relation Extraction"
task_dir: "."
data_files:
- sample-data.json
item_properties:
id_key: "id"
text_key: "text"
output_annotation_dir: "annotation_output/"
output_annotation_format: "json"
annotation_schemes:
# Step 1: Identify entities
- annotation_type: span
name: entities
description: "Highlight all entities in the text"
labels:
- "Person"
- "Organization"
- "Location"
- "Event"
- "Date"
- "Number"
- "Other"
label_colors:
"Person": "#3b82f6"
"Organization": "#22c55e"
"Location": "#ef4444"
"Event": "#f59e0b"
"Date": "#8b5cf6"
"Number": "#06b6d4"
"Other": "#6b7280"
keyboard_shortcuts:
"Person": "1"
"Organization": "2"
"Location": "3"
"Event": "4"
"Date": "5"
"Number": "6"
"Other": "7"
tooltips:
"Person": "Names of people, including fictional characters"
"Organization": "Companies, institutions, bands, teams, political parties"
"Location": "Countries, cities, geographic regions, addresses"
"Event": "Named events, wars, festivals, elections, discoveries"
"Date": "Dates, years, time periods, centuries"
"Number": "Numerical values, quantities, measurements"
"Other": "Entities not fitting other categories (works of art, products, etc.)"
allow_overlapping: false
# Step 2: Link entities with relation types
- annotation_type: span_link
name: relations
description: "Draw relations between entity pairs"
labels:
- "artifact"
- "cause-effect"
- "compare"
- "general-affiliation"
- "named"
- "opposite"
- "origin"
- "part-of"
- "physical"
- "related-to"
- "role"
- "social"
- "temporal"
- "topic"
- "type-of"
- "usage"
- "win-defeat"
tooltips:
"artifact": "Something produced or created by an entity (written_by, made_by)"
"cause-effect": "One entity causes or leads to another"
"compare": "Comparison between entities"
"general-affiliation": "General affiliation between entities"
"named": "Entity is named after another"
"opposite": "Opposition or antonymy between entities"
"origin": "Entity originates from or is derived from another"
"part-of": "One entity is part or component of another"
"physical": "Physical or spatial relationship (Where?)"
"related-to": "General relatedness not covered by other labels"
"role": "Business-related role (member_of, founder, citizen_of)"
"social": "Non-business personal or social relationship"
"temporal": "Temporal relationship between entities"
"topic": "Entity is about a topic"
"type-of": "One entity is a type of another"
"usage": "One entity makes use of another (agent/instrument)"
"win-defeat": "Outcome of a competition, award, or war"
# Step 3: Optional annotator notes
- annotation_type: text
name: notes
description: "Optional notes about ambiguous cases or difficult decisions"
html_layout: |
<div style="margin-bottom: 10px; padding: 8px; background: #f0f4f8; border-radius: 4px;">
<strong>Domain:</strong> {{domain}}
</div>
<div style="font-size: 16px; line-height: 1.6;">
{{text}}
</div>
allow_all_users: true
instances_per_annotator: 50
annotation_per_instance: 2
allow_skip: true
skip_reason_required: false
Sample Datasample-data.json
[
{
"id": "crossre_001",
"text": "Barack Obama served as the 44th President of the United States from 2009 to 2017, having previously represented Illinois in the U.S. Senate.",
"domain": "politics"
},
{
"id": "crossre_002",
"text": "The Beatles, formed in Liverpool in 1960, became the best-selling music act of all time, with estimated sales of over 600 million units worldwide.",
"domain": "music"
}
]
// ... and 8 more itemsGet This Design
Clone or download from the repository
Quick start:
git clone https://github.com/davidjurgens/potato-showcase.git cd potato-showcase/text/relation-extraction/crossre-cross-domain-relations potato start config.yaml
Dataset & paper
Bassignana & Plank, Findings EMNLP 2022
Citation (BibTeX)
@inproceedings{bassignana-plank-2022-crossre,
title = "{CrossRE}: A Cross-Domain Dataset for Relation Extraction",
author = "Bassignana, Elisa and Plank, Barbara",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2022",
month = dec,
year = "2022",
address = "Abu Dhabi, United Arab Emirates",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.findings-emnlp.263"
}Details
Annotation Types
Domain
Use Cases
Tags
Found an issue or want to improve this design?
Open an IssueRelated Designs
FEVEROUS Structured Fact Verification Annotation
FEVEROUS is a fact-checking dataset of 87,026 Wikipedia claims with evidence drawn from both sentences and table cells. This Potato config reproduces the verdict, evidence, and justification task.
MultiTACRED Multilingual Relation Extraction Dataset
MultiTACRED machine-translates the TACRED relation extraction dataset into 12 languages, keeping 41 TAC relation types plus no_relation. This Potato config reproduces the entity-pair relation task.
REDFM: Filtered and Multilingual Relation Extraction
Multilingual relation extraction across 20+ languages derived from Wikidata. Annotators verify entity spans and label relations from a curated set of 400+ Wikidata relation types, enabling large-scale multilingual relation extraction research.