Upload BertForJointParsing.py
Browse files- BertForJointParsing.py +1 -1
BertForJointParsing.py
CHANGED
@@ -431,7 +431,7 @@ def convert_output_to_ud(output_sentences, htb_extras=False):
|
|
431 |
for start,end,token in ranges:
|
432 |
if end - start > 1:
|
433 |
cur_output.append(f'{start + 1}-{end}\t{token}\t_\t_\t_\t_\t_\t_\t_\t_')
|
434 |
-
for idx,output in enumerate(intermediate_output[start:end], start):
|
435 |
# compute the actual dependency location
|
436 |
dep = output['dep'] if output.get('absolute_dep', False) else idx_to_key[output['dep']]
|
437 |
# and add the full ud string in
|
|
|
431 |
for start,end,token in ranges:
|
432 |
if end - start > 1:
|
433 |
cur_output.append(f'{start + 1}-{end}\t{token}\t_\t_\t_\t_\t_\t_\t_\t_')
|
434 |
+
for idx,output in enumerate(intermediate_output[start:end], start + 1):
|
435 |
# compute the actual dependency location
|
436 |
dep = output['dep'] if output.get('absolute_dep', False) else idx_to_key[output['dep']]
|
437 |
# and add the full ud string in
|