def getData(Mentions,S,E,contextMention,contextEntity, id):
for mention in Mentions:
jieba.add_word(mention.name)
S.append(mention.name)
id.append('-') #????????????
contextMention[mention.name] = mention.context
for item in Mentions:
temp = []
cnt = 0
for candidate in item.candidates:
if cnt > 100:
break
cnt += 1
temp.append(candidate.title)
contextEntity[candidate.title] = candidate.context
id.append(candidate.id)
E.append(temp)
# element{???mention/entity}
# ??element
评论列表
文章目录