@staticmethod
def context_gen(sample, use_inline_mentions=True):
ctx = []
if use_inline_mentions and sample["in_text_mention"]:
for sent in ex["in_text_mention"]:
if isinstance(sent, dict):
sent = sent["tokens"]
..................
..................
NameError: name 'ex' is not defined.
@staticmethod def context_gen(sample, use_inline_mentions=True): ctx = [] if use_inline_mentions and sample["in_text_mention"]: for sent in ex["in_text_mention"]: if isinstance(sent, dict): sent = sent["tokens"] .................. .................. NameError: name 'ex' is not defined.