Chinese_segment_augment icon indicating copy to clipboard operation
Chinese_segment_augment copied to clipboard

node.child存储数据结构由list改成dict

Open GDongLin opened this issue 5 years ago • 1 comments

主要修改了model.py文件,把原来child的list改成dict结构,提高计算效率。

GDongLin avatar Aug 01 '19 08:08 GDongLin

请问除了model文件,别的还要改吗? 为什么我只改了model运行后会出现这种报错呢?谢谢 Traceback (most recent call last): File "/Chinese_segment_augment-master/demo_run.py", line 57, in load_data_2_root(data) File "/Chinese_segment_augment-master/demo_run.py", line 38, in load_data_2_root root.add(d) File "Chinese_segment_augment-master\model.py", line 79, in add node.child[char] = new_node TypeError: list indices must be integers or slices, not str

Process finished with exit code 1

zoey3951 avatar May 16 '21 02:05 zoey3951