Skip to content
advancedtext

REDFM: Filtered and Multilingual Relation Extraction

Multilingual relation extraction across 7 human-revised languages (Arabic, Chinese, English, French, German, Italian, Spanish) derived from Wikidata. Annotators verify entity spans and label relations using Wikidata relation types. The larger automatically-annotated SREDFM dataset covers 18 languages and 400 relation types.

Get This Design

View on GitHub(opens in a new tab)

Clone or download from the repository

Quick start:

bash
git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/text/relation-extraction/redfm-multilingual-relations
potato start config.yaml

Configuration File

This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.

yaml
# REDFM: Filtered and Multilingual Relation Extraction
# Based on Huguet Cabot et al., ACL 2023
# Paper: https://aclanthology.org/2023.acl-long.237/
# Dataset: https://huggingface.co/datasets/Babelscape/REDFM
#
# REDFM is a human-revised multilingual relation extraction dataset derived
# from Wikidata, covering 7 languages with curated relation types. The larger
# automatically-annotated SREDFM dataset covers 18 languages and 400 relation
# types. The pipeline uses distant supervision from Wikidata, with filtering
# to reduce noise and improve annotation quality.
#
# REDFM languages (7): Arabic, Chinese, English, French, German, Italian, Spanish.
#
# Entity Types:
# - Person, Organization, Location, Date, Event, Work, Other
#
# Relation Types (subset of common Wikidata properties):
# - country (P17): Located in country
# - instance_of (P31): Is an instance of
# - part_of (P361): Is a part of
# - occupation (P106): Has occupation
# - located_in (P131): Located in administrative entity
# - birth_place (P19): Place of birth
# - death_place (P20): Place of death
# - nationality (P27): Country of citizenship
# - employer (P108): Employed by
# - educated_at (P69): Educated at institution
# - author (P50): Author of work
# - genre (P136): Genre of work
# - capital (P36): Capital city of
# - language (P407): Language of work or name
# - inception (P571): Date of inception
#
# Annotation Guidelines:
# 1. Read the sentence and note the language
# 2. Verify that subject and object entity spans are correct
# 3. Identify and label all entities in the text
# 4. For each entity pair, select the Wikidata relation type
# 5. If no relation applies, skip the pair

annotation_task_name: "REDFM: Multilingual Relation Extraction"
task_dir: "."

data_files:
  - sample-data.json
item_properties:
  id_key: "id"
  text_key: "text"

output_annotation_dir: "annotation_output/"
export_annotation_format: "jsonl"

annotation_schemes:
  # Step 1: Identify and verify entity spans
  - annotation_type: span
    name: entities
    description: "Highlight all entities in the text and verify subject/object spans"
    labels:
      - name: "Person"
        tooltip: "Names of people (any language)"
        key_value: "1"
        color: "#3b82f6"
      - name: "Organization"
        tooltip: "Companies, institutions, governments, groups"
        key_value: "2"
        color: "#22c55e"
      - name: "Location"
        tooltip: "Countries, cities, geographic features, addresses"
        key_value: "3"
        color: "#ef4444"
      - name: "Date"
        tooltip: "Dates, years, time periods"
        key_value: "4"
        color: "#8b5cf6"
      - name: "Event"
        tooltip: "Named events, wars, elections, festivals"
        key_value: "5"
        color: "#f59e0b"
      - name: "Work"
        tooltip: "Books, films, songs, artworks, software"
        key_value: "6"
        color: "#06b6d4"
      - name: "Other"
        tooltip: "Entities not fitting other categories"
        key_value: "7"
        color: "#6b7280"

  # Step 2: Link entities with Wikidata relation types
  - annotation_type: span_link
    name: wikidata_relations
    description: "Draw relations between entity pairs using Wikidata property types"
    link_types:
      - name: "country (P17)"
      - name: "instance_of (P31)"
      - name: "part_of (P361)"
      - name: "occupation (P106)"
      - name: "located_in (P131)"
      - name: "birth_place (P19)"
      - name: "death_place (P20)"
      - name: "nationality (P27)"
      - name: "employer (P108)"
      - name: "educated_at (P69)"
      - name: "author (P50)"
      - name: "genre (P136)"
      - name: "capital (P36)"
      - name: "language (P407)"
      - name: "inception (P571)"
    span_schema: "entities"

user_config:
  allow_all_users: true
max_annotations_per_user: 50
num_annotators_per_item: 2

Sample Data

json
[
  {
    "id": "redfm_001",
    "text": "Albert Einstein was born in Ulm, in the Kingdom of Württemberg in the German Empire, on 14 March 1879.",
    "language": "en",
    "subject_entity": "Albert Einstein",
    "object_entity": "Ulm"
  },
  {
    "id": "redfm_002",
    "text": "Gabriel García Márquez, écrivain colombien, a reçu le prix Nobel de littérature en 1982 pour ses romans et nouvelles.",
    "language": "fr",
    "subject_entity": "Gabriel García Márquez",
    "object_entity": "prix Nobel de littérature"
  }
]

// ... and 8 more items

Dataset & paper

Huguet Cabot et al., ACL 2023

Citation (BibTeX)

bibtex
@inproceedings{huguet-cabot-etal-2023-red,
    title = "{RED}$^{\textrm{FM}}$: a Filtered and Multilingual Relation Extraction Dataset",
    author = "Huguet Cabot, Pere-Llu{\'{i}}s  and Tedeschi, Simone  and Ngonga Ngomo, Axel-Cyrille  and Navigli, Roberto",
    booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.acl-long.237/",
    doi = "10.18653/v1/2023.acl-long.237",
    pages = "4326--4343"
}

Details

Annotation Types

spanspan_link

Domain

NLPMultilingualInformation Extraction

Use Cases

Relation ExtractionMultilingual NLPKnowledge Base Population

Tags

multilingualrelation-extractionwikidataredfmacl2023knowledge-graph

Found an issue or want to improve this design?

Open an Issue(opens in a new tab)