polish code
This commit is contained in:
parent
ab0acf78b4
commit
9c89310292
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue