diff --git a/PaddleNLP/README.md b/PaddleNLP/README.md index b8dcc962c45f04644442ee1710da5b037d5a5174..8ed3a06a5ac9a4c85e17b1c1e823775211e8bc63 100644 --- a/PaddleNLP/README.md +++ b/PaddleNLP/README.md @@ -44,6 +44,8 @@ from paddlenlp.datasets import ChnSentiCrop train_ds, test_ds = ChnSentiCorp.get_datasets(['train','test']) ``` +For more Dataset API usage, please refer to [Dataset API](./docs/datasets.md). + ### Chinese Text Emebdding Loading ```python @@ -57,13 +59,19 @@ wordemb.cosine_sim("艺术", "火车") >>> 0.14792643 ``` +For more token embedding usage, please refer to [examples/word_embedding](./example/../examples/word_embedding/README.md). + ### One-Line Classical Model Building ```python -from paddlenlp.models import Ernie +from paddlenlp.models import Ernie, Senta, SimNet + +ernie = Ernie("ernie-1.0", num_classes=2, task="seq-cls") + +senta = Senta(network="bow", vocab_size=1024, num_classes=2) + +simnet = SimNet(network="gru", vocab_size=1024, num_classes=2) -ernie = Ernie(Ernie.Task.SeqCls) -ernie.forward(input_ids, segment_ids) ``` ### Rich Chinsese Pre-trained Models diff --git a/PaddleNLP/examples/README.md b/PaddleNLP/examples/README.md index 1f4338273921010d9fc65a9e509f218917042013..6f3be9805cd5db26d5b5cb14460e95163fe7ed41 100644 --- a/PaddleNLP/examples/README.md +++ b/PaddleNLP/examples/README.md @@ -8,8 +8,7 @@ | 任务类型 | 目录 | 简介 | | ----------------------------------| ------------------------------------------------------------ | ------------------------------------------------------------ | | 中文词法分析 | [LAC(Lexical Analysis of Chinese)](https://github.com/PaddlePaddle/models/tree/develop/PaddleNLP/examples/lexical_analysis) | 百度自主研发中文特色模型词法分析任务,集成了中文分词、词性标注和命名实体识别任务。输入是一个字符串,而输出是句子中的词边界和词性、实体类别。 | -| 预训练词向量 | [WordEmbedding](https://github.com/PaddlePaddle/models/tree/develop/PaddleNLP/examples/word_embedding) | 提供了丰富的中文预训练词向量,通过简单配置即可使用词向量来进行热启训练,能支持较多的中文场景下的训练任务的热启训练,加快训练收敛速度。| - +| 预训练词向量 | [WordEmbedding](https://github.com/PaddlePaddle/models/tree/develop/PaddleNLP/examples/word_embedding) | 提供了丰富的中文预训练词向量,通过简单配置即可使用词向量来进行热启训练,能支持较多的中文场景下的训练任务的热启训练,加快训练收敛速度。| ### 核心技术模型