Reknar is a python based web page ranker. It uses a basic version of PageRank. Compatible with Python 2.7.X
To use:
>>> from reknar import Reknar
>>> reknar = Reknar(graph) # graph can be any URL graph of the form
# {URL1 : [outlink1, outlink2,...], URL2 : [outlink3,...],...}
To use with Redips:
>>> from reknar import Reknar
>>> import redips
>>> red = redips.load('redips-pickle-file')
>>> reknar = Reknar(red.get_graph())
The initializer takes an optional pickle file argument ('reknar.pickle' by default)
>>> reknar = Reknar(graph, 'my_pickle_file.pickle')
To compute the ranks based on the given graph:
>>> reknar.compute_ranks()
To access the ranks:
>>> reknar.get_ranks()
To merge the graph of the Reknar object with another graph:
>>> reknar.merge_graph(graph)
To save the state of Reknar:
>>> reknar.save()
To load the Reknar object from its pickle:
>>> from reknar import load
>>> reknar = load('pickle-file.pickle')