make_post_sell/make_post_sell
russell@unturf.com 81c051e3fc
feat: MPS-24 Phase 2.3 — multi-bigram supersession, apostrophe labels, top_n 100
Phase 2.2 surfaced real categories but left noise:
- Color (119), Number (100), Day (63), Room (36) — unigrams fully covered
  by multiple bigrams, but the prior supersession only considered one
  bigram at a time so "Day" stayed even though "Valentine's Day" +
  "Patrick's Day" + … collectively cover all its products.
- "Valentine Day" / "Patrick Day" labels read as typo-broken because
  apostrophes were stripped during cleaning.
- 50 candidates wasn't long-tail enough on a 481-product catalog.

Three fixes:

- Multi-bigram supersession: a unigram drops when the UNION of bigrams
  containing it covers ≥ 80% of its product set. Iterates all bigrams
  for the unigram's stem, unions their product sets, computes coverage
  once.
- Apostrophe-preserving tokeniser + stemmer: `_MD_PUNCT` no longer
  strips `'`; `_WORD` regex accepts a trailing `(?:'[a-z]+)?` so
  "valentine's" and "patrick's" survive as surface forms.
  `simple_stem` drops the apostrophe tail before suffix-stripping so
  "valentine's" stems to "valentine" — the cluster groups correctly
  while the label vote wins with the readable surface form. Stopword
  check uses the apostrophe-less base so possessives can't slip past
  the list.
- top_n default 50 → 100. CLI default also bumped.

Tested with a Valentine's/Patrick's-heavy sample: bigrams render as
"Valentine's Day", "Patrick's Day" with proper apostrophes; the bare
"Day" unigram drops because the bigrams together cover all its
products. 1080 tests passing.
2026-05-15 11:41:46 -04:00
..
lib feat: MPS-24 Phase 2.3 — multi-bigram supersession, apostrophe labels, top_n 100 2026-05-15 11:41:46 -04:00
models feat: /u/carts surfaces product list, checked-out marker, Activate button 2026-05-15 10:01:35 -04:00
scripts feat: MPS-24 Phase 2.2 — bigrams + title-required + supersession dedup 2026-05-15 10:49:54 -04:00
static feat: product thumbnail hover/click swap — capability-driven enhancement 2026-05-15 11:40:46 -04:00
templates feat: product thumbnail hover/click swap — capability-driven enhancement 2026-05-15 11:40:46 -04:00
tests feat: MPS-24 Phase 2.3 — multi-bigram supersession, apostrophe labels, top_n 100 2026-05-15 11:41:46 -04:00
views feat: MPS-24 Phase 2.2 — bigrams + title-required + supersession dedup 2026-05-15 10:49:54 -04:00
__init__.py Add Monero (XMR) payment support 2025-09-22 01:45:54 +00:00
config_jinja2.py Time to open the sauce : ) 2021-12-31 21:39:40 -05:00
request_methods.py fix: scope /u/notifications + navbar badge to the current shop 2026-05-15 09:25:17 -04:00
routes.py feat: MPS-24 — shop home page categorization (tags + chips + sectioned lanes) 2026-05-15 08:48:25 -04:00