Skip to content

Commit

Permalink
Update English docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeyuChen committed Oct 16, 2021
1 parent e51e699 commit a34f689
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 38 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
PaddleNLP是飞桨自然语言处理开发库,具备**易用的文本领域API****多场景的应用示例**、和**高性能分布式训练**三大特点,旨在提升开发者在文本领域的开发效率,并提供丰富的NLP应用示例。

- **易用的文本领域API**
- 提供丰富的工业级预置任务能力[Taskflow](./docs/model_zoo/taskflow.md)和全流程的文本领域API:支持丰富中文数据集加载的[Dataset API](https://paddlenlp.readthedocs.io/zh/latest/data_prepare/dataset_list.html);灵活高效地完成数据预处理的[Data API](https://paddlenlp.readthedocs.io/zh/latest/source/paddlenlp.data.html);提供60+预训练模型的[Transformer API](./docs/model_zoo/transformers.rst)等,可大幅提升NLP任务建模的效率。
- 提供丰富的产业级预置任务能力[Taskflow](./docs/model_zoo/taskflow.md)和全流程的文本领域API:支持丰富中文数据集加载的[Dataset API](https://paddlenlp.readthedocs.io/zh/latest/data_prepare/dataset_list.html);灵活高效地完成数据预处理的[Data API](https://paddlenlp.readthedocs.io/zh/latest/source/paddlenlp.data.html);提供60+预训练模型的[Transformer API](./docs/model_zoo/transformers.rst)等,可大幅提升NLP任务建模的效率。

- **多场景的应用示例**
- 覆盖从学术到工业级的NLP[应用示例](#多场景的应用示例),涵盖NLP基础技术、NLP核心技术、NLP系统应用以及相关拓展应用。全面基于飞桨核心框架2.0全新API体系开发,为开发提供飞桨框架在文本领域的最佳实践
- 覆盖从学术到工业级的NLP[应用示例](#多场景的应用示例),涵盖NLP基础技术、NLP核心技术、NLP系统应用以及相关拓展应用。全面基于飞桨核心框架2.0全新API体系开发,为开发者提供飞桨文本领域的最佳实践

- **高性能分布式训练**
- 基于飞桨核心框架领先的自动混合精度优化策略,结合分布式Fleet API,支持4D混合并行策略,可高效地完成超大规模参数的模型训练。
Expand Down Expand Up @@ -275,7 +275,6 @@ PaddleNLP提供了多粒度、多场景的NLP应用示例,面向动态图模
| [OFA-BERT](./examples/model_compression/ofa/) :star2: | 基于PaddleSlim Once-For-ALL(OFA)策略对BERT在GLUE任务的下游模型进行压缩,在精度无损的情况下可减少33%参数量,达到模型小型化的提速的效果。 |
| [Distill-LSTM](./examples/model_compression/distill_lstm/) | 基于[Distilling Task-Specific Knowledge from BERT into Simple Neural Networks](https://arxiv.org/abs/1903.12136)论文策略的实现,将BERT中英文分类的下游模型知识通过蒸馏的方式迁移至LSTM的小模型结构中,取得比LSTM单独训练更好的效果。 |


#### 小样本学习 (Few-Shot Learning)

| 算法 | 简介 |
Expand All @@ -284,8 +283,6 @@ PaddleNLP提供了多粒度、多场景的NLP应用示例,面向动态图模
| [P-Tuning](./examples/few_shot/p-tuning/) |基于[GPT Understands, Too](https://arxiv.org/pdf/2103.10385.pdf) 论文策略实现, 首次提出连续可学习的模板参数,在全参数空间对模板进行连续优化,大幅提升模型稳定性和模型效果。|
| [EFL](./examples/few_shot/efl/) | 基于[Entailment as Few-Shot Learner](https://arxiv.org/abs/2104.14690) 论文策略实现,将下游目标任务转换为蕴含任务降低模型预测空间,显著提升模型效果。|



## 交互式Notebook教程

- [使用Seq2Vec模块进行句子情感分类](https://aistudio.baidu.com/aistudio/projectdetail/1283423)
Expand All @@ -298,7 +295,6 @@ PaddleNLP提供了多粒度、多场景的NLP应用示例,面向动态图模

更多教程参见[PaddleNLP on AI Studio](https://aistudio.baidu.com/aistudio/personalcenter/thirdview/574995)


## 社区贡献与技术交流

### 特殊兴趣小组
Expand All @@ -313,7 +309,6 @@ PaddleNLP提供了多粒度、多场景的NLP应用示例,面向动态图模
<img src="./docs/imgs/qq.png" width="200" height="200" />
</div>


## 版本更新

更多版本更新说明请查看[ChangeLog](./docs/changelog.md)
Expand Down
65 changes: 47 additions & 18 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ English | [简体中文](./README.md)

## News <img src="./docs/imgs/news_icon.png" width="40"/>

* [2021-06-07] **NLP Live Course** from Baidu has started!🔥🔥🔥 Click [HERE](https://aistudio.baidu.com/aistudio/course/introduce/24177) to join us!
* [2021-06-04] [ERNIE-Gram](https://arxiv.org/abs/2010.12148) pretrained model has been released! Install v2.0.2 to try it.
* [2021-05-20] PaddleNLP 2.0 has been officially relealsed! :tada: For more information please refer to [Release Note](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.0.0).
* [2021-10-12] PaddleNLP 2.1 has been officially relealsed! :tada: For more information please refer to [Release Note](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.1.0).

## Introduction

Expand All @@ -41,17 +39,52 @@ English | [简体中文](./README.md)

More information about PaddlePaddle installation please refer to [PaddlePaddle's Website](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/conda/linux-conda.html).

### PIP Installation
### Python pip Installation

```
pip install --upgrade paddlenlp
```

## Easy-to-use API

### Taskflow:Off-the-shelf Industial NLP Pre-built Task

Taskflow aims to provide **off-the-shelf** NLP pre-built task covering NLU and NLG scenario, in the meanwhile with extreamly fast infernece satisfying industrial applications.

```python
from paddlenlp import Taskflow

# Chinese Word Segmentation
seg = Taskflow("word_segmentation")
seg("第十四届全运会在西安举办")
>>> ['第十四届', '全运会', '', '西安', '举办']

# POS Tagging
tag = Taskflow("pos_tagging")
tag("第十四届全运会在西安举办")
>>> [('第十四届', 'm'), ('全运会', 'nz'), ('', 'p'), ('西安', 'LOC'), ('举办', 'v')]

# Named Entity Recognition
ner = Taskflow("ner")
ner("《孤女》是2010年九州出版社出版的小说,作者是余兼羽")
>>> [('', 'w'), ('孤女', '作品类_实体'), ('', 'w'), ('', '肯定词'), ('2010年', '时间类'), ('九州出版社', '组织机构类'), ('出版', '场景事件'), ('', '助词'), ('小说', '作品类_概念'), ('', 'w'), ('作者', '人物类_概念'), ('', '肯定词'), ('余兼羽', '人物类_实体')]

# Dependency Parsing
ddp = Taskflow("dependency_parsing")
ddp("百度是一家高科技公司")
>>> [{'word': ['百度', '', '一家', '高科技', '公司'], 'head': ['2', '0', '5', '5', '2'], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB']}]

# Sentiment Analysis
senta = Taskflow("sentiment_analysis")
senta("怀着十分激动的心情放映,可是看着看着发现,在放映完毕后,出现一集米老鼠的动画片")
>>> [{'text': '怀着十分激动的心情放映,可是看着看着发现,在放映完毕后,出现一集米老鼠的动画片', 'label': 'negative'}]
```

For more usage please refer to [Taskflow Docs](./docs/model_zoo/taskflow.md)

### Transformer API: Awesome Pre-trained Model Ecosystem

We provide **15** network architectures and **67** pretrained models. Not only includes all the SOTA model like ERNIE, PLATO and SKEP released by Baidu, but also integrates most of the high quality Chinese pretrained model developed by other organizations. We also welcome developer to contribute your Transformer models! 🤗
We provide **22** network architectures and over **90** pretrained models. Not only includes all the SOTA model like ERNIE, PLATO and SKEP released by Baidu, but also integrates most of the high quality Chinese pretrained model developed by other organizations. We welcome all developers to contribute your Transformer models to PaddleNLP! 🤗

```python
from paddlenlp.transformers import *
Expand Down Expand Up @@ -87,8 +120,7 @@ model = ErnieForQuestionAnswering.from_pretrained('ernie-1.0')

For more pretrained model usage, please refer to [Transformer API](./docs/model_zoo/transformers.rst)


### Dataset API: Rich Dataset Integration and Quick Loading
### Dataset API: Abundant Dataset Integration and Quick Loading

```python
from paddlenlp.datasets import load_dataset
Expand Down Expand Up @@ -124,36 +156,33 @@ Please find more API Reference from our [readthedocs](https://paddlenlp.readthed

## Wide-range NLP Task Support

PaddleNLP provide rich application examples covers mainstream NLP task to help developer accelerate problem solving.
PaddleNLP provides rich application examples covering mainstream NLP task to help developers accelerate problem solving.

### NLP Basic Task
### NLP Basic Technique

- [Word Embedding](./examples/word_embedding/)
- [Lexical Analysis](./examples/lexical_analysis/)
- [Language Model](./examples/language_model/)
- [Semantic Parsing (Text to SQL)](./examples/text_to_sql):star:


### NLP Core Technique

- [Text Classification](./examples/text_classification/)
- [Text Matching](./examples/text_matching/)
- [Text Generation](./examples/text_generation/)
- [Text Correction](./examples/text_correction/):star:
- [Semantic Indexing](./examples/semantic_indexing/)
- [Information Extraction](./examples/information_extraction/)

### NLP Industrial Applications
### NLP System

- [Sentiment Analysis](./examples/sentiment_analysis/skep/):star2:
- [Sentiment Analysis](./examples/sentiment_analysis/):star2:
- [General Dialogue System](./examples/dialogue/)
- [Machine Translation](./examples/machine_translation/)
- [Simultaneous Translation](././examples/simultaneous_translation/)
- [Machine Reading Comprehension](./examples/machine_reading_comprehension/)

### Extented Application
### NLP Extented Applications

- [Text Knowledge Linking](./examples/text_to_knowledge/):star2:
- [Machine Reading Comprehension](./examples/machine_reading_comprehension)
- [Few-shot Learning](./examples/few_shot/):star2:
- [Text Knowledge Mining](./examples/text_to_knowledge/):star2:
- [Model Compression](./examples/model_compression/)
- [Text Graph Learning](./examples/text_graph/erniesage/)
- [Time Series Prediction](./examples/time_series/)
Expand Down
29 changes: 16 additions & 13 deletions docs/model_zoo/taskflow.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# PaddleNLP Taskflow

- [介绍](#介绍)
* [任务清单](#任务清单)
- [用法](#用法)
* [中文分词](#中文分词)
* [词性标注](#词性标注)
* [命名实体识别](#命名实体识别)
* [文本纠错](#文本纠错)
* [句法分析](#句法分析)
* [情感分析](#情感分析)
* [生成式问答](#生成式问答)
* [智能写诗](#智能写诗)
- [PaddleNLP Taskflow](#paddlenlp-taskflow)
- [介绍](#介绍)
- [任务清单](#任务清单)
- [用法](#用法)
- [查看使用示例](#查看使用示例)
- [中文分词](#中文分词)
- [词性标注](#词性标注)
- [命名实体识别](#命名实体识别)
- [文本纠错](#文本纠错)
- [句法分析](#句法分析)
- [情感分析](#情感分析)
- [知识挖掘](#知识挖掘)
- [生成式问答](#生成式问答)
- [智能写诗](#智能写诗)

## 介绍

`paddlenlp.Taskflow`是功能强大的自然语言处理库,旨在提供开箱即用的NLP预置任务,覆盖自然语言理解与自然语言生成两大核心应用,在中文场景上提供工业级的效果与极致的预测性能
`paddlenlp.Taskflow`是旨在提供开箱即用的NLP预置任务,覆盖自然语言理解与自然语言生成两大核心应用,在中文场景上提供产业级的效果与极致的预测性能

### 任务清单

Expand All @@ -27,7 +30,7 @@
| 句法分析 | 自动对联(TODO) |
| 情感分析 | |

随着版本迭代后续会持续开放更多的应用场景
随着版本迭代会持续开放更多的应用场景

## 用法

Expand Down

0 comments on commit a34f689

Please sign in to comment.