in summarize_from_feedback/datasets/cnndm.py [0:0]
def clean_up_highlights(line):
if line.startswith("NEW: "):
return line.split("NEW: ")[1].strip()
bad_prefixes = ["READ: ", "for all the latest "]
for prefix in bad_prefixes:
if line.startswith(prefix):
return ""
# these are bad even if they appear mid-highlight
bad_after = [
"CLICK HERE ",
"Click HERE ",
"Click here ",
"For confidential support call the Samaritans in the UK",
]
for bad in bad_after:
if bad in line:
line = line.split(bad)[0].strip()
return line