Module

analysis.graph_reporting

Graph reporting module for Bengal SSG.

Provides human-readable reports and insights from knowledge graph analysis including statistics, recommendations, SEO insights, and content gap detection.

Classes

GraphReporter
Generates reports and insights from knowledge graph analysis. Provides methods for: - Formatted st…
7

Generates reports and insights from knowledge graph analysis.

Provides methods for:

  • Formatted statistics output
  • Actionable recommendations for site structure
  • SEO-focused insights
  • Content gap detection

Methods 4

format_stats
Format graph statistics as a human-readable string.
0 str
def format_stats(self) -> str

Format graph statistics as a human-readable string.

Returns

str

Formatted statistics string

get_actionable_recommendations
Generate actionable recommendations for improving site structure.
0 list[str]
def get_actionable_recommendations(self) -> list[str]

Generate actionable recommendations for improving site structure.

Returns

list[str]

List of recommendation strings with emoji prefixes

get_seo_insights
Generate SEO-focused insights about site structure.
0 list[str]
def get_seo_insights(self) -> list[str]

Generate SEO-focused insights about site structure.

Returns

list[str]

List of SEO insight strings with emoji prefixes

get_content_gaps
Identify content gaps based on link structure and taxonomies.
0 list[str]
def get_content_gaps(self) -> list[str]

Identify content gaps based on link structure and taxonomies.

Returns

list[str]

List of content gap descriptions

Internal Methods 3
__init__
Initialize the graph reporter.
1 None
def __init__(self, graph: KnowledgeGraph) -> None

Initialize the graph reporter.

Parameters 1
graph KnowledgeGraph

Knowledge graph to report on (must be built)

_ensure_built
Verify the graph has been built before reporting.
0 None
def _ensure_built(self) -> None

Verify the graph has been built before reporting.

_find_homepage
Find the homepage from a list of pages.
1 Page | None
def _find_homepage(self, analysis_pages: list[Page]) -> Page | None

Find the homepage from a list of pages.

Parameters 1
analysis_pages list[Page]
Returns

Page | None