You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.rst 3.0 kB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. fastNLP 中文文档
  2. =====================
  3. fastNLP 是一款轻量级的 NLP 处理套件。你既可以使用它快速地完成一个命名实体识别(NER)、中文分词或文本分类任务;
  4. 也可以使用他构建许多复杂的网络模型,进行科研。它具有如下的特性:
  5. - 统一的Tabular式数据容器,让数据预处理过程简洁明了。内置多种数据集的DataSet Loader,省去预处理代码。
  6. - 各种方便的NLP工具,例如预处理embedding加载; 中间数据cache等;
  7. - 详尽的中文文档以供查阅;
  8. - 提供诸多高级模块,例如Variational LSTM, Transformer, CRF等;
  9. - 封装CNNText,Biaffine等模型可供直接使用;
  10. - 便捷且具有扩展性的训练器; 提供多种内置callback函数,方便实验记录、异常捕获等。
  11. 内置组件
  12. ------------
  13. 大部分用于的 NLP 任务神经网络都可以看做由编码(encoder)、聚合(aggregator)、解码(decoder)三种模块组成。
  14. .. image:: figures/text_classification.png
  15. fastNLP 在 :mod:`~fastNLP.modules` 模块中内置了三种模块的诸多组件,可以帮助用户快速搭建自己所需的网络。
  16. 三种模块的功能和常见组件如下:
  17. +-----------------------+-----------------------+-----------------------+
  18. | module type | functionality | example |
  19. +=======================+=======================+=======================+
  20. | encoder | 将输入编码为具有具 | embedding, RNN, CNN, |
  21. | | 有表示能力的向量 | transformer |
  22. +-----------------------+-----------------------+-----------------------+
  23. | aggregator | 从多个向量中聚合信息 | self-attention, |
  24. | | | max-pooling |
  25. +-----------------------+-----------------------+-----------------------+
  26. | decoder | 将具有某种表示意义的 | MLP, CRF |
  27. | | 向量解码为需要的输出 | |
  28. | | 形式 | |
  29. +-----------------------+-----------------------+-----------------------+
  30. 内置模型
  31. ----------------
  32. fastNLP 在 :mod:`~fastNLP.models` 模块中内置了如 :class:`~fastNLP.models.CNNText` 、
  33. :class:`~fastNLP.models.SeqLabeling` 等完整的模型,以供用户直接使用。
  34. .. todo::
  35. 这些模型的介绍如下表所示:(模型名称 + 介绍 + 任务上的结果)
  36. 用户手册
  37. ----------------
  38. .. toctree::
  39. :maxdepth: 1
  40. 安装指南 <user/installation>
  41. 快速入门 <user/quickstart>
  42. 详细指南 <user/tutorial_one>
  43. 科研向导 <user/with_fitlog>
  44. API 文档
  45. -------------
  46. 除了用户手册之外,你还可以通过查阅 API 文档来找到你所需要的工具。
  47. .. toctree::
  48. :titlesonly:
  49. fastNLP
  50. 索引与搜索
  51. ==================
  52. * :ref:`genindex`
  53. * :ref:`modindex`
  54. * :ref:`search`