def prepare_glove840_embedding(glove_path):
    glove840_id = '1G-vd6W1oF9ByyJ-pzp9dcqKnr_plh4Em'
    if (not os.path.exists(glove_path)):
        os.mkdir(glove_path)
    elif os.path.isfile(glove_path):
        return glove_path
    elif os.path.isdir(glove_path):
        embedding_file = None
        dir_path = os.path.dirname(glove_path)
        if find_file(dir_path, 'glove.42B.300d.txt', exclude_key='.zip'):
            embedding_file = find_file(dir_path, 'glove.42B.300d.txt', exclude_key='.zip')[0]
        elif find_file(dir_path, 'glove.840B.300d.txt', exclude_key='.zip'):
            embedding_file = find_file(dir_path, 'glove.840B.300d.txt', exclude_key='.zip')[0]
        elif find_file(dir_path, 'glove.twitter.27B.txt', exclude_key='.zip'):
            embedding_file = find_file(dir_path, 'glove.twitter.27B.txt', exclude_key='.zip')[0]
        if embedding_file:
            print('Find potential embedding files: {}'.format(embedding_file))
            return embedding_file
        zip_glove_path = os.path.join(glove_path, '__glove__.840B.300d.txt.zip')
        print('No GloVe embedding found at {}, downloading __glove__.840B.300d.txt (2GB transferred / 5.5GB unzipped)...'.format(glove_path))
        gdd.download_file_from_google_drive(file_id=glove840_id, dest_path=zip_glove_path, unzip=True)
        glove_path = find_file(glove_path, 'txt', exclude_key='.zip')
    return glove_path
def prepare_glove840_embedding(glove_path):
    glove840_id = '1G-vd6W1oF9ByyJ-pzp9dcqKnr_plh4Em'
    if (not os.path.exists(glove_path)):
        os.mkdir(glove_path)
    elif os.path.isfile(glove_path):
        return glove_path
    elif os.path.isdir(glove_path):
        embedding_file = None
        dir_path = os.path.dirname(glove_path)
        if find_file(dir_path, 'glove.42B.300d.txt', exclude_key='.zip'):
            embedding_file = find_file(dir_path, 'glove.42B.300d.txt', exclude_key='.zip')[0]
        elif find_file(dir_path, 'glove.840B.300d.txt', exclude_key='.zip'):
            embedding_file = find_file(dir_path, 'glove.840B.300d.txt', exclude_key='.zip')[0]
        elif find_file(dir_path, 'glove.twitter.27B.txt', exclude_key='.zip'):
            embedding_file = find_file(dir_path, 'glove.twitter.27B.txt', exclude_key='.zip')[0]
        if embedding_file:
            print('Find potential embedding files: {}'.format(embedding_file))
            return embedding_file
        zip_glove_path = os.path.join(glove_path, '__glove__.840B.300d.txt.zip')
        print('No GloVe embedding found at {}, downloading __glove__.840B.300d.txt (2GB transferred / 5.5GB unzipped)...'.format(glove_path))
        gdd.download_file_from_google_drive(file_id=glove840_id, dest_path=zip_glove_path, unzip=True)
        glove_path = find_file(glove_path, 'txt', exclude_key='.zip')
    return glove_path