text = {
'entity': {0: 'EntityA', 1: 'EntityB', 2: 'EntityC'},
'entity_long': {0: 'LongEntityA', 1: 'LongEntityB', 2: 'LongEntityC'},
'relation': {33: 'RelatesTo', 66: 'ConnectedWith'},
'relation_long': {33: 'HasRelationWith', 66: 'IsConnectedWith'},
'relation_sentence': {33: 'EntityA relates to EntityB', 66: 'EntityB is connected with EntityC'}
}
# 创建一个包含所有条目的综合字典
all_dict = {
**text['entity'],
**text['entity_long'],
**text['relation'],
**text['relation_long'],
**text['relation_sentence']
}
# 打印综合字典和空字典结构
print("all_dict:")
print(all_dict)
all_dict:
{0: 'LongEntityA', 1: 'LongEntityB', 2: 'LongEntityC', 33: 'EntityA relates to EntityB', 66: 'EntityB is connected with EntityC'} 为什么这个综合字典没有输入全部,比如**text['relation_sentence']
![](https://img-blog.csdnimg.cn/direct/6b4c596956494ee4bcd0cd3e2a030716.png)