def do(self, ): lang_list = self.langs.split("+") lang_chars = "" for lang in lang_list: lang_module = "deep_ocr.langs.%s" % lang lang_module_data = __import__(lang_module, fromlist=['']) lang_chars += lang_module_data.data trim_string(lang_chars) return lang_chars
# -*- coding: utf-8 -*- from deep_ocr.utils import trim_string data = u''' 0123456789.¥ ''' data = trim_string(data)
# -*- coding: utf-8 -*- from deep_ocr.utils import trim_string data = u''' 0123456789 ''' data = trim_string(data)