plotting/plot_coverage/prepare_data.py
def _read_relev_file(clf_file):
    """
    Load all sites from the classification file
    Note that all classification files from different discovery tools have the same format
    """
    sites = set()
    with open(clf_file) as lines:
        for line in lines:
            try:
                values = line.strip().split(",")
                url = ''.join(values[:-1])
                label = int(values[-1])
                url = URLUtility.normalize(url)
                site = URLUtility.get_host(url)
                if label != -1 and label != 1:
                    print "Parsed label is incorrect"
                if label==1:
                    sites.add(site)
            except:
                traceback.print_exc()
    return sites

    Load all sites from the classification file
    Note that all classification files from different discovery tools have the same format
    
Load all sites from the classification file
Note that all classification files from different discovery tools have the same format
Load all sites from the classification file Note that all classification files from different discovery tools have the same format
def _read_relev_file(clf_file):
    sites = set()
    with open(clf_file) as lines:
        for line in lines:
            try:
                values = line.strip().split(",")
                url = ''.join(values[:-1])
                label = int(values[-1])
                url = URLUtility.normalize(url)
                site = URLUtility.get_host(url)
                if label != -1 and label != 1:
                    print "Parsed label is incorrect"
                if label==1:
                    sites.add(site)
            except:
                traceback.print_exc()
    return sites
def _read_relev_file ( clf_file ) : sites = set ( ) with open ( clf_file ) as lines : for line in lines : try : values = line . strip ( ) . split ( "," ) url = '' . join ( values [ : - 1 ] ) label = int ( values [ - 1 ] ) url = URLUtility . normalize ( url ) site = URLUtility . get_host ( url ) if label != - 1 and label != 1 : print "Parsed label is incorrect" if label == 1 : sites . add ( site ) except : traceback . print_exc ( ) return sites
Load all sites from the classification file
Note that all classification files from different discovery tools have the same format
Load all sites from the classification file Note that all classification files from different discovery tools have the same format
"""
    Load all sites from the classification file
    Note that all classification files from different discovery tools have the same format
    """
clf_file