Skip to content

Say how many names to give Parser.suggest(): a sample of a few hundred per source - #1443

Merged
derek73 merged 2 commits into
masterfrom
docs/suggest-how-many
Nov 16, 2026
Merged

derek73 merged 2 commits into
masterfrom
docs/suggest-how-many

Conversation

@derek73

@derek73 derek73 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

docs/suggest.rst said what the floor is (two names) and, in its last section, how many names each kind of list took. It never answered the question a caller starts with, and said nothing about very long lists.

What changed

  • docs/suggest.rst: a new section, "How many names to give it", ahead of "Reading the result". Under five names often gets no suggestion, which is safe; fifty settles most kinds of list; a few hundred settles nearly every kind; more rarely helps and can hurt. For a large dataset it shows sampling 300 names from a source (a doctest), says a sample is quicker but that speed is not the main reason, names the one kind of list more names kept helping (bylines written initials first under a family-first base), and says to split a list that mixes sources.
  • docs/getting-started.rst: its closing pointer now leads to that section.
  • docs/design/decisions/group-suggestion.md: a Standing line and a dated Log entry holding the measurement the section rests on.

The measurement

uv run python tools/differential/suggest_measure.py --sizes 5,10,20,50,100,200,500,1000,2000 --trials 200 on master 05689a4c. Over the order table's 120 rows (30 populations, each written both ways under both bases), the size from which a row is right in every trial at every larger size:

From 5 10 20 50 100 200 500 never
Rows 63 21 11 10 3 2 2 8

So 105 of 120 are settled by 50 names and 110 by 200.

The advice to sample, and the sentence that a very long list can be read less well than a sample of it, rest on #1442: one same-order row falls below 95% from 500 names, because the order is decided among the names that vote. The advice holds before and after any fix to that issue. This PR does not change the suggester and does not close #1442.

Checked

  • The doctest: 300 names sampled from a 100,000-name list give PolicyPatch(name_order=FAMILY_FIRST).
  • "A suggestion costs about what parsing the same names does": 21,000 mixed-case names took 0.69 s to suggest and about 1.5 s to parse; the review timed lists writing the family name in capitals at 1.8 s against 1.15 s for 20,000 names, since the capitals vote asks the parse itself.
  • sphinx-build -b html and -b doctest pass with no warning; tools/docs_scan.py suggest.rst reports no finding; tests/v2/test_design_docs.py and test_doc_citations.py pass.

Review

A design-docs review found two claims stronger than the record and two slips in the decisions entry; the second commit corrects them. The same slip (a right vote read as a given-name vote) is corrected in #1442's body.

🤖 Generated with Claude Code

…d per source

Adds 'How many names to give it' to docs/suggest.rst, points getting-started
at it, and records the measurement past 200 names in
decisions/group-suggestion (2026-11-16, #1442).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@derek73 derek73 added this to the 3.1 milestone Nov 16, 2026
@derek73 derek73 added docs Documentation fixes and updates suggester The group suggester: Parser.suggest() and its signals labels Nov 16, 2026
@derek73 derek73 self-assigned this Nov 16, 2026
…st is about a parse

- 'more adds nothing' and 'costs less than parsing' were stronger than the
  record: bylines written given first under a family-first base kept
  improving to 2,000 names, and a capitals list costs more than a parse.
- The decisions entry named nine rows as the eight that never settle, and
  read a right vote as a given-name vote; #1442 joins the Open paragraph.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@derek73
derek73 merged commit 06e9020 into master Nov 16, 2026
12 checks passed
@derek73
derek73 deleted the docs/suggest-how-many branch November 16, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation fixes and updates suggester The group suggester: Parser.suggest() and its signals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should two stray votes decide a list's order when 100,000 names cast none? (Parser.suggest moves a family-first base to given-first)

1 participant