<commit_before>- reconstruct brands list
  - always include rated brands
  - try not to use climate_counts if we can avoid it
  - strip blank, "Other"
  - assume short name is also brand unless:
    - company name ends with group, enterprises, etc.
    - company name starts with a brand name (e.g. "Kraft Foods")
    - master company data omits it
    - if no brands, use short name!
- merge/capitalize categories

- match up orphaned brands to companies

Corner cases (handle last):
- BIS Global (DBA: CharityEngine) (use DBA name)
- Joey's Pizza Services (Deutschland) GmbH == Joey's Pizza Services
- BBned / Tele2 Group (/-separated variants? subsidiaries?). Not A/S!
- Subsidiaries (data structure)<commit_msg>amazing plan for generalizing merging<commit_after>- generalize matching; basically need something that can take items and a function mapping them to variants, plus
  some hard-coded variants, and then output a sequence of lists of matched items.
  - use this for brands, categories, etc.
- improve brands list
  - always include rated brands
  - try not to use climate_counts if we can avoid it
  - strip blank, "Other"
  - assume short name is also brand unless:
    - company name ends with group, enterprises, etc.
    - company name starts with a brand name (e.g. "Kraft Foods")
    - master company data omits it
    - if no brands, use short name!
  - omit brands that have other brands from the same campaign as their prefix
    (e.g. XPS, XPS 10; iPod, iPod nano)
- merge/capitalize categories

- match up orphaned brands to companies

Corner cases (handle last):
- BIS Global (DBA: CharityEngine) (use DBA name)
- Joey's Pizza Services (Deutschland) GmbH == Joey's Pizza Services
- BBned / Tele2 Group (/-separated variants? subsidiaries?). Not A/S!
- Subsidiaries (data structure)
{'fraction_non_alphanumeric': 0.07641196013289037, 'fraction_numerical': 0.0022148394241417496, 'mean_word_length': 3.5175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6729024', 'n_tokens_mistral': 540, 'n_tokens_neox': 496, 'n_words': 247}