-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
122 lines (109 loc) · 3.83 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# 分词工具,使用 jieba 或哈工大 ltp
# jieba github: https://github.com/fxsjy/jieba
# ltp github: https://github.com/HIT-SCIR/ltp
# 参数可选项:"jieba","LTP/small","LTP/base","LTP/base1","LTP/base2","LTP/tiny","LTP/legacy"
cut_words_tool_name: "jieba"
# 加载停用词表
# 参数可选项:"hit","baidu","cn","scu"
stop_words: "hit"
# 简称替换方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
abbreviation_func:
use: false
augment_num: 1
# 反义词替换方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
antonym_func:
use: false
augment_num: 1
# 随机删除方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# del_p: 随机删除概率
deletion_func:
use: false
augment_num: 1
del_p: 0.2
# GPT3/ChatGPT 接口调用方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# api_key: OpenAI 的 api_key,需在其官网进行获取
# 获取地址:https://platform.openai.com/account/api-keys
gpt_3_func:
use: true
augment_num: 3
api_key: "xxx"
gpt_35_func:
use: true
augment_num: 3
api_key: "xxx"
# 随机插入方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# change_num: 每条新样本进行随机插入的次数
insertion_func:
use: false
augment_num: 1
change_num: 1
# 实体替换方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# ner_tool_name: 实体词识别模型,参数可选项:"LTP/small","LTP/base","LTP/base1","LTP/base2","LTP/tiny","LTP/legacy"
ner_func:
use: false
augment_num: 1
ner_tool_name: "LTP/small"
# 基于 SimBert 等模型的生成方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# model:使用模型,参数可选项:"simbert_tiny","simbert_small","simbert_base","roformer_sim_small","roformer_sim_base"
# 模型资料
# simbert: https://github.com/ZhuiyiTechnology/pretrained-models
# https://github.com/ZhuiyiTechnology/simbert
# roformer_sim: https://github.com/ZhuiyiTechnology/roformer-sim
# threshold:返回文本的阈值
seq2seq_sim_func:
use: false
augment_num: 1
model: "simbert_tiny"
threshold: 0.5
# 简体转繁体方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
simplified_traditional_func:
use: false
# 随机交换方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# change_num: 每条新样本进行随机交换的次数
swap_func:
use: false
augment_num: 1
change_num: 1
# 同义词替换方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# change_num: 每条新样本进行同义词替换的个数
# size: 每个词返回的同义词个数
# threshold: 同义词阈值过滤
# extra_file:传自己的同义词表
synonyms_func:
use: false
augment_num: 1
change_num: 1
size: 10
threshold: 0.6
extra_file: null
# 回译方法设置
# use: 使用 true/false 开启或关闭该数据增强方法
# augment_num: 每条样本返回的新样本个数
# trans_tool:选择翻译 API,参数可选项:"baidu","google"
# app_id 和 secret_key 参数只是在选择 "baidu" API 时才会用到,使用 "google" 请忽略
# app_id 和 secret_key 申请请前往:http://api.fanyi.baidu.com/manage/developer 可在开发者信息中查看
translate_func:
use: false
augment_num: 1
trans_tool: "google"
app_id: "xxx"
secret_key: "xxx"