KevinIsInCoding Claude Sonnet 4.6 commited on
Commit
e53bbe5
·
1 Parent(s): 6116e0a

feat: automate ALS seed entities from trials and paper corpus

Browse files

- Fix _add_trials() to create nodes for novel trial compounds with
no paper evidence (type=Unknown, is_trial_derived=True) — directly
fixes SPG302/Tazbentetol not appearing as a KG entity
- Migrate ALS_SEED_ENTITIES from config.py to data/seeds/manual_seeds.json
so domain experts can edit seeds without touching code
- Add scripts/derive_seeds.py: auto-derives seeds from DRUG/BIOLOGICAL
trial interventions and paper entities above SEED_PROMOTION_THRESHOLD
- Add scripts/refresh.py: incremental pipeline orchestrator with state
tracking (--since for papers, --upsert for trials, --dry-run support)
- Add --since / append mode to ingest_papers.py for incremental ingestion
- Add --upsert flag to ingest_trials.py for nct_id-based merge
- Promote guess_entity_type() to normalizer.py as a public function

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

9 files changed +446 -44
Files changed (9)
config.py+15-28
data/seeds/manual_seeds.jsonAdded+26
extraction/extractor.py+2-9
extraction/normalizer.py+10
graph/builder.py+46-3
scripts/derive_seeds.pyAdded+188
scripts/ingest_papers.py+27-4
scripts/ingest_trials.py+15
scripts/refresh.pyAdded+117