Skip to content

Commit d030c63

Browse files
authored
Fix some typos. (#5709)
* Fix typos for applications/ Signed-off-by: Yulv-git <[email protected]> * Fix typos for doc/ and pipelines/ Signed-off-by: Yulv-git <[email protected]> * Fix typos for examples/ and ppdiffusers/ Signed-off-by: Yulv-git <[email protected]> * Fix typos for model_zoo/ and paddlenlp/ Signed-off-by: Yulv-git <[email protected]> * Update for copyright_checker. * Fix error with *.md toc. --------- Signed-off-by: Yulv-git <[email protected]>
1 parent 8fb58eb commit d030c63

File tree

106 files changed

+182
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+182
-156
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ PaddleNLP针对信息抽取、语义检索、智能问答、情感分析等高
216216

217217
#### 🎙️ 智能语音指令解析
218218

219-
集成了[PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech)[百度开放平台](https://ai.baidu.com/)的的语音识别和[UIE](./model_zoo/uie)通用信息抽取等技术,打造智能一体化的语音指令解析系统范例,该方案可应用于智能语音填单、智能语音交互、智能语音检索等场景,提高人机交互效率。
219+
集成了[PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech)[百度开放平台](https://ai.baidu.com/)的语音识别和[UIE](./model_zoo/uie)通用信息抽取等技术,打造智能一体化的语音指令解析系统范例,该方案可应用于智能语音填单、智能语音交互、智能语音检索等场景,提高人机交互效率。
220220

221221
<div align="center">
222222
<img src="https://user-images.githubusercontent.com/16698950/168589100-a6c6f346-97bb-47b2-ac26-8d50e71fddc5.png" width="400">

applications/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ PaddleNLP 从预训练模型库出发,提供了经典预训练模型在主流
121121

122122
#### 🎙️ 智能语音指令解析
123123

124-
- 集成了[PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech)[百度开放平台](https://ai.baidu.com/)的的语音识别和[UIE](./model_zoo/uie)通用信息抽取等技术,打造智能一体化的语音指令解析系统范例,该方案可应用于智能语音填单、智能语音交互、智能语音检索等场景,提高人机交互效率。
124+
- 集成了[PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech)[百度开放平台](https://ai.baidu.com/)的语音识别和[UIE](./model_zoo/uie)通用信息抽取等技术,打造智能一体化的语音指令解析系统范例,该方案可应用于智能语音填单、智能语音交互、智能语音检索等场景,提高人机交互效率。
125125

126126
<div align="center">
127127
<img src="https://user-images.githubusercontent.com/16698950/168589100-a6c6f346-97bb-47b2-ac26-8d50e71fddc5.png" width="400">

applications/document_intelligence/doc_vqa/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- 售后客服:需要配置大量客服人员,且客服专业知识培训周期长
1818
- 构建问题库:需要投入大量人力整理常见问题库,并且固定的问题库难以覆盖灵活多变的提问
1919

20-
对于用户来说,汽车说明书问答系统能够支持通过车机助手/APP/小程序为用户提供即问即答的的功能。对于常见问题,用户不再需要查阅说明书,也无需打客服电话,从而缓解了人工客服的压力。
20+
对于用户来说,汽车说明书问答系统能够支持通过车机助手/APP/小程序为用户提供即问即答的功能。对于常见问题,用户不再需要查阅说明书,也无需打客服电话,从而缓解了人工客服的压力。
2121

2222
对于客服来讲,汽车说明书问答系统帮助客服人员快速定位答案,高效查阅文档,提高客服的专业水平,同时也能够缩短客服的培训周期。
2323

applications/document_intelligence/doc_vqa/Rerank/src/reader_ce.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def _convert_example_to_record(self, example, max_seq_length, tokenizer):
150150
# it easier for the model to learn the concept of sequences.
151151
#
152152
# For classification tasks, the first vector (corresponding to [CLS]) is
153-
# used as as the "sentence vector". Note that this only makes sense because
153+
# used as the "sentence vector". Note that this only makes sense because
154154
# the entire model is fine-tuned.
155155
tokens = []
156156
text_type_ids = []

applications/neural_search/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
(2)采用文献的 query,title,keywords 三个字段内容,构造无标签数据集,进行无监督召回训练SimCSE;
118118

119-
(3)使用文献的的query, title, keywords,构造带正标签的数据集,不包含负标签样本,基于 In-batch Negatives 策略进行训练;
119+
(3)使用文献的query, title, keywords,构造带正标签的数据集,不包含负标签样本,基于 In-batch Negatives 策略进行训练;
120120

121121
(4)在排序阶段,使用点击(作为正样本)和展现未点击(作为负样本)数据构造排序阶段的训练集,进行精排训练。
122122

applications/question_answering/unsupervised_qa/run_qa_pairs_generation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def parse_args():
3131
parser.add_argument('--target_file_path', type=str, default=None, help='the target json file path')
3232
parser.add_argument('--batch_size', type=int, default=1, help='the batch size when using taskflow')
3333
parser.add_argument("--do_debug", action='store_true', help="Whether to do debug")
34-
parser.add_argument('--a_prompt', type=str, default='答案', help='the prompt when using taskflow, seperate by ,')
34+
parser.add_argument('--a_prompt', type=str, default='答案', help='the prompt when using taskflow, separate by ,')
3535
parser.add_argument('--a_position_prob', type=float, default=0.01, help='confidence threshold for answer extraction')
3636
parser.add_argument('--a_max_answer_candidates', type=int, default=5, help='the max number of return answer candidate for each input')
3737
parser.add_argument('--q_num_return_sequences', type=int, default=3, help='the number of return sequences for each input sample, it should be less than num_beams')

applications/sentiment_analysis/ASO_analysis/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
### 2.2 架构&功能
3333

34-
本项目提出的的情感分析解决方案如图1所示,整个情感分析的过程大致包含两个阶段,依次是评论观点抽取模型,属性级情感分类模型。对于给定的一段文本,首先基于前者抽取出文本语句中潜在的评论属性以及该属性相应的评论观点,然后将评论属性、观点以及原始文本进行拼接,传给属性级情感分类模型以识别出该评论属性的情感极性。
34+
本项目提出的情感分析解决方案如图1所示,整个情感分析的过程大致包含两个阶段,依次是评论观点抽取模型,属性级情感分类模型。对于给定的一段文本,首先基于前者抽取出文本语句中潜在的评论属性以及该属性相应的评论观点,然后将评论属性、观点以及原始文本进行拼接,传给属性级情感分类模型以识别出该评论属性的情感极性。
3535

3636
这里需要提到的是,由于目前市面上的大多数模型是基于通用语料训练出来的,这些模型可能并不会对情感信息那么敏感。基于这样的考量,本项目使用了百度自研的 SKEP 预训练模型,其在预训练阶段便设计了多种情感信息相关的预训练目标进行训练。作为一种情感专属的模型,其更适合用来做上边提到的评论观点抽取任务,以及属性级情感分类任务。
3737

@@ -152,7 +152,7 @@ sh run_predict.sh
152152
```
153153

154154
**(4)自定义模型训练**
155-
如果你希望自己尝试进行评论观点抽取模型训练,可使用4.1节中提供的 `ext_data` Demo 数据,或自己业务的标注数据重新训练模型,本项目已将评论观点抽取模型的相关训练和测试代码放入 `extraction` 目录下, 请到该目录下执行模型训练即可,更多的实现细节和和使用方式,请参考[这里](extraction/README.md)
155+
如果你希望自己尝试进行评论观点抽取模型训练,可使用4.1节中提供的 `ext_data` Demo 数据,或自己业务的标注数据重新训练模型,本项目已将评论观点抽取模型的相关训练和测试代码放入 `extraction` 目录下, 请到该目录下执行模型训练即可,更多的实现细节和使用方式,请参考[这里](extraction/README.md)
156156

157157
如果你希望自己尝试进行属性级情感分类模型训练,可使用4.1节中提供的 `cls_data` Demo 数据,或自己业务的标注数据重新训练模型,本项目已将属性级情感分类模型的相关训练和测试代码放入 `classification` 目录下,请到该目录下执行模型训练即可,更多的实现细节和使用方式,请参考[这里](classification/README.md)
158158

applications/sentiment_analysis/unified_sentiment_extraction/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# 通用情感信息抽取
22

3+
## **目录**
34
## **目录**
45
- [1. 情感分析应用简介](#1)
56
- [2. 特色介绍](#2)
@@ -31,7 +32,6 @@
3132
- [6.1 基于SimpleServer进行服务化部署](#6.1)
3233
- [6.2 基于Pipeline进行部署](#6.2)
3334

34-
3535
<a name="1"></a>
3636

3737
## **1. 情感分析应用简介**
@@ -110,7 +110,7 @@ python3 -m pip install wordcloud==1.8.2.2
110110
| `uie-base` | 0.86759 | 0.83696 | 0.85200 |
111111
| `uie-senta-base` | 0.93403 | 0.92795 | 0.93098 |
112112

113-
另外,为方便用户体验和使用,本项目提供的情感分析能力已经集成到了 Taskflow,可以通过Taskflow开箱即用的的能力快速体验情感分析的功能
113+
另外,为方便用户体验和使用,本项目提供的情感分析能力已经集成到了 Taskflow,可以通过Taskflow开箱即用的能力快速体验情感分析的功能
114114

115115
<a name="4.1"></a>
116116

applications/sentiment_analysis/unified_sentiment_extraction/visual_analysis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def plot_aspect_with_opinion(
251251
):
252252
"""
253253
generate image with aspect and opinion, that is, combining apsect with opinion to display the more specifical opinions of aspect.
254-
this method can help you at two aspects: 1. mining custom's overall impression of products/services; 2. analyzing the quality of some aspect and improve it futher.
254+
this method can help you at two aspects: 1. mining custom's overall impression of products/services; 2. analyzing the quality of some aspect and improve it further.
255255
256256
Args:
257257
aspect_opinion (dict[dict] or dict): when sentiment set be "all", a expected dict containing aspect, opinion and its frequency, the key is aspect and its value is a dict containing the aspect's opinion and frequency. when sentiment set be "positive" or "netative", a expected dict containing aspect with opinion and frequency, the key is aspect with opinion and its value is frequency.

applications/text_classification/hierarchical/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
- [2.5 模型部署](#模型部署)
1111
- [2.6 模型效果](#模型效果)
1212

13-
1413
<a name="层次分类简介"></a>
1514

1615
## 1. 层次分类简介
@@ -391,7 +390,7 @@ python prune.py \
391390

392391

393392
可支持配置的参数:
394-
* `output_dir`:必须,保存模型输出和和中间checkpoint的输出目录;默认为 `None`
393+
* `output_dir`:必须,保存模型输出和中间checkpoint的输出目录;默认为 `None`
395394
* `device`: 选用什么设备进行裁剪,选择cpu、gpu。如使用gpu训练,可使用参数--gpus指定GPU卡号。
396395
* `per_device_train_batch_size`:训练集裁剪训练过程批处理大小,请结合显存情况进行调整,若出现显存不足,请适当调低这一参数;默认为32。
397396
* `per_device_eval_batch_size`:开发集评测过程批处理大小,请结合显存情况进行调整,若出现显存不足,请适当调低这一参数;默认为32。

applications/text_classification/hierarchical/analysis/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ cat ../data/train_dirty_rest.txt ../data/train_dirty.txt > ../data/train_clean.t
373373

374374
**方案效果**
375375

376-
我们在[2020语言与智能技术竞赛:事件抽取任务](https://aistudio.baidu.com/aistudio/competition/detail/32/0/introduction)抽取部分训练数据(训练集数据规模:2000)进行实验,取200条数据进行脏数据处理,也即200条训练数据为标签错误数据,选择不同`dirty_num`应用脏数据清洗策略进行评测:
376+
我们在[2020语言与智能技术竞赛:事件抽取任务](https://aistudio.baidu.com/aistudio/competition/detail/32/0/introduction)抽取部分训练数据(训练集数据规模:2000)进行实验,取200条数据进行脏数据处理,也即200条训练数据为标签错误数据,选择不同`dirty_num`应用脏数据清洗策略进行评测:
377377

378378
| |Micro F1(%) | Macro F1(%) |
379379
| ---------| ------------ |------------ |

applications/text_classification/hierarchical/deploy/triton_serving/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ I0619 13:43:33.409775 5127 http_server.cc:167] Started Metrics Service at 0.0.0.
164164
## 客户端请求
165165

166166
### 客户端环境准备
167-
客户端请求有两种方式,可以选择在在本地执行脚本请求,或下载官方客户端镜像在容器中执行。
167+
客户端请求有两种方式,可以选择在本地执行脚本请求,或下载官方客户端镜像在容器中执行。
168168

169169
方式一:本地执行脚本,需要先安装依赖:
170170
```

applications/text_classification/hierarchical/few-shot/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def load_local_dataset(data_path, splits, label_list):
2121
"""
2222
Load dataset for hierachical classification from files, where
23-
there is one example per line. Text and label are seperated
23+
there is one example per line. Text and label are separated
2424
by '\t', and multiple labels are delimited by ','.
2525
2626
Args:

applications/text_classification/hierarchical/retrieval_based/utils/feature_extract.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
parser = argparse.ArgumentParser()
2828
parser.add_argument("--model_dir", type=str, required=True, help="The directory to static model.")
2929
parser.add_argument("--corpus_file", type=str, required=True, help="The corpus_file path.")
30-
parser.add_argument("--output_dir", type=str, required=True, help="The ouput path.")
30+
parser.add_argument("--output_dir", type=str, required=True, help="The output path.")
3131
parser.add_argument("--max_seq_length", default=64, type=int, help="The maximum total input sequence length after tokenization. Sequences longer than this will be truncated, sequences shorter will be padded.")
3232
parser.add_argument("--batch_size", default=32, type=int, help="Batch size per GPU/CPU for training.")
3333
parser.add_argument('--device', choices=['cpu', 'gpu', 'xpu'], default="gpu", help="Select which device to train model, defaults to gpu.")

applications/text_classification/multi_class/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ python -m paddle.distributed.launch --gpus 0,1 train.py \
238238
- `label_path`: 标签路径,默认为"./data/label.txt"。
239239
- `bad_case_path`: 错误样本保存路径,默认为"./data/bad_case.txt"。
240240
- `width_mult_list`:裁剪宽度(multi head)保留的比例列表,表示对self_attention中的 `q``k``v` 以及 `ffn` 权重宽度的保留比例,保留比例乘以宽度(multi haed数量)应为整数;默认是None。
241-
训练脚本支持所有`TraingArguments`的参数,更多参数介绍可参考[TrainingArguments 参数介绍](https://paddlenlp.readthedocs.io/zh/latest/trainer.html#trainingarguments)
241+
训练脚本支持所有`TrainingArguments`的参数,更多参数介绍可参考[TrainingArguments 参数介绍](https://paddlenlp.readthedocs.io/zh/latest/trainer.html#trainingarguments)
242242

243243
程序运行时将会自动进行训练,评估。同时训练过程中会自动保存开发集上最佳模型在指定的 `output_dir` 中,保存模型文件结构如下所示:
244244

applications/text_classification/multi_class/analysis/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ cat ../data/train_dirty_rest.txt ../data/train_dirty.txt > ../data/train_clean.t
280280

281281
**方案效果**
282282

283-
我们在KUAKE-QIC数据集部分数据(训练集数据规模:500)进行实验,取100条数据进行脏数据处理,也即100条训练数据为标签错误数据,选择不同`dirty_num`应用脏数据清洗策略进行评测:
283+
我们在KUAKE-QIC数据集部分数据(训练集数据规模:500)进行实验,取100条数据进行脏数据处理,也即100条训练数据为标签错误数据,选择不同`dirty_num`应用脏数据清洗策略进行评测:
284284

285285
| |Accuracy(%) |
286286
| ---------| ------------ |

applications/text_classification/multi_class/deploy/triton_serving/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ I0619 13:43:33.409775 5127 http_server.cc:167] Started Metrics Service at 0.0.0.
153153
## 客户端请求
154154

155155
### 客户端环境准备
156-
客户端请求有两种方式,可以选择在在本地执行脚本请求,或下载官方客户端镜像在容器中执行。
156+
客户端请求有两种方式,可以选择在本地执行脚本请求,或下载官方客户端镜像在容器中执行。
157157

158158
方式一:本地执行脚本,需要先安装依赖:
159159
```shell

applications/text_classification/multi_class/retrieval_based/utils/feature_extract.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
parser = argparse.ArgumentParser()
2828
parser.add_argument("--model_dir", type=str, required=True, help="The directory to static model.")
2929
parser.add_argument("--corpus_file", type=str, required=True, help="The corpus_file path.")
30-
parser.add_argument("--output_dir", type=str, required=True, help="The ouput path.")
30+
parser.add_argument("--output_dir", type=str, required=True, help="The output path.")
3131
parser.add_argument("--max_seq_length", default=64, type=int, help="The maximum total input sequence length after tokenization. Sequences longer than this will be truncated, sequences shorter will be padded.")
3232
parser.add_argument("--batch_size", default=32, type=int, help="Batch size per GPU/CPU for training.")
3333
parser.add_argument('--device', choices=['cpu', 'gpu', 'xpu'], default="gpu", help="Select which device to train model, defaults to gpu.")

applications/text_classification/multi_label/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# 多标签分类指南
22

3-
**目录**
43
**目录**
54
- [1. 多标签分类简介](#多标签分类简介)
65
- [2. 快速开始](#快速开始)
@@ -388,7 +387,7 @@ python prune.py \
388387

389388

390389
可支持配置的参数:
391-
* `output_dir`:必须,保存模型输出和和中间checkpoint的输出目录;默认为 `None`
390+
* `output_dir`:必须,保存模型输出和中间checkpoint的输出目录;默认为 `None`
392391
* `device`: 选用什么设备进行裁剪,选择cpu、gpu。如使用gpu训练,可使用参数--gpus指定GPU卡号。
393392
* `per_device_train_batch_size`:训练集裁剪训练过程批处理大小,请结合显存情况进行调整,若出现显存不足,请适当调低这一参数;默认为32。
394393
* `per_device_eval_batch_size`:开发集评测过程批处理大小,请结合显存情况进行调整,若出现显存不足,请适当调低这一参数;默认为32。

applications/text_classification/multi_label/deploy/triton_serving/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ I0619 13:43:33.409775 5127 http_server.cc:167] Started Metrics Service at 0.0.0.
165165
## 客户端请求
166166

167167
### 客户端环境准备
168-
客户端请求有两种方式,可以选择在在本地执行脚本请求,或下载官方客户端镜像在容器中执行。
168+
客户端请求有两种方式,可以选择在本地执行脚本请求,或下载官方客户端镜像在容器中执行。
169169

170170
方式一:本地执行脚本,需要先安装依赖:
171171
```

applications/text_classification/multi_label/few-shot/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def load_local_dataset(data_path, splits, label_list):
2121
"""
2222
Load dataset for multi-label classification from files, where
23-
there is one example per line. Text and label are seperated
23+
there is one example per line. Text and label are separated
2424
by '\t', and multiple labels are delimited by ','.
2525
2626
Args:

applications/text_classification/multi_label/retrieval_based/utils/feature_extract.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
parser = argparse.ArgumentParser()
2828
parser.add_argument("--model_dir", type=str, required=True, help="The directory to static model.")
2929
parser.add_argument("--corpus_file", type=str, required=True, help="The corpus_file path.")
30-
parser.add_argument("--output_dir", type=str, required=True, help="The ouput path.")
30+
parser.add_argument("--output_dir", type=str, required=True, help="The output path.")
3131
parser.add_argument("--max_seq_length", default=64, type=int, help="The maximum total input sequence length after tokenization. Sequences longer than this will be truncated, sequences shorter will be padded.")
3232
parser.add_argument("--batch_size", default=32, type=int, help="Batch size per GPU/CPU for training.")
3333
parser.add_argument('--device', choices=['cpu', 'gpu', 'xpu'], default="gpu", help="Select which device to train model, defaults to gpu.")

applications/zero_shot_text_classification/README_en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ python label_studio.py \
8282
--options ./data/label.txt
8383
```
8484

85-
For multi-task training, you can convert data with script seperately and move them to the same directory.
85+
For multi-task training, you can convert data with script separately and move them to the same directory.
8686

8787
<a name="23"></a>
8888

docs/advanced_guide/model_compression/ofa_bert.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
------------
1919

2020
1. 首先对预训练模型的参数和head根据其重要性进行重排序,把重要的参数和head排在参数的前侧,保证训练过程中的参数裁剪不会裁剪掉这些重要的参数。\
21-
参数的重要性计算是先使用dev数据计算一遍每个参数的梯度,然后根据梯度和参数的整体大小来计算当前参数的重要性,head的的重要性计算是通过传入一个\
21+
参数的重要性计算是先使用dev数据计算一遍每个参数的梯度,然后根据梯度和参数的整体大小来计算当前参数的重要性,head的重要性计算是通过传入一个\
2222
全1的对head的mask,并计算这个mask的梯度,根据mask的梯度来判断每个 ``Multi-Head Attention`` 层中每个Head的重要性。
2323

2424
2. 使用原本的预训练模型作为蒸馏过程中的教师网络。同时定义一个超网络,这个超网络中最大的子网络的结构和教师网络的结构相同其他小的子网络是对最大网络\

0 commit comments

Comments
 (0)