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
Conversation
…e-sensitive BYOG entity titles are not dropped from communities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pymatches cluster labels against the original entity titles with an exact, case-sensitive lookup and merges onsource/target. Any mixed-case title (e.g.FooBar) never matched its uppercased label (FOOBAR), producedNaN, 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_lccnow preserves node names verbatim and only does its actual job: filter to the largest connected component and stabilize edge ordering/direction.