PruningTags ignores Series

This commit is contained in:
Dominik Moritz Roth 2021-06-15 14:39:51 +02:00
parent 612d8f2967
commit 051a22b124

View File

@ -165,7 +165,7 @@ def pruneTags(G, minCons=2):
foundCon = 0 foundCon = 0
for book in G.adj[n]: for book in G.adj[n]:
for con in G.adj[book]: for con in G.adj[book]:
if G.nodes[con]['t'] not in ['tag', 'topList']: if G.nodes[con]['t'] not in ['tag', 'topList', 'series']:
foundCon += 1 foundCon += 1
if foundCon > minCons: if foundCon > minCons:
G.remove_node(n) G.remove_node(n)
@ -546,4 +546,4 @@ def readBooksAnalysis():
if __name__ == "__main__": if __name__ == "__main__":
recommendNBooks(35) recommendNBooks(45)