MCPcopy Create free account
hub / github.com/atulkum/co-attention / preprocess_and_write

Function preprocess_and_write

code/preprocessing/squad_preprocess.py:151–254  ·  view source on GitHub ↗

Reads the dataset, extracts context, question, answer, tokenizes them, and calculates answer span in terms of token indices. Note: due to tokenization issues, and the fact that the original answer spans are given in terms of characters, some examples are discarded because we cannot g

(dataset, tier, out_dir)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainFunction · 0.85

Calls 3

tokenizeFunction · 0.85
write_to_fileFunction · 0.85

Tested by

no test coverage detected