def cross_sentence(event_lemma_dict):
"""
function to create all possible pairs between event mentions in a file
:param event_lemma_dict: dictionary of event lemmas in file
:return: counter dictionary of event pairs in a file
"""
full_event_file = []
pairs_circumstantial_corpus = Counter([])
for k, v in event_lemma_dict.items():
full_event_file.append(k)
event_pairs_full = list(product(full_event_file, repeat=2))
for i in event_pairs_full:
pairs_circumstantial_corpus.update([i])
return pairs_circumstantial_corpus
评论列表
文章目录