示例#1
0
def anonymize_msg_list(msg_list):
    """Anonymize a list of text bodies.
    """
    for i in range(len(msg_list)):
        for orig, hmhashed in names.iteritems():
            msg_list[i] = msg_list[i].replace(orig, hmhashed)
    return msg_list
示例#2
0
def get_mentions_msg_list(msg_list):
    mentions = []
    for msg in msg_list:
        for orig, hmhashed in names.iteritems():
            if hmhashed in msg:
                mentions.append(hmhashed)
    return mentions
示例#3
0
def get_mentions_msg_list(msg_list):
    mentions = []
    for msg in msg_list:
        for orig, hmhashed in names.iteritems():
            if hmhashed in msg:
                mentions.append(hmhashed)
    return mentions
示例#4
0
def anonymize_msg_list(msg_list):
    """Anonymize a list of text bodies.
    """
    for i in range(len(msg_list)):
        for orig, hmhashed in names.iteritems():
            msg_list[i] = msg_list[i].replace(orig, hmhashed)
    return msg_list
示例#5
0
def get_mentions(msg):
    mentions = []
    for orig, hmhashed in names.iteritems():
        if hmhashed in msg:
            mentions.append(hmhashed)
    return mentions
示例#6
0
def anonymize(msg):
    """Anonymize a single text body.
    """
    for orig, hmhashed in names.iteritems():
        msg = msg.replace(orig, hmhashed)
    return msg
示例#7
0
def get_mentions(msg):
    mentions = []
    for orig, hmhashed in names.iteritems():
        if hmhashed in msg:
            mentions.append(hmhashed)
    return mentions
示例#8
0
def anonymize(msg):
    """Anonymize a single text body.
    """
    for orig, hmhashed in names.iteritems():
        msg = msg.replace(orig, hmhashed)
    return msg