예제 #1
0
class Profile(object):
    """For each email, we extract the order in which the headers appeared;
       this keeps track of all of the header-orders seen in any email from
       a particular sender."""
    def __init__(self):
        self.num_emails = 0
        self.orderings = EDBag()

    def add_order(self, order):
        self.orderings.add(order)
        self.num_emails += 1

    def closest(self, order):
        return self.orderings.closest_by_edit_distance(order)
class Profile(object):
    """For each email, we extract the order in which the headers appeared;
       this keeps track of all of the header-orders seen in any email from
       a particular sender."""
    def __init__(self):
        self.num_emails = 0
        self.orderings = EDBag()

    def add_order(self, order):
        self.orderings.add(order)
        self.num_emails += 1

    def closest(self, order):
        return self.orderings.closest_by_edit_distance(order)
예제 #3
0
 def __init__(self):
     self.num_emails = 0
     self.orderings = EDBag()
 def __init__(self):
     self.num_emails = 0
     self.orderings = EDBag()