输出混淆汉字关系,包括同音字、近音字和近形字。
同音字
近音字
| 音节 | 混淆音节 |
|---|---|
| n | ng |
| n | l |
| f | h |
| r | l |
| s | sh |
| c | ch |
| z | zh |
| b | p |
| g | k |
| d | t |
近形字
我们使用了常用的3500词汉字,来源于中文常用3500词。在此基础上已经跑出一份中文混淆词映射表,在data目录下。
如果读者提供自己的词典,可以使用以下脚本。
# 生成每个汉字的字体图片
python3 convert_char_to_font.py $your_dictionary_path$
# 获取每个汉字的混淆字
python3 fetching.py --font_dir $your char font directory$ --common_char_file $your chinese common char file path$ --pretrained $Chinese CLIP pretrained model$
预训练图像模型使用阿里预训练的图文相似对比模型,可用的有以下三种。
| 预训练图文相似对比模型名称 |
|---|
| OFA-Sys/chinese-clip-vit-base-patch16 |
| OFA-Sys/chinese-clip-vit-large-patch14 |
| OFA-Sys/chinese-clip-vit-huge-patch14* |
7 commits
Python
100.0%
输出混淆汉字关系,包括同音字、近音字和近形字。
同音字
近音字
| 音节 | 混淆音节 |
|---|---|
| n | ng |
| n | l |
| f | h |
| r | l |
| s | sh |
| c | ch |
| z | zh |
| b | p |
| g | k |
| d | t |
近形字
我们使用了常用的3500词汉字,来源于中文常用3500词。在此基础上已经跑出一份中文混淆词映射表,在data目录下。
如果读者提供自己的词典,可以使用以下脚本。
# 生成每个汉字的字体图片
python3 convert_char_to_font.py $your_dictionary_path$
# 获取每个汉字的混淆字
python3 fetching.py --font_dir $your char font directory$ --common_char_file $your chinese common char file path$ --pretrained $Chinese CLIP pretrained model$
预训练图像模型使用阿里预训练的图文相似对比模型,可用的有以下三种。
| 预训练图文相似对比模型名称 |
|---|
| OFA-Sys/chinese-clip-vit-base-patch16 |
| OFA-Sys/chinese-clip-vit-large-patch14 |
| OFA-Sys/chinese-clip-vit-huge-patch14* |
7 commits
Python
100.0%