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.13.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for lm_dataformat-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e46ef3d7c4c494e099459193bd8295135363edc5cff4bca9a4972e8352d3e7 |
|
MD5 | 41491ece39fb7c969a523a05e9cc09b5 |
|
BLAKE2b-256 | 3af5735c20f4098a501ff4f9851f2f9158ac051f2fe2f2be2031e0562554bd51 |