update for multi-language
This commit is contained in:
parent
311569b2bc
commit
bccf9edf61
|
@ -80,7 +80,7 @@ class BaseRecLabelEncode(object):
|
|||
character_type='ch',
|
||||
use_space_char=False):
|
||||
support_character_type = [
|
||||
'ch', 'en', 'en_sensitive', 'french', 'german', 'japan', 'french'
|
||||
'ch', 'en', 'en_sensitive', 'french', 'german', 'japan', 'korean'
|
||||
]
|
||||
assert character_type in support_character_type, "Only {} are supported now but get {}".format(
|
||||
support_character_type, self.character_str)
|
||||
|
@ -89,7 +89,7 @@ class BaseRecLabelEncode(object):
|
|||
if character_type == "en":
|
||||
self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz"
|
||||
dict_character = list(self.character_str)
|
||||
elif character_type in ["ch", "french", "german", "japan", "french"]:
|
||||
elif character_type in ["ch", "french", "german", "japan", "korean"]:
|
||||
self.character_str = ""
|
||||
assert character_dict_path is not None, "character_dict_path should not be None when character_type is ch"
|
||||
with open(character_dict_path, "rb") as fin:
|
||||
|
|
|
@ -24,7 +24,7 @@ class BaseRecLabelDecode(object):
|
|||
character_type='ch',
|
||||
use_space_char=False):
|
||||
support_character_type = [
|
||||
'ch', 'en', 'en_sensitive', 'french', 'german', 'japan', 'french'
|
||||
'ch', 'en', 'en_sensitive', 'french', 'german', 'japan', 'korean'
|
||||
]
|
||||
assert character_type in support_character_type, "Only {} are supported now but get {}".format(
|
||||
support_character_type, self.character_str)
|
||||
|
@ -32,7 +32,7 @@ class BaseRecLabelDecode(object):
|
|||
if character_type == "en":
|
||||
self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz"
|
||||
dict_character = list(self.character_str)
|
||||
elif character_type in ["ch", "french", "german", "japan", "french"]:
|
||||
elif character_type in ["ch", "french", "german", "japan", "korean"]:
|
||||
self.character_str = ""
|
||||
assert character_dict_path is not None, "character_dict_path should not be None when character_type is ch"
|
||||
with open(character_dict_path, "rb") as fin:
|
||||
|
|
Loading…
Reference in New Issue