Skip to content

Commit

Permalink
Update code for Issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
xlxwalex committed Mar 6, 2023
1 parent bb5a1f0 commit 3c6dd37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion model/STG-correction/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from utils.data_utils import data_filter, reconstruct_switch, reconstruct_tagger, joint_report, map_unk2word, reconstruct_tagger_V2, fillin_tokens, report_pipeline_output, extract_generate_tokens, fillin_tokens4gts
from utils.data_utils import output_type_report
from utils.convertor import PointConverter, TaggerConverter
from utils.data_utils import obtain_uuid, convert_spmap_sw, convert_spmap2tokens, convert_spmap_tg

AttnMask = SelfAttentionMask()

Expand All @@ -26,4 +27,4 @@
"tagger2generator", "export_generator", "fillin_tokens", "report_pipeline_output", "extract_generate_tokens", "fillin_tokens4gts",
"data_filter", "reconstruct_switch", "reconstruct_tagger", "joint_report", "map_unk2word", "reconstruct_tagger_V2",
"TaggerMetricV2",
"output_type_report"]
"output_type_report", "obtain_uuid", "convert_spmap_sw", "convert_spmap2tokens", "convert_spmap_tg"]
2 changes: 0 additions & 2 deletions model/STG-correction/utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,6 @@ def convert_spmap_tg(sp_map : list, tg_mapper : list) -> list:
return new_spmap

def convert_spmap2tokens(tokens : list, sp_maps : dict):
if 'led' in tokens:
print()
if not sp_maps: return tokens
for i,x in enumerate(tokens):
if i in sp_maps: tokens[i] = sp_maps[i]
Expand Down

0 comments on commit 3c6dd37

Please sign in to comment.