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.

README.md 2.2 kB

6 years ago
6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # fastNLP
  2. [![Build Status](https://travis-ci.org/fastnlp/fastNLP.svg?branch=master)](https://travis-ci.org/fastnlp/fastNLP)
  3. [![codecov](https://codecov.io/gh/fastnlp/fastNLP/branch/master/graph/badge.svg)](https://codecov.io/gh/fastnlp/fastNLP)
  4. [![PyPI version](https://badge.fury.io/py/fastNLP.svg)](https://badge.fury.io/py/fastNLP)
  5. ![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)
  6. [![Documentation Status](https://readthedocs.org/projects/fastnlp/badge/?version=latest)](http://fastnlp.readthedocs.io/?badge=latest)
  7. FastNLP is a modular Natural Language Processing system based on PyTorch, built for fast development of NLP models.
  8. A deep learning NLP model is the composition of three types of modules:
  9. <table>
  10. <tr>
  11. <td><b> module type </b></td>
  12. <td><b> functionality </b></td>
  13. <td><b> example </b></td>
  14. </tr>
  15. <tr>
  16. <td> encoder </td>
  17. <td> encode the input into some abstract representation </td>
  18. <td> embedding, RNN, CNN, transformer
  19. </tr>
  20. <tr>
  21. <td> aggregator </td>
  22. <td> aggregate and reduce information </td>
  23. <td> self-attention, max-pooling </td>
  24. </tr>
  25. <tr>
  26. <td> decoder </td>
  27. <td> decode the representation into the output </td>
  28. <td> MLP, CRF </td>
  29. </tr>
  30. </table>
  31. For example:
  32. ![](docs/source/figures/text_classification.png)
  33. ## Requirements
  34. - Python>=3.6
  35. - numpy>=1.14.2
  36. - torch>=0.4.0
  37. - tensorboardX
  38. - tqdm>=4.28.1
  39. ## Resources
  40. - [Documentation](https://fastnlp.readthedocs.io/en/latest/)
  41. - [Source Code](https://github.com/fastnlp/fastNLP)
  42. ## Installation
  43. Run the following commands to install fastNLP package.
  44. ```shell
  45. pip install fastNLP
  46. ```
  47. ## Project Structure
  48. <table>
  49. <tr>
  50. <td><b> fastNLP </b></td>
  51. <td> an open-source NLP library </td>
  52. </tr>
  53. <tr>
  54. <td><b> fastNLP.api </b></td>
  55. <td> APIs for end-to-end prediction </td>
  56. </tr>
  57. <tr>
  58. <td><b> fastNLP.core </b></td>
  59. <td> data representation & train/test presedure </td>
  60. </tr>
  61. <tr>
  62. <td><b> fastNLP.models </b></td>
  63. <td> a collection of NLP models </td>
  64. </tr>
  65. <tr>
  66. <td><b> fastNLP.modules </b></td>
  67. <td> a collection of PyTorch sub-models/components/wheels </td>
  68. </tr>
  69. <tr>
  70. <td><b> fastNLP.io </b></td>
  71. <td> readers & savers </td>
  72. </tr>
  73. </table>