diff --git a/PaddleNLP/README.md b/PaddleNLP/README.md index 660ac9a7030951082943442d6080c7073871a873..e3ce07f8e097cb947b4913c4851bccd646e63928 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 576597d40833a21e366a4aa2df782d9d7539b7b7..66d6ea65e2efbeb0c5c3435a64aca13ecc61a9a1 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 f12face79a5bde8f14c163cf5c769c7783cb42e9..0eb6c93d4ed829e2525a64ccb51a0e5c25649e9e 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 5e060b177d99116afff54afe6926d5a231108b86..658112cbc927cb5aa2ddddd12a201c3915304ad1 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 9dfcd59c7fbe187b222ab3bb2713a282576eaae0..d41980d6d804219c5b2a5f4c2a89b25afbd64549 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 dfd50b7623b5dc7e58bf0fc2fd2deb9b9fc8697b..b72ab2d13060ec5ad3d629e6cb7641d41d148e5f 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 e94c4e3b961b6090e0eaf944b782b5fe6d53a5a3..98b2546fa63bb05fff519bb81a8bfb4a87b60b09 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