Commit a493e66458ffa849af33fc45b75c1b234e4c97a0

Authored by Cristina Muntean
1 parent b6cbd4c8

new info prints

Showing 1 changed file with 7 additions and 2 deletions   Show diff stats
merge_wordcount_with_edge_features.py
... ... @@ -67,7 +67,7 @@ def mergeWhitelist(fileList):
67 67 # for space issues we can destroy the object node
68 68 else:
69 69 tokenDict[node.description] = node
70   - return tokenDict
  70 + #return tokenDict
71 71  
72 72  
73 73 def mergeBlackList(city, cityFile):
... ... @@ -80,6 +80,8 @@ def mergeBlackList(city, cityFile):
80 80 :return:
81 81 """
82 82 tokenDict = dict()
  83 + updates = 0
  84 + new_nodes = 0
83 85  
84 86 fileDir = os.path.dirname(os.path.realpath(cityFile))
85 87 filetype = cityFile.split("/")[-1].replace(city, "")
... ... @@ -93,11 +95,14 @@ def mergeBlackList(city, cityFile):
93 95 # update node
94 96 existing_node = tokenDict[node.description]
95 97 updateNode(existing_node, node)
96   - # for space issues we can destroy the object node
  98 + updates += 1
97 99  
98 100 else:
99 101 tokenDict[node.description] = node
  102 + new_nodes += 1
100 103 print "Dict size: ", len(tokenDict)
  104 + print "Updates: ", updates
  105 + print "New nodes: ", new_nodes
101 106 return tokenDict
102 107  
103 108  
... ...