From version 3 of NetworkX, PageRank was made a private function, so it is no longer accessible to the AuthorRank library causing the following error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File /Users/wusher_1/repository/ccg/research_index/index.qmd:24
19 ar_graph.fit(
20 documents=corpus
21 )
23 # get the top authors for a set of documents
---> 24 ar_graph.top_authors(normalize_scores=True, n=10)
File /usr/local/Caskroom/miniforge/base/envs/quarto/lib/python3.12/site-packages/author_rank/graph.py:169, in Graph.top_authors(self, n, normalize_scores)
166 return list(), list()
168 else:
--> 169 top_authors, top_scores = top(self.graph, n=n, normalize_scores=normalize_scores)
171 return top_authors, top_scores
File /usr/local/Caskroom/miniforge/base/envs/quarto/lib/python3.12/site-packages/author_rank/score.py:22, in top_authors(graph, n, normalize_scores)
9 """
10 Returns the top n authors according to their author_rank scores from the
11 constructed graph as well as their scores, in the form of a tuple.
(...)
18 for their scores.
19 """
21 # apply the PageRank algorithm to the graph
---> 22 rank = nx.pagerank_scipy(graph)
24 # sort the results
25 sorted_rank = sorted(rank, key=rank.get, reverse=True)
AttributeError: module 'networkx' has no attribute 'pagerank_scipy'
From version 3 of NetworkX, PageRank was made a private function, so it is no longer accessible to the AuthorRank library causing the following error: