def fnMain1(text): BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) google_token = loader(os.path.join(BASE_DIR, 'config/google.yaml')) if isinstance(text, six.binary_type): text = text.decode('utf-8') entities = extract_required_entities(text, google_token['token']) return entities
def LTT_Main(path): text = "" BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) google_token = loader(os.path.join(BASE_DIR, 'config/google.yaml')) text = detect_text(path, google_token['token']) # language_id = gs.detect(text) tTxt, lng = translate_text("en", text) return tTxt, lng
def fnMain(path): text = "" BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) google_token = loader(os.path.join(BASE_DIR, 'config/google.yaml')) text = detect_text(path, google_token['token']) language_id = gs.detect(text) txt = gs.translate(text, language_id) return txt
def fnMain1(text): BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) google_token = loader(os.path.join(BASE_DIR, 'config/google.yaml')) entities = extract_required_entities(text, google_token['token']) return entities