From 9c89310292ad77ad6cfad719219e6d07110e0c1b Mon Sep 17 00:00:00 2001 From: tink2123 Date: Sun, 16 Aug 2020 17:19:00 +0800 Subject: [PATCH] polish code --- ppocr/utils/character.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/utils/character.py b/ppocr/utils/character.py index 2db0151e..c7c93fc5 100755 --- a/ppocr/utils/character.py +++ b/ppocr/utils/character.py @@ -26,7 +26,7 @@ class CharacterOps(object): self.character_type = config['character_type'] self.loss_type = config['loss_type'] self.max_text_len = config['max_text_length'] - if self.loss_type == "srn" and self.character_type == "ch": + if self.loss_type == "srn" and self.character_type != "en": raise Exception("SRN can only support in character_type == en") if self.character_type == "en": self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz" -- GitLab