A utility for storing and reading files for LM training.
Project description
LM_Dataformat
Utilities for storing data for LM training.
Basic Usage
To write:
ar = Archive('output_dir')
for x in something():
# do other stuff
ar.add_data(somedocument, meta={
'example': stuff,
'someothermetadata': [othermetadata, otherrandomstuff],
'otherotherstuff': True
})
# remember to commit at the end!
ar.commit()
To read:
rdr = Reader('input_dir_or_file')
for doc in rdr.stream_data():
# do something with the document
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lm_dataformat-0.0.17.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for lm_dataformat-0.0.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0456bc087235c9699e4024f77a424f0e17a208fec894c6d3d1850a93b95c19e |
|
MD5 | c5289f8312a5b21f85b1cd0ed0284cf0 |
|
BLAKE2b-256 | f4ee244215f1a5efc171c0dc8b3d338089f6a7ed4d1bffd5348f104cbfec3802 |