From fe8ce9afdfdf9b73d55ee64aaf476b2a4b0c70c1 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Sun, 16 Aug 2020 16:51:24 +0800 Subject: [PATCH] polish code --- ppocr/utils/character.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ppocr/utils/character.py b/ppocr/utils/character.py index 5f2963ac..f27e1b85 100755 --- a/ppocr/utils/character.py +++ b/ppocr/utils/character.py @@ -30,6 +30,8 @@ class CharacterOps(object): self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz" dict_character = list(self.character_str) elif self.character_type == "ch": + if self.loss_type == "srn": + raise Exception("SRN can only support in character_type == en") character_dict_path = config['character_dict_path'] add_space = False if 'use_space_char' in config: -- GitLab