MCPcopy Create free account
hub / github.com/RingBDStack/GDAP / et_text2tri

Function et_text2tri

convert_et_result.py:44–59  ·  view source on GitHub ↗
(et_list, text)

Source from the content-addressed store, hash-verified

42 return source_list, target_list
43
44def et_text2tri(et_list, text):
45 source_list = []
46 target_list = []
47 # 遍历event
48 for event_type in et_list:
49 source_text = event_type + " </s> " + text
50 target_text = ""
51
52 source_list.append(source_text)
53 target_list.append(target_text)
54
55 # 在所有的target 上统一加上起始位置
56 for i in range(len(target_list)):
57 target_list[i] = f'{type_start} ' + target_list[i] + f' {type_end}'
58
59 return source_list, target_list
60
61
62if __name__ == "__main__":

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected