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 ar.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.10.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for lm_dataformat-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db259199adc2f5ede7420c1c7cf24897223f6b63d2aa7852a6dfad05c37e5bb3 |
|
MD5 | b9b36d484e8c1b5fd588d10500f2127e |
|
BLAKE2b-256 | 60af0e7fb309b61a6fec472a9c37265f0840280bad021a338fdf7b4fb22ec803 |