Commit 9c893102 authored by tink2123's avatar tink2123
Browse files

polish code

parent ab0acf78
...@@ -26,7 +26,7 @@ class CharacterOps(object): ...@@ -26,7 +26,7 @@ class CharacterOps(object):
self.character_type = config['character_type'] self.character_type = config['character_type']
self.loss_type = config['loss_type'] self.loss_type = config['loss_type']
self.max_text_len = config['max_text_length'] 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") raise Exception("SRN can only support in character_type == en")
if self.character_type == "en": if self.character_type == "en":
self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz" self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment