simplewiki / materialize.py
jph00's picture
Update simplewiki to 20260801
1cffe6d verified
Raw
History Blame
239 Bytes
"Reconstruct chunk text from the two dataset configurations."
def materialize(article, chunk):
body = article["md"].encode()
start = chunk["start_byte"]
return chunk["prefix_md"] + body[start:start+chunk["byte_len"]].decode()