diff --git a/ppocr/utils/character.py b/ppocr/utils/character.py index 5f2963ace5fa70111a4c7610178921199ae389a2..f27e1b85877fd36fe97d54cc529c313f86ff6787 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: