Skip to content

Algorithm Variants

rapid_textrank ships with seven core algorithm variants plus AutoRank, a smart ensemble that fuses the full eligible keyword pool for a document. The core variants all share the same graph-and-PageRank foundation, but they differ in how they construct the graph, weight edges, and post-process results.

Choose the variant that best matches your document type and extraction goal. If you are unsure where to start, use AutoRank or see Choosing a Variant.

Variant Comparison

Variant Best For Description
BaseTextRank General text Standard TextRank implementation
PositionRank Academic papers, news Favors words appearing early in the document
BiasedTextRank Topic-focused extraction Biases results toward specified focus terms
TopicRank Multi-topic documents Clusters similar phrases into topics and ranks the topics
SingleRank Longer documents Uses weighted co-occurrence edges and cross-sentence windowing
TopicalPageRank Topic-model-guided extraction Biases SingleRank towards topically important words via personalized PageRank
MultipartiteRank Multi-topic documents Builds a k-partite graph removing intra-topic edges; boosts first-occurring variants

Learn More

  • How TextRank Works -- the three-step pipeline shared by all variants.
  • Choosing a Variant -- a decision flowchart and scenario table to help you pick the right one.
  • AutoRank -- the recommended keyword default when you do not want to choose a single variant manually.

Interactive Notebook

Compare all variants side-by-side in the Algorithm Variants Notebook.