if doc_id in tm_var:
denotations = tm_var[doc_id]["denotations"]
text = tm_var[doc_id]["text"]
denotations = [text[d["span"]["begin"]:d["span"]["end"]] for d in denotations]
for part_id, part in doc.parts.items():
for ann in chain(part.annotations, part.predicted_annotations):
if ann.class_id == MUT_CLASS_ID and ann.text not in denotations:
After Change
for key in tm_var:
print(json.dumps(tm_var[key], indent=4))
dataset = Dataset()
for doc_id in tm_var:
doc = Document()
text = tm_var[doc_id]["text"]
part = Part(text)