Skip to content

feat(crossposting): swear feature for the channel model - #414

Open
sebastianwall wants to merge 4 commits into
productionfrom
feat/crosspost-swear
Open

sebastianwall wants to merge 4 commits into
productionfrom
feat/crosspost-swear

Conversation

@sebastianwall

Copy link
Copy Markdown
Collaborator

Adds swear (1.0 when the meme's OCR text has Russian мат or EN profanity, else 0.0; 0.0 with no text) to the crossposting ridge features.

Why: channel-lab walk-forward (lab/e8_swear.py, run 8, 2026-11-30) showed RU Δρ +0.006 vs the active 20-feature spec, better in 2/3 thirds. EN profanity did not help. The feature works on any channel; EN rows just won't list it.

  • model.py: swear is added at the end of FEATURES, plus SWEAR_RU / SWEAR_EN / has_swear. Registered rows list their own feature subset, so they still load.
  • service.py: _MODEL_STATIC_QUERY also selects ocr_result->>'text'. fetch_model_static_inputs computes ocr_swear in Python. That function feeds both decision-time scoring and model_loop.training_rows, so one change covers both paths. ocr_swear is logged per candidate, the same way Channel model: content features (description, language, format) #413 logs desc_len/format/lang.
  • The nightly default spec (REFIT_FEATURES) is unchanged. A row with swear is registered by hand.
  • Tests: regex positives and negatives from the brief, and features() producing swear.

🤖 Generated with Claude Code

sebastianwall and others added 4 commits November 30, 2026 21:11
… channel model

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…хую)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, тихую)

Anchor ху-forms to a word start with an optional prefix; skip бляха/бляшки.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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