Skip to content

fix: no-mixed-desumasu does not compare a contributor's profile section - #2990

Merged
isamu merged 1 commit into
mainfrom
fix/no-mixed-desumasu-profile-section
Nov 30, 2026
Merged

isamu merged 1 commit into
mainfrom
fix/no-mixed-desumasu-profile-section

Conversation

@isamu

@isamu isamu commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Summary

no-mixed-desumasu compared a contributor's profile (a section headed by the person's name with さん, opening on the occupation alone: 「イラストレーター。…評価を得ている。」) with the desu-masu page around it. Profiles are written in the plain form by convention; they are a separate block, not the page's voice.

A section is read as a profile when its heading ends with an honorific from the person-suffix lexicon (さん, 氏, 様) and its first sentence only names something (nouns and punctuation). Its sentences are set apart, as the asker sections and video captions already are.

Refs #2957 (its no-mixed-desumasu entry; the date-without-year entry is left for re-judging, see below)

Items to Confirm / Review

  • Both conditions are required: a name heading whose section opens on a predicate, or an occupation line under a heading without an honorific, is still compared.
  • The date-without-year entry of chaff-corpus: koho-tokyo-2026-06-suigai — no-mixed-desumasu, date-without-year #2957 is not touched: the rule's dated_genres option says on purpose that a web page's date at the top is the day it was posted, so its months and days may be any year's.

Approach

  • New pure helper src/profile-section.ts (profileSentences), used in judgedSentences beside askerSentences; person-suffix is added to the rule's extra_word_lists; not_flagged in both languages.
  • Tests (self-written) in test/test_desumasu_profile.ts: both honorifics quiet; no honorific or no occupation line still reported.
  • Judged chaff-corpus run (all documents, against main): the target false positive is gone; no judged-correct finding of no-mixed-desumasu is lost and no new finding appears. yarn corpus and yarn planted unchanged.

🤖 Generated with Claude Code
work in lab

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@isamu isamu mentioned this pull request Nov 30, 2026
@isamu
isamu merged commit ce2f308 into main Nov 30, 2026
19 of 38 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