提交 46685dab 编写于 作者: Z Zeyu Chen

update README.md

上级 bf483c0f
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
PaddleNLP aims to accelerate NLP applications by powerful model zoo, easy-to-use API and detailed tutorials, It's also the NLP best practice for PaddlePaddle 2.0 API system. PaddleNLP aims to accelerate NLP applications by powerful model zoo, easy-to-use API and detailed tutorials, It's also the NLP best practice for PaddlePaddle 2.0 API system.
**TODO:** Add an architecture chart for PaddleNLP ** This project is still UNDER ACTIVE DEVELOPMENT. **
## Features ## Features
...@@ -37,22 +37,25 @@ pip install paddlenlp ...@@ -37,22 +37,25 @@ pip install paddlenlp
### Quick Dataset Loading ### Quick Dataset Loading
```python ```python
dataset = paddlenlp.datasets.ChnSentiCorp(split="train") train_ds, test_ds = paddlenlp.datasets.ChnSentiCorp(['train','test'])
``` ```
### Reusable Text Emebdding ### Reusable Text Emebdding
```python ```python
wordemb = paddlenlp.embedding.SkipGram("Text8")
wordemb("language") from paddlenlp.embeddings import TokenEmbedding
>>> [1.0, 2.0, 3.0, ...., 5.0, 6.0] wordemb = TokenEmbedding("word2vec.baike.300d")
print(wordemb.search("中国"))
>>> [0.260801 0.1047 0.129453 ... 0.096542 0.0092513]
``` ```
### High Quality Chinsese Pre-trained Model ### High Quality Chinsese Pre-trained Model
```python ```python
from paddlenlp.transformer import ErnieModel from paddlenlp.transformers import ErnieModel
ernie = ErnieModel.from_pretrained("ernie-1.0-chinese") ernie = ErnieModel.from_pretrained("ernie")
sequence_output, pooled_output = ernie.forward(input_ids, segment_ids) sequence_output, pooled_output = ernie.forward(input_ids, segment_ids)
``` ```
...@@ -69,4 +72,4 @@ List our notebook tutorials based on AI Studio. ...@@ -69,4 +72,4 @@ List our notebook tutorials based on AI Studio.
## License ## License
PaddleNLP is provided under the [Apache-2.0 license](./LICENSE). PaddleNLP is provided under the [Apache-2.0 license](./LICENSE).
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册