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.19.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for lm_dataformat-0.0.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d05bebb6e885bfd4861516f8eca6baa90487e9ffb81b790448d9609866ca2e1f |
|
MD5 | 0becfa50efa6324e180d49dbc020c552 |
|
BLAKE2b-256 | 83b58d10bf5a8082921792bb09c9d591dfd622cf4a16fbb7e283cc921c5ffc50 |