sphragis / inspection /README.md
Urdatorn's picture
Add exact 50-sentence benchmark task
8280489
|
Raw
History Blame Contribute Delete
1.44 kB

SQLite inspection mirror

sphragis.sqlite mirrors every row and column of all four canonical Parquet configurations. It is intended for convenient local inspection; Parquet remains the canonical benchmark representation.

Each configuration is a table named after the configuration, for example sentence_10. List-valued Parquet columns are stored as compact JSON text. _split_row_index records the original physical row order within each split. _mirror_manifest records row counts, column lists, and content hashes.

The top-level text column is a JSON list: one string for atomic rows and one string per constituent sentence or line for fixed-size chunks. For example, retrieve the ten separate sentences in the first validation row as follows:

sqlite3 -readonly -line inspection/sphragis.sqlite \
  "SELECT key AS sentence_index, value AS sentence
   FROM json_each((
     SELECT text FROM sentence_10
     WHERE split = 'validation'
     ORDER BY _split_row_index LIMIT 1
   ));"

The top-level conllu column is also a JSON list with one CoNLL-U document per corresponding text unit. SQLite's json_each() can inspect these documents in the same way.

List the available tables with:

sqlite3 -readonly inspection/sphragis.sqlite ".tables"

Regenerate and validate the mirror from the Parquet files with:

python scripts/build_sqlite_mirror.py
python scripts/build_sqlite_mirror.py --check