Supplier names were typed into three systems by hand. Find the names that refer to the same company.
Write group_name_variants(names, suffixes). Build each name's match key in this order:
1. decompose accented letters and drop the accents ("Société" → "Societe"), with compatibility forms such as full-width letters ("ACME") turned into their plain equivalents; 2. fold case so that names differing only in case match — including letters whose case-insensitive form is more than one letter ("STRASSE" and "Straße" must match); 3. replace every character that isn't a letter or a digit with a space; 4. split into words; 5. remove whole words from the end while the last word is in suffixes (a list of lower-case legal forms such as "inc", "ltd", "co"), but never remove the only remaining word; 6. join the remaining words with single spaces.
Return the groups of two or more distinct original names that share a key. Each group is a sorted list; the list of groups is sorted by each group's first name.
Python 3.13 in your browser — the standard library plus pandas and numpy; no pip installs.