From 46685dabe29d4d3421221ede2ca8f9f286ca76d9 Mon Sep 17 00:00:00 2001 From: Zeyu Chen Date: Mon, 7 Dec 2020 08:43:20 +0800 Subject: [PATCH] update README.md --- PaddleNLP/README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/PaddleNLP/README.md b/PaddleNLP/README.md index 08a7119d..80b6ec8b 100644 --- a/PaddleNLP/README.md +++ b/PaddleNLP/README.md @@ -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 -- GitLab