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.6 kB

7 years ago
7 years ago
7 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. - [Tutorials](https://github.com/fastnlp/fastNLP/tree/master/tutorials)
  41. - [Documentation](https://fastnlp.readthedocs.io/en/latest/)
  42. - [Source Code](https://github.com/fastnlp/fastNLP)
  43. ## Installation
  44. Run the following commands to install fastNLP package.
  45. ```shell
  46. pip install fastNLP
  47. ```
  48. ## Models
  49. fastNLP implements different models for variant NLP tasks.
  50. Each model has been trained and tested carefully.
  51. Check out models' performance, usage and source code here.
  52. - [Documentation](reproduction/)
  53. - [Source Code](fastNLP/models/)
  54. ## Project Structure
  55. <table>
  56. <tr>
  57. <td><b> fastNLP </b></td>
  58. <td> an open-source NLP library </td>
  59. </tr>
  60. <tr>
  61. <td><b> fastNLP.api </b></td>
  62. <td> APIs for end-to-end prediction </td>
  63. </tr>
  64. <tr>
  65. <td><b> fastNLP.core </b></td>
  66. <td> data representation & train/test procedure </td>
  67. </tr>
  68. <tr>
  69. <td><b> fastNLP.models </b></td>
  70. <td> a collection of NLP models </td>
  71. </tr>
  72. <tr>
  73. <td><b> fastNLP.modules </b></td>
  74. <td> a collection of PyTorch sub-models/components/wheels </td>
  75. </tr>
  76. <tr>
  77. <td><b> fastNLP.io </b></td>
  78. <td> readers & savers </td>
  79. </tr>
  80. </table>
  81. *In memory of @FengZiYjun. May his soul rest in peace. We will miss you very very much!*