Update process_underscores.py
Browse files- process_underscores.py +3 -2
process_underscores.py
CHANGED
@@ -437,8 +437,9 @@ def restore_docs(text_dict,dep_files=[],rel_files=[],tok_files=[]):
|
|
437 |
doc, unit1_toks, unit2_toks, unit1_txt, unit2_txt, s1_toks, s2_toks, unit1_sent, unit2_sent, direction, orig_label, label = line.split("\t")
|
438 |
underscore_len += unit1_txt.count("_") + unit2_txt.count("_") + unit1_sent.count("_") + unit2_sent.count("_")
|
439 |
if underscore_len == 0:
|
440 |
-
|
441 |
-
sys.
|
|
|
442 |
unit1_txt = restore_range(unit1_toks, unit1_txt, tid2string[docname])
|
443 |
unit2_txt = restore_range(unit2_toks, unit2_txt, tid2string[docname])
|
444 |
unit1_sent = restore_range(s1_toks, unit1_sent, tid2string[docname])
|
|
|
437 |
doc, unit1_toks, unit2_toks, unit1_txt, unit2_txt, s1_toks, s2_toks, unit1_sent, unit2_sent, direction, orig_label, label = line.split("\t")
|
438 |
underscore_len += unit1_txt.count("_") + unit2_txt.count("_") + unit1_sent.count("_") + unit2_sent.count("_")
|
439 |
if underscore_len == 0:
|
440 |
+
continue
|
441 |
+
#sys.stderr.write("! Non-underscored file detected - " + os.path.basename(file_) + "\n")
|
442 |
+
#sys.exit(0)
|
443 |
unit1_txt = restore_range(unit1_toks, unit1_txt, tid2string[docname])
|
444 |
unit2_txt = restore_range(unit2_toks, unit2_txt, tid2string[docname])
|
445 |
unit1_sent = restore_range(s1_toks, unit1_sent, tid2string[docname])
|