Repository navigation
feat(perturb): add abbrev class for organisation name acronyms - #6
Merged
Divine16 merged 1 commit intoAug 12, 2026
Merged
Conversation
Models the common data-entry pattern where an organisation name is entered as an acronym (Islamic Revolutionary Guard Corps -> IRGC, Al-Qaeda Organization -> AQO). Distinct from the existing `initials` class which targets personal given-name reduction. Two variants per input: - Full acronym: all substantive tokens reduced to initials (IRGC) - Partial acronym: all but last token abbreviated, last kept (IRG Corps) Particles and legal-form suffixes (al, de, corp, ltd, etc.) are excluded from abbreviation. Returns empty list for single-token inputs. Addresses the entity/vessel name gap noted in CONTRIBUTING.md.
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.
What
Adds a new BENIGN perturbation class
abbrevtosrc/ssb/perturb.py.Why
CONTRIBUTING.md explicitly lists entity/organisation name variation as
unmodelled. Abbreviation is the most common and documented instance of
that gap — "Islamic Revolutionary Guard Corps" screened as "IRGC" is a
real compliance failure pattern.
Distinct from the existing
initialsclass (which targets personalgiven-name reduction) in both input domain and output shape.
What changed
src/ssb/perturb.py— new_ABBREV_SKIPset andp_abbrev()functiontests/test_ssb.py— 6 new tests covering full acronym, partial acronym,particle skipping, single-token graceful empty return, no-input-unchanged,
and correct family assignment
Tests
35/35 pass, zero regressions.