Read-only mirror of https://github.com/epfl-dlab/nelight — EPFL Data Science & AI Lab (dlab). Issues & pull requests at the source.
  • Python 93.2%
  • Shell 6.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-17 03:19:50 +00:00
artifacts Cleanup 2026-08-17 03:18:26 +00:00
cache_building Cleanup 2026-08-17 03:18:26 +00:00
caches Cleanup 2026-08-09 05:36:09 +00:00
data Ship a Drive-free from-scratch reproduction path. 2026-08-07 12:49:27 +00:00
paper Cleanup 2026-08-17 03:18:26 +00:00
runlib Cleanup 2026-08-17 03:18:26 +00:00
score_cache/raw Ship a minimal uv-based reproduction setup. 2026-08-06 10:00:50 +00:00
scores Ship a minimal uv-based reproduction setup. 2026-08-06 10:00:50 +00:00
scripts Cleanup 2026-08-17 03:18:26 +00:00
.gitattributes Ship reproduction stack for public paper-table verification. 2026-08-06 06:39:32 +00:00
.gitignore Ship a Drive-free from-scratch reproduction path. 2026-08-07 12:49:27 +00:00
.python-version Ship a minimal uv-based reproduction setup. 2026-08-06 10:00:50 +00:00
LICENSE Add MIT License to the project 2026-08-08 18:12:55 +02:00
pyproject.toml Ship a Drive-free from-scratch reproduction path. 2026-08-07 12:49:27 +00:00
README.md Merge branch 'main' of github.com:/epfl-dlab/nelight 2026-08-17 03:19:50 +00:00
REPRODUCIBILITY.md Cleanup 2026-08-17 03:18:26 +00:00
uv.lock Recompute Eigenthemes from the Drive research tree. 2026-08-07 11:22:44 +00:00

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, paper/code mismatches, 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