File size: 439 Bytes
d180a03 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#!/bin/bash
SCHEMA_PATH=$1
function gen_data {
local split=$1
pipenv run python -c "print(__import__('datasets').load_dataset('dataunitylab/json-schema-store')['$split'].to_pandas().to_json(orient='records'))" | \
jq -c '.[]' | \
pipenv run python3 extract_keywords.py | \
pipenv run python augment_neg.py -s "$SCHEMA_PATH" | \
gzip -c > "$split.jsonl.gz"
}
gen_data "train"
gen_data "validation"
|