Skip to content

Commit

Permalink
再次修复重码统计错误
Browse files Browse the repository at this point in the history
  • Loading branch information
siuze committed Feb 19, 2024
1 parent 3b62555 commit 4239785
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/构建码表.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,11 @@ def 添加已用编码(编码):
查询结果 = 已用编码字典树.get(常用码.lower(), None)
if 查询结果 and 查询结果[0][0] > 1:
break
else:
常用码无重位 = i
if len(已用编码字典树.keys(常用码[0:i].lower())) > 1:
有重码 = True
break
else:
if len(已用编码字典树.keys(常用码[0:i].lower())) > 1:
有重码 = True
break
else:
常用码无重位 = i
常用码无重位 = i
单字词典.loc[单字, "常用码无重位"] = 常用码无重位
print(单字词典.head(5))
print()
Expand Down

0 comments on commit 4239785

Please sign in to comment.