gluon nlp
v0.10.0 Maintenance Release
Gluonnlp是一种工具包,可帮助您解决NLP问题。它提供易于使用的工具,可帮助您加载文本数据,处理文本数据和火车模型。
请参阅https://nlp.gluon.ai/master/index.html的文档。
首先,安装MXNET 2释放,例如MXNET 2 alpha。您可以使用以下命令:
# Install the version with CUDA 10.2
python3 -m pip install -U --pre " mxnet-cu102>=2.0.0a "
# Install the version with CUDA 11
python3 -m pip install -U --pre " mxnet-cu110>=2.0.0a "
# Install the cpu-only version
python3 -m pip install -U --pre " mxnet>=2.0.0a "要安装gluonnlp,请使用
python3 -m pip install -U -e .
# Also, you may install all the extra requirements via
python3 -m pip install -U -e . " [extras] "如果发现没有许可,也可以安装到用户文件夹:
python3 -m pip install -U -e . --user对于Windows用户,我们建议将Windows子系统用于Linux。
为了促进工程师和研究人员,我们提供了下载和处理NLP数据集的命令行 - 工具包。有关更多详细信息,您可以参考GLUONNLP数据集和GLUONNLP数据处理工具。
# CLI for downloading / preparing the dataset
nlp_data help
# CLI for accessing some common data processing scripts
nlp_process help
# Also, you can use `python -m` to access the toolkits
python3 -m gluonnlp.cli.data help
python3 -m gluonnlp.cli.process help
您可能会去测试以查看如何运行Unitests。
您可以使用Docker使用Gluonnlp安装了Jupyterlab开发环境。
# GPU Instance
docker pull gluonai/gluon-nlp:gpu-latest
docker run --gpus all --rm -it -p 8888:8888 -p 8787:8787 -p 8786:8786 --shm-size=2g gluonai/gluon-nlp:gpu-latest
# CPU Instance
docker pull gluonai/gluon-nlp:cpu-latest
docker run --rm -it -p 8888:8888 -p 8787:8787 -p 8786:8786 --shm-size=2g gluonai/gluon-nlp:cpu-latest
有关更多详细信息,您可以参考工具/Docker中的指南。