From 94631f03200551823be6ca9f97888b3f245335ab Mon Sep 17 00:00:00 2001 From: Steffy-zxf <48793257+Steffy-zxf@users.noreply.github.com> Date: Thu, 17 Dec 2020 21:01:46 +0800 Subject: [PATCH] update docs (#5095) * update codes * update codes * update codes * update docs * update docs --- PaddleNLP/README.md | 9 +++++++++ PaddleNLP/README_en.md | 12 ++++++++++++ PaddleNLP/examples/text_classification/README.md | 10 ++++++++++ .../text_classification/pretrained_models/README.md | 10 ++++++++++ PaddleNLP/examples/text_classification/rnn/README.md | 10 ++++++++++ .../text_matching/sentence_transformers/predict.py | 3 +-- PaddleNLP/paddlenlp/__init__.py | 2 +- 7 files changed, 53 insertions(+), 3 deletions(-) diff --git a/PaddleNLP/README.md b/PaddleNLP/README.md index 660ac9a7..e3ce07f8 100644 --- a/PaddleNLP/README.md +++ b/PaddleNLP/README.md @@ -99,6 +99,15 @@ For more pretrained model selection, please refer to [Pretrained-Models](./docs/ Please refer to our official AI Studio account for more interactive tutorials: [PaddleNLP on AI Studio](https://aistudio.baidu.com/aistudio/personalcenter/thirdview/574995) +* [paddlenlp.seq2vec是什么? 瞧瞧它怎么完成情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1294333) shows how to use lstm to do sentiment analysis. + +* [使用PaddleNLP语义预训练模型ERNIE优化情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1283423) shows how to exploit the pretrained ERNIE to make sentiment analysis better. + +* [基于Bi-GRU+CRF的快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1317771) shows how to make use of bigru and crf to do information extraction. + +* [使用PaddleNLP预训练模型ERNIE优化快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1329361) shows how to exploit the pretrained ERNIE to do information extraction better. + + ## Community * SIG for Pretrained Model Contribution diff --git a/PaddleNLP/README_en.md b/PaddleNLP/README_en.md index 576597d4..66d6ea65 100644 --- a/PaddleNLP/README_en.md +++ b/PaddleNLP/README_en.md @@ -87,10 +87,22 @@ For more pretrained model selection, please refer to [PretrainedModels](./paddle * [Metrics API](./docs/embeddings.md) * [Models API](./docs/models.md) + + + ## Tutorials Please refer to our official AI Studio account for more interactive tutorials: [PaddleNLP on AI Studio](https://aistudio.baidu.com/aistudio/personalcenter/thirdview/574995) +* [paddlenlp.seq2vec是什么? 瞧瞧它怎么完成情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1294333) shows how to use lstm to do sentiment analysis. + +* [使用PaddleNLP语义预训练模型ERNIE优化情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1283423) shows how to exploit the pretrained ERNIE to make sentiment analysis better. + +* [基于Bi-GRU+CRF的快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1317771) shows how to make use of bigru and crf to do information extraction. + +* [使用PaddleNLP预训练模型ERNIE优化快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1329361) shows how to exploit the pretrained ERNIE to do information extraction better. + + ## Community * SIG for Pretrained Model Contribution diff --git a/PaddleNLP/examples/text_classification/README.md b/PaddleNLP/examples/text_classification/README.md index f12face7..0eb6c93d 100644 --- a/PaddleNLP/examples/text_classification/README.md +++ b/PaddleNLP/examples/text_classification/README.md @@ -9,3 +9,13 @@ ## Pretrained Model (PTMs) [Pretrained Models](./pretrained_models) 展示了如何使用以ERNIE为代表的模型Fine-tune完成文本分类任务。 + +## 线上体验教程 + +* [paddlenlp.seq2vec是什么? 瞧瞧它怎么完成情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1294333)展示了使用序列模型LSTM完成情感分析任务。 + +* [使用PaddleNLP语义预训练模型ERNIE优化情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1283423)展示了使用ERNIE优化情感分析任务。 + +* [基于Bi-GRU+CRF的快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1317771) + +* [使用PaddleNLP预训练模型ERNIE优化快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1329361) diff --git a/PaddleNLP/examples/text_classification/pretrained_models/README.md b/PaddleNLP/examples/text_classification/pretrained_models/README.md index 5e060b17..658112cb 100644 --- a/PaddleNLP/examples/text_classification/pretrained_models/README.md +++ b/PaddleNLP/examples/text_classification/pretrained_models/README.md @@ -125,3 +125,13 @@ Data: 这个宾馆比较陈旧了,特价的房间也很一般。总体来说 Data: 怀着十分激动的心情放映,可是看着看着发现,在放映完毕后,出现一集米老鼠的动画片 Label: negative Data: 作为老的四星酒店,房间依然很整洁,相当不错。机场接机服务很好,可以在车上办理入住手续,节省时间。 Label: positive ``` + +## 线上体验教程 + +* [paddlenlp.seq2vec是什么? 瞧瞧它怎么完成情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1294333)展示了使用序列模型LSTM完成情感分析任务。 + +* [使用PaddleNLP语义预训练模型ERNIE优化情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1283423)展示了使用ERNIE优化情感分析任务。 + +* [基于Bi-GRU+CRF的快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1317771) + +* [使用PaddleNLP预训练模型ERNIE优化快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1329361) diff --git a/PaddleNLP/examples/text_classification/rnn/README.md b/PaddleNLP/examples/text_classification/rnn/README.md index 9dfcd59c..d41980d6 100644 --- a/PaddleNLP/examples/text_classification/rnn/README.md +++ b/PaddleNLP/examples/text_classification/rnn/README.md @@ -161,3 +161,13 @@ Data: 这个宾馆比较陈旧了,特价的房间也很一般。总体来说 Data: 怀着十分激动的心情放映,可是看着看着发现,在放映完毕后,出现一集米老鼠的动画片 Lable: negative Data: 作为老的四星酒店,房间依然很整洁,相当不错。机场接机服务很好,可以在车上办理入住手续,节省时间。 Lable: positive ``` + +## 线上体验教程 + +* [paddlenlp.seq2vec是什么? 瞧瞧它怎么完成情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1294333)展示了使用序列模型LSTM完成情感分析任务。 + +* [使用PaddleNLP语义预训练模型ERNIE优化情感分析教程](https://aistudio.baidu.com/aistudio/projectdetail/1283423)展示了使用ERNIE优化情感分析任务。 + +* [基于Bi-GRU+CRF的快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1317771) + +* [使用PaddleNLP预训练模型ERNIE优化快递单信息抽取](https://aistudio.baidu.com/aistudio/projectdetail/1329361) diff --git a/PaddleNLP/examples/text_matching/sentence_transformers/predict.py b/PaddleNLP/examples/text_matching/sentence_transformers/predict.py index dfd50b76..b72ab2d1 100644 --- a/PaddleNLP/examples/text_matching/sentence_transformers/predict.py +++ b/PaddleNLP/examples/text_matching/sentence_transformers/predict.py @@ -91,7 +91,6 @@ def convert_example(example, title_segment_ids(obj: `list[int]`): List of title sequence pair mask. label(obj:`numpy.array`, data type of int64, optional): The input label if not is_test. """ - print(example) query, title = example[0], example[1] query_encoded_inputs = tokenizer.encode( @@ -193,7 +192,7 @@ if __name__ == "__main__": args.model_type = args.model_type.lower() model_class, tokenizer_class = MODEL_CLASSES[args.model_type] - if args.model_name == 'ernie_tiny': + if args.model_name == 'ernie-tiny': # ErnieTinyTokenizer is special for ernie_tiny pretained model. tokenizer = ppnlp.transformers.ErnieTinyTokenizer.from_pretrained( args.model_name) diff --git a/PaddleNLP/paddlenlp/__init__.py b/PaddleNLP/paddlenlp/__init__.py index e94c4e3b..98b2546f 100644 --- a/PaddleNLP/paddlenlp/__init__.py +++ b/PaddleNLP/paddlenlp/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = '2.0.0a8' +__version__ = '2.0.0a9' from . import data from . import datasets -- GitLab