mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
build stable sort for graph iteration, then we can get stable result and adatpe details for python 3~
This commit is contained in:
parent
1152db7736
commit
a6d1b2479e
@ -20,10 +20,6 @@ class UndirectWeightedGraph:
|
||||
self.graph[start].append((start, end, weight))
|
||||
self.graph[end].append((end, start, weight))
|
||||
|
||||
def refactor(self):
|
||||
for n, _ in self.graph.items():
|
||||
self.graph[n].sort()
|
||||
|
||||
def rank(self):
|
||||
ws = collections.defaultdict(float)
|
||||
outSum = collections.defaultdict(float)
|
||||
|
Loading…
x
Reference in New Issue
Block a user