lm-dataformat-0.0.9
توضیحات
A utility for storing and reading files for LM training.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | lm-dataformat-0.0.9 |
| نام | lm-dataformat |
| نسخه کتابخانه | 0.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Leo Gao |
| ایمیل نویسنده | leogao31@gmail.com |
| آدرس صفحه اصلی | https://github.com/leogao2/lm_dataformat |
| آدرس اینترنتی | https://pypi.org/project/lm-dataformat/ |
| مجوز | - |
# LM_Dataformat [](https://travis-ci.org/leogao2/lm_dataformat) [](https://coveralls.io/github/leogao2/lm_dataformat?branch=master)
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
```
نیازمندی
| مقدار | نام |
|---|---|
| - | jsonlines |
| - | ujson |
| - | zstandard |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl lm-dataformat-0.0.9:
pip install lm-dataformat-0.0.9.whl
نصب پکیج tar.gz lm-dataformat-0.0.9:
pip install lm-dataformat-0.0.9.tar.gz