Skip to content
Showcase/Entity Linking
intermediatetext

Entity Linking

Span annotation with knowledge base linking to Wikidata. Annotators highlight entities and link them to their corresponding Wikidata entries via an inline search widget.

Entity Linking annotation interface preview

Configuration Fileconfig.yaml

yaml
# Entity Linking Configuration
# Demonstrates linking span annotations to Wikidata knowledge base

annotation_task_name: Entity Linking Example
task_dir: .
output_annotation_dir: annotation_output
output_annotation_format: json

data_files:
  - data.json

item_properties:
  id_key: id
  text_key: text

user_config:
  allow_all_users: true
  users: []

annotation_schemes:
  - annotation_type: span
    name: ner
    description: Highlight and link named entities to Wikidata
    labels:
      - name: PERSON
        tooltip: "A person's name (e.g., Albert Einstein, Marie Curie)"
      - name: ORGANIZATION
        tooltip: "An organization name (e.g., NASA, United Nations)"
      - name: LOCATION
        tooltip: "A location or place name (e.g., Paris, Mount Everest)"
      - name: EVENT
        tooltip: "A named event (e.g., World War II, Olympics)"
    sequential_key_binding: true
    # Entity linking configuration
    entity_linking:
      enabled: true
      knowledge_bases:
        - name: wikidata
          type: wikidata
          language: en
      auto_search: true
      required: false
      multi_select: false

# UI configuration
ui:
  display_instance_id: true

Sample Datasample-data.json

json
[
  {
    "id": "el_1",
    "text": "Albert Einstein developed the theory of relativity while working at the Swiss Patent Office in Bern.",
    "context": "Physics history"
  },
  {
    "id": "el_2",
    "text": "The United Nations headquarters in New York hosted the General Assembly meeting on climate change.",
    "context": "International affairs"
  }
]

// ... and 1 more items

Get This Design

This design is available in our showcase. Copy the configuration below to get started.

Quick start:

# Create your project folder
mkdir entity-linking
cd entity-linking
# Copy config.yaml from above
potato start config.yaml

Details

Annotation Types

span

Domain

NLPKnowledge Bases

Use Cases

Entity LinkingNamed Entity RecognitionKnowledge Base Population

Tags

entity linkingNERwikidataknowledge basespan annotation