# Path: lxmls/data.py
# def find(filename):


import os
import numpy as np
from six.moves import urllib
from lxmls import data
'''
Utilities to handle embeddings
'''

def download_embeddings(embbeding_name, target_file):
    '''
    Downloads file through http with progress report

    Obtained in stack overflow:
    http://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http
    -using-python
    '''

    # Embedding download URLs
    if embbeding_name == 'senna_50':
        # senna_50 embeddings
        source_url = 'http://lxmls.it.pt/2015/wp-content/uploads/2015/senna_50'
    else:
        raise ValueError("I do not have embeddings %s for download"
                           % embbeding_name)


# Path: lxmls/data.py
# def find(filename):


# Path: lxmls/deep_learning/embeddings.py
import os
import numpy as np
from six.moves import urllib
from lxmls import data

'''
Utilities to handle embeddings
'''

def download_embeddings(embbeding_name, target_file):
    '''
    Downloads file through http with progress report

    Obtained in stack overflow:
    http://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http
    -using-python
    '''

    # Embedding download URLs
    if embbeding_name == 'senna_50':
        # senna_50 embeddings
        source_url = 'http://lxmls.it.pt/2015/wp-content/uploads/2015/senna_50'
    else:
        raise ValueError("I do not have embeddings %s for download"
                           % embbeding_name)


    target_file_name = os.path.basename(data.find('senna_50'))