polish code

This commit is contained in:
tink2123 2020-08-16 17:19:00 +08:00
parent ab0acf78b4
commit 9c89310292
1 changed files with 1 additions and 1 deletions

View File

@ -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"