Skip to main content

a simple framework that can quickly build some basic NLP tasks

Project description

nlp-basictasks

nlp-basictasks是利用PyTorch深度学习框架所构建一个简单的库,旨在快速搭建模型完成一些基础的NLP任务,如分类、匹配、序列标注、语义相似度计算等。

整体架构

image

如上图,整体架构分为三个大模块:

  1. readers负责读取数据,不同的任务在readers中有不同的数据处理形式。不同任务的数据后处理代码也放在readers中。
  2. modules代表编码器,用来提取文本特征,主要包括BERT、LSTM、MLP。
  3. tasks根据任务的不同有相应的处理方式。(和readers中相应的数据处理方式对应

安装

pip install --index-url https://pypi.org/project/ nlp-basictasks==0.2.3

or

git clone https://github.com/xianghuisun/nlp-basictasks.git
cd nlp-basictasks & python setup.py install

使用

notebooks中展示了用nlp-basictasks框架快速实现五个NLP常见任务,具体见:

参考

Project details


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.2.4.tar.gz (71.9 kB view details)

Uploaded Source

File details

Details for the file nlp-basictasks-0.2.4.tar.gz.

File metadata

  • Download URL: nlp-basictasks-0.2.4.tar.gz
  • Upload date:
  • Size: 71.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.5

File hashes

Hashes for nlp-basictasks-0.2.4.tar.gz
Algorithm Hash digest
SHA256 9d2de303072d451c3bec953c841e5bb6c13e4d81aed5279fedc7a36bf5faee1c
MD5 4dbe01bfd73643fe8c25235b0f606bfa
BLAKE2b-256 ca8698b70c9ce4456bcba4206b991177f10ab7aab2b74cd8c66fd4339cb2f668

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page