Command

bengal.utils.graph.communities

Discover topical communities in your content.

Uses the Louvain algorithm to find natural clusters of related pages. Communities represent topic areas or content groups based on link structure.

Use community detection to:

  • Discover hidden content structure
  • Organize content into logical groups
  • Identify topic clusters
  • Guide taxonomy creation

Usage

bengal.utils.graph.communities [OPTIONS]

Options

Option Type Description
--config PATH

Path to config file (default: bengal.toml)

--format, -f CHOICE

Output format (default: table)

Default:table
--min-size, -m INTEGER

Minimum community size to show (default: 2)

Default:2
--resolution, -r FLOAT

Resolution parameter (higher = more communities, default: 1.0)

Default:1.0
--seed INTEGER

Random seed for reproducibility

--top-n, -n INTEGER

Number of communities to show (default: 10)

Default:10

Arguments

Argument Type Description
source PATH Default:.

Examples

    # Show top 10 communities
    bengal communities
    # Show only large communities (10+ pages)
    bengal communities --min-size 10
    # Find more granular communities
    bengal communities --resolution 2.0
    # Export as JSON
    bengal communities --format json > communities.json