a simple framework that can quickly build some basic NLP tasks
Project description
nlp-basictasks
nlp-basictasks是利用PyTorch深度学习框架所构建一个简单的库,旨在快速搭建模型完成一些基础的NLP任务,如分类、匹配、序列标注、语义相似度计算等。
整体架构
如上图,整体架构分为三个大模块:
- readers负责读取数据,不同的任务在readers中有不同的数据处理形式。不同任务的数据后处理代码也放在readers中。
- modules代表编码器,用来提取文本特征,主要包括BERT、LSTM、MLP。
- tasks根据任务的不同有相应的处理方式。(和readers中相应的数据处理方式对应)
安装
pip install --index-url https://pypi.org/project/ nlp-basictasks==0.1.9
or
git clone https://github.com/xianghuisun/nlp-basictasks.git
cd nlp-basictasks & python setup.py install
使用
notebooks中展示了用nlp-basictasks框架快速实现五个NLP常见任务,具体见:
参考
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
nlp-basictasks-0.1.9.tar.gz
(56.6 kB
view hashes)
Built Distribution
Close
Hashes for nlp_basictasks-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccccf9e165cea09455a67c269c91b2c44bc9b2b1f278c5cc3a4c566f111a9231 |
|
MD5 | 15b5cca46383c8880880dbc31c84a9fa |
|
BLAKE2b-256 | 7ba5ad5b62ed15914c9b52fdc875f98c45835b572849e9b8f551c74cc220abbc |