Skip to content

Fix #2427: preserve node names in stable_lcc so mixed-case entities aren't dropped from communities#2436

Open
khaledalam wants to merge 1 commit into
microsoft:mainfrom
khaledalam:fix/2427-preserve-node-names-stable-lcc
Open

Fix #2427: preserve node names in stable_lcc so mixed-case entities aren't dropped from communities#2436
khaledalam wants to merge 1 commit into
microsoft:mainfrom
khaledalam:fix/2427-preserve-node-names-stable-lcc

Conversation

@khaledalam

@khaledalam khaledalam commented Jul 11, 2026

Copy link
Copy Markdown

Summary

Fixes #2427. With cluster_graph.use_lcc: true (the default), Bring-Your-Own-Graph entities whose titles contain lowercase characters were silently dropped from every community. The pipeline reported success but produced incomplete coverage.

Root cause

stable_lcc (graphs/stable_lcc.py) uppercased / HTML-unescaped / stripped every node name before computing the largest connected component, and those mutated names became the cluster labels. Downstream, create_communities.py matches cluster labels against the original entity titles with an exact, case-sensitive lookup and merges on source/target. Any mixed-case title (e.g. FooBar) never matched its uppercased label (FOOBAR), produced NaN, and was dropped.

This normalization was a legacy carryover from the old NetworkX implementation. The standard extraction pipeline already emits uppercase titles, so it was a no-op there and only ever corrupted case-sensitive (BYOG) input.

Fix

stable_lcc now preserves node names verbatim and only does its actual job: filter to the largest connected component and stabilize edge ordering/direction.

…e-sensitive BYOG entity titles are not dropped from communities.
@khaledalam khaledalam requested a review from a team as a code owner July 11, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: use_lcc silently drops case-sensitive entity titles from every community

1 participant