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.15.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for lm_dataformat-0.0.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a92611ee040d0358a3e001adcf268031e6266c70fc963e91eb0abdeb6b3ee128 |
|
MD5 | 2d8cc5e61974e0095c758bd8b77fdc56 |
|
BLAKE2b-256 | 7f55fc902f261638392c1479d23cd8d90e06c171476de6740051ba18b15723dd |