chreader
中文自然语言处理数据集工具包
优秀特性
- 易用
- 支持自动下载和缓存,一行命令即可获得指定数据集
- 支持命令行的方式展示已有数据集及其详细描述
- 无缝衔接
allennlp、catalyst、pytorch_lightning、FARM等常用 NLP 框架
- 丰富,支持分类、生成、标注等多种类型数据集,共计 2 种
- 灵活
- 可以自由添加自定义数据集,只需继承
ChDatasetReader即可 - 借助
allennlp可使用各种 tokenizer、token_indexer、vocab 等组件,并对其进行高级配置
- 可以自由添加自定义数据集,只需继承
安装
- git
git clone https://github.com/wangyuxinwhy/chreader.git pip install -e .
- pip
pip install -U chreader
使用
构建 Dataset & DataLoader
from chreader import load_dataset, DataLoader
train_dataset = load_dataset("tnews", "train")
dev_dataset = load_dataset("tnews", "dev")
train_dataloader = DataLoader(train_dataset, batch_size=32)
dev_dataloader = DataLoader(dev_dataset, batch_size=32)
for data in train_dataloader:
...
命令行
// 列出所有可用数据集
chreader list
// 展示数据集详细信息
chreader show tnews
TODO
- 添加更多数据集
- 添加 dataset_type 字段,现在只有 classification 一种
- classification
- sentiment
- generation
- summarization
- tagging
- ner
- dependency_parsing
- classification
- 支持外部的配置
- 美化命令行的输出
- 录一个 gif
- 添加 docs
- 添加 tutorial
Metadata
Release files for chreader 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chreader-0.2.1.tar.gz | 10.9 kB | Without provenance | Details for chreader-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chreader-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for chreader-0.2.1-py3-none-any.whl |
Total release size: 23.1 kB
Release files / chreader-0.2.1.tar.gz
| Download URL | chreader-0.2.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f0854cb3f5b83dec0deefee2673ae8490535c3c985cbed099406066c2fe3015
|
|
BLAKE2b-256 checksum How to use checksums |
c91219409e11cf54c1883a1cb903c401d8870aa752c1b49b81b3845fa3adcd1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Release files / chreader-0.2.1-py3-none-any.whl
| Download URL | chreader-0.2.1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29e9dc782d9727f83b07cca75eed86e7794fa25f49036f517d162a43f405e30b
|
|
BLAKE2b-256 checksum How to use checksums |
14924dff1e8b57a729947c8eed2cc179574e8e73d8aa386af080981aac36d486
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Security for chreader 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.