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

update README.md

上级 bf483c0f
......@@ -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.
**TODO:** Add an architecture chart for PaddleNLP
** This project is still UNDER ACTIVE DEVELOPMENT. **
## Features
......@@ -37,22 +37,25 @@ pip install paddlenlp
### Quick Dataset Loading
```python
dataset = paddlenlp.datasets.ChnSentiCorp(split="train")
train_ds, test_ds = paddlenlp.datasets.ChnSentiCorp(['train','test'])
```
### Reusable Text Emebdding
```python
wordemb = paddlenlp.embedding.SkipGram("Text8")
wordemb("language")
>>> [1.0, 2.0, 3.0, ...., 5.0, 6.0]
from paddlenlp.embeddings import TokenEmbedding
wordemb = TokenEmbedding("word2vec.baike.300d")
print(wordemb.search("中国"))
>>> [0.260801 0.1047 0.129453 ... 0.096542 0.0092513]
```
### High Quality Chinsese Pre-trained Model
```python
from paddlenlp.transformer import ErnieModel
ernie = ErnieModel.from_pretrained("ernie-1.0-chinese")
from paddlenlp.transformers import ErnieModel
ernie = ErnieModel.from_pretrained("ernie")
sequence_output, pooled_output = ernie.forward(input_ids, segment_ids)
```
......@@ -69,4 +72,4 @@ List our notebook tutorials based on AI Studio.
## 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.
先完成此消息的编辑!
想要评论请 注册