Harryoung / Test

0 stars 0 forks source link

字典中不存在的字怎么识别 #27

Open Harryoung opened 10 months ago

Harryoung commented 10 months ago

我们提供了issue bot来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide issue bot to solve issues, do you want it? (Please write yes/no):yes

请注意:issue bot基于大语言模型实现,其回答仅供参考。目前issue bot尚不能解析issue中的图片。/Please note: The issue bot is implemented based on large language models, and its answers are for reference only. Currently the issue bot cannot parse images in issues.

请在这里描述你的问题/Please describe your issue here: 请问如果ppocr_keys_v1.txt字典里面不包含的字,比如“纡”,想要识别的话,需要怎么做

llm-issue-bot[bot] commented 10 months ago

#

Issue Response

如果ppocr_keys_v1.txt字典里面不包含的字,比如“纡”,想要识别的话,需要按照以下步骤进行操作:

  1. 创建一个自定义字典文件,例如custom_dict.txt,并将需要识别的字符逐行添加到文件中。在这种情况下,您可以将“纡”添加到custom_dict.txt中。

  2. 在配置文件中修改character_dict_path参数,将其指向您创建的自定义字典文件路径。例如,将character_dict_path设置为ppocr/utils/dict/custom_dict.txt

  3. 确保在配置文件中启用了识别空格的选项。您可以将use_space_char设置为True,以便模型能够识别空格字符。

通过以上步骤,您可以使用自定义字典来识别字典中不存在的字符,如“纡”。

Relevant Sources

https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/applications/光功率计数码管字符识别/光功率计数码管字符识别.md, https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/deploy/lite/readme.md, https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/recognition.md

How to use

My answer may not be accurate. I suggest you refer to relevant sources to make a comprehensive judgment. To invoke me for more questions, add a comment using following command: @llm-issue-bot \<QUESTION>