Skip to content

Add a generic CSV → verified-gold importer #9

Description

@AshwinUgale

The problem / use case

Context: make-gold already turns an authoring spec (query, source_id, answer)
into verified source-span gold (it checks quoted_text matches the offsets). A CSV
front-door would lower the barrier for real corpora.

What: Add import-csv --corpus docs.jsonl --spec spec.csv --out queries.jsonl that
reads a CSV with query,source_id,answer[,answer_all] columns and produces verified gold.

Acceptance:

  • valid CSV → verified queries.jsonl; malformed offsets still fail closed
  • a test in tests/test_authoring.py; CHANGELOG.md updated
  • README "Input data" section mentions the CSV path

Pointers: reuse make-gold / gold.py's verification — don't re-implement span checking.

Proposed idea

Add a CSV importer that takes query, source_id, answer rows and runs them through the existing make-gold authoring path, so people can bring their own data without hand-writing JSONL or computing offsets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions