Skip to content

Commit

Permalink
Update data_util.py for Issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
xlxwalex committed Mar 7, 2023
1 parent 8cd55a2 commit 9ff6738
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions model/STG-correction/utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def reconstruct_tagger_V2(tag_tokens : np.array, tag_preds : tuple, return_flag
mapper[cidx] = curidx
elif tag_cur[cidx] in [TAGGER_MAP[DELETE_TAG], TAGGER_MAP[MODIFY_DELETE_TAG]]:
flag = True
mapper[cidx] = -1
mapper[cidx] = curidx
continue
elif tag_cur[cidx] == TAGGER_MAP[INSERT_TAG]:
flag = True
Expand Down Expand Up @@ -425,8 +425,6 @@ def convert_spmap_sw(sp_map : list, sw_labels : np.array) -> list:
def convert_spmap_tg(sp_map : list, tg_mapper : list) -> list:
new_spmap = []
for idx in range(len(sp_map)):
if idx == 163:
print()
spmapper = sp_map[idx]
tgmapper = tg_mapper[idx]
mapper = {}
Expand Down

0 comments on commit 9ff6738

Please sign in to comment.