Skip to content

Repository files navigation

NELight

Code and data for Strong Heuristics for Named Entity Linking (Čuljak et al., NAACL SRW 2022).

Reproduce paper tables

Needs uv and Git LFS.

git clone https://github.com/epfl-dlab/nelight.git
cd nelight
git lfs install && git lfs pull
bash scripts/reproduce_all.sh

Recomputes heuristics from shipped caches/, merges in-repo Eigen/mGENRE scores, rebuilds Tables 1–11 → artifacts/all_paper_tables.json. No GPU required. This is not a Wikidata-dump rebuild. See REPRODUCIBILITY.md for provenance, PDF typos, and what cannot be rebuilt.

Scorers use the paper method names (LQID, NS, cse, eeiscore, …).

Use on your own data

1. Format — JSON list of articles:

[
  {
    "articleID": "doc-1",
    "content": "… full document text …",
    "names": [
      {
        "name": "paris0",
        "ids": ["Q90", "Q142"],
        "offsets": [[12, 17]]
      }
    ]
  }
]

offsets should be word spans. The scripts assume that document content consists of whitespace-joined tokens. This is an artifact of ensuring compatibility with Quotebank's article metadata format.

2. Build an entity KB from a Wikidata dump. See cache_building/README.md, or:

uv sync --extra from-scratch
DUMP=… DATA_QB=… DATA_AIDA=… OUT=artifacts/my_cache \
  bash cache_building/run_pipeline.sh

3. Score popularity / text-overlap heuristics:

uv run --extra from-scratch python scripts/run_heuristics.py \
  --dataset custom --data /path/to/data.json \
  --entity-kb artifacts/my_cache/entity_kb.pkl --name my_run

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages