Skip to content

Emit Content Taxonomy 3.1 IDs with cattax 9, and ship the full catalog in the JS package - #1

Merged
esteininger merged 2 commits into
IABTechLab:mainfrom
esteininger:fix/cattax-9-and-full-js-catalog
Nov 2, 2026
Merged

esteininger merged 2 commits into
IABTechLab:mainfrom
esteininger:fix/cattax-9-and-full-js-catalog

Conversation

@esteininger

@esteininger esteininger commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

This fixes two bugs in what the mapper emits, and prepares 1.1.0.

  • Default cattax changes from 2 to 9. In AdCOM's List: Category Taxonomies, 2 is Content Taxonomy 2.0 and 9 is 3.1, and the bundled catalog is 3.1. With the old default, every output told receivers to read 3.x IDs as 2.0 codes. Every 3.0 ID is also a 3.1 ID, so callers that need 3.0 can pass cattax: 7 and get the same output.
  • The JavaScript package now ships the same catalogs as the Python package: Content Taxonomy 3.1 (704 categories) and 2.2 (1,197). Before this, javascript/data/iab_3x.json held a 6-row sample whose IDs (for example 3-5-2 for Cooking, which is 216 in the official file) do not exist in Content Taxonomy 3.1.
  • synonyms_3x.json is keyed by label, which is how both mappers look synonyms up. The path-keyed entries never matched, and "Team Sports" is not a 3.1 label.
  • A record with a 2.x code and no label now maps, by looking the label up in the bundled 2.x catalog. Before, {"code": "1"} returned no IDs.
  • README examples use real 3.1 IDs. Version is 1.1.0 in both packages, with a dated CHANGELOG entry.

Tests: Python 9 passed, with the same 5 failures as main (checked on 13cddec). JavaScript 49 of 50, with the same unicode-normalization failure as main.

Most of the cli.py diff is formatting (black and isort), because the copy this came from is formatted that way; its behavior change is the one-line cattax default.

Ethan Steininger added 2 commits October 20, 2026 11:42
…g in the JS package

- Default cattax 2 -> 9 (AdCOM: 2 is Content Taxonomy 2.0, 9 is 3.1).
- JS package ships the 3.1 (704) and 2.2 catalogs the Python package has.
- synonyms_3x.json keyed by label, as both mappers look it up.
- A 2.x code with no label maps through the 2.x catalog.
- Version 1.1.0.
…ize with Python

- CI and the PyPI release workflow ran at the repo root, which has had no
  pyproject.toml since the python/ and javascript/ split, so every run failed
  and a release could not publish. Both now use python/; CI also runs the JS
  tests and build.
- map_record dropped override topics: when an override matched, the result
  was replaced by map_topics. Overrides now lead and map_topics fills the
  remaining slots (test_overrides_precedence passes).
- Tests and the python README unpack map_topics' (topics, used_llm_rerank).
- JS normalize used an ASCII \w, so 'café' became 'caf' while Python kept
  'café'. It is Unicode-aware now, matching Python.

Python: 14 passed, 1 skipped. JS: 53 passed, build clean.
@esteininger
esteininger merged commit 3e86976 into IABTechLab:main Nov 2, 2026
2 checks passed
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.

1 participant