DeepIE/config/spo_config_v1.py
2020-03-11 21:40:31 +08:00

68 lines
1.3 KiB
Python

BAIDU_ENTITY = {
'O': 0,
'B': 1,
'I': 2,
}
BAIDU_RELATION = {
"朝代": 0,
"人口数量": 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
}
BAIDU_BIES = {'PAD': 0, 'O': 1}
BIES = ['B', 'I']
count = 2
for key, value in BAIDU_RELATION.items():
for tag in BIES:
BAIDU_BIES.update({tag + '-' + key: count})
count += 1
# print(BAIDU_BIES)
# print(len(BAIDU_BIES))