def message_no_add_egde(message_graph, conversation):
     for index in xrange(config.MAX_EXPECTED_DIFF_NICKS):
         if (len(conversation[index]) == 3 and conversation[index][0] >=
                 config.THRESHOLD_MESSAGE_NUMBER_GRAPH):
             if len(
                     conversation[index]
                 [1]) >= config.MINIMUM_NICK_LENGTH and len(
                     conversation[index][2]) >= config.MINIMUM_NICK_LENGTH:
                 message_graph.add_edge(
                     util.get_nick_representative(nicks, nick_same_list,
                                                  conversation[index][1]),
                     util.get_nick_representative(nicks, nick_same_list,
                                                  conversation[index][2]),
                     weight=conversation[index][0])
     return message_graph
Exemple #2
0
 def test_get_nick_representative(self, nicks, nick_same_list,
                                  nick_to_compare, expected_result):
     # look at nickTracker.py in that too nick_same_list has size = maxm expected diff nicks
     self.assertEqual(
         util.get_nick_representative(nicks, nick_same_list,
                                      nick_to_compare), expected_result)