You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should John Smith (MD,PhD) read the credentials when the comma has no space beside it? It gives nickname MD,PhD today #1268
A bracketed clause holding credentials is read as credentials when its comma has a space beside it, but as a nickname when the comma touches both words:
>>> parse("John Smith (MD, PhD)") # suffix 'MD, PhD'
>>> parse("John Smith (MD ,PhD)") # suffix 'MD, PhD'
>>> parse("John Smith (MD,PhD)") # nickname 'MD,PhD'
>>> parse("John Smith (Dr., PhD)") # title 'Dr.', suffix 'PhD'
>>> parse("John Smith (Dr.,PhD)") # nickname 'Dr.,PhD'
>>> parse("John Smith (MD;PhD)") # nickname 'MD;PhD'
Outside brackets the same glued comma already divides: Smith,John reads family 'Smith', given 'John', and John Smith, MD,PhD reads suffix 'MD, PhD'. Only the bracketed clause keeps the glued pair as one word, so rules/S1 (a bracketed credential is not a nickname) and rules/S13 (a bracketed member settled by its writing) never see two members. John Smith (Jr.,MD) happens to land in the suffix, but as the single unsplit word Jr.,MD.
This matters most for the fullwidth comma ,, which CJK text usually writes with no space after it. #1266 made every comma in COMMA_CHARS read the way the ASCII comma does, so the gap now affects all of them equally rather than one script more than another.
Open questions:
Should a clause divide at a glued comma only when every resulting piece is a credential or title (the S1 test), so that Jane (Janey,Jo) Smith keeps nickname Janey,Jo? Or should it always divide, so that one becomes nickname Janey, Jo?
Should the ; delimiter follow the same rule inside a clause?
Closing as an accepted limit. John Smith (MD,PhD), with no space beside the comma, keeps reading as nickname MD,PhD; (MD, PhD) and (M.D.,Ph.D.) read as credentials.
Two designs were tried in #1339 and neither held up in review: dividing at the comma while tokenizing reached every bracketed clause, nicknames included, and reading the halves of the undivided word made one word stand for several credentials. The shape is rare: ClinicalTrials.gov holds 9 names with a comma glued in parentheses, none reading differently from its spaced form, and ORCID holds 6, of which 3 do (measured 2026-11-11).
The limit and both declined designs are recorded in docs/design/rules/S1-bracketed-credential-is-not-a-nickname.md and its decisions file (#1342). A caller with such data can add the space before parsing.
Activity
State clause_words' reach, and record #1268's lesson in the spacing s…
Date #1268's corpus figures to the count-based splitter
Label #1268's boundary rows with the change each reading came from (r…
Re-scope #1268: decide a glued comma in S1's post_rules decision alone
Scope #1268's limit to clauses with no full stop, and date its counts…
Drop the (Jr.,MD) example from rules/S1's #1268 bullet (CI)
Record a comma glued inside a clause as word text, and the designs de…
derek73 commentedon Nov 17, 2026
Closing as an accepted limit.
John Smith (MD,PhD), with no space beside the comma, keeps reading as nicknameMD,PhD;(MD, PhD)and(M.D.,Ph.D.)read as credentials.Two designs were tried in #1339 and neither held up in review: dividing at the comma while tokenizing reached every bracketed clause, nicknames included, and reading the halves of the undivided word made one word stand for several credentials. The shape is rare: ClinicalTrials.gov holds 9 names with a comma glued in parentheses, none reading differently from its spaced form, and ORCID holds 6, of which 3 do (measured 2026-11-11).
The limit and both declined designs are recorded in
docs/design/rules/S1-bracketed-credential-is-not-a-nickname.mdand its decisions file (#1342). A caller with such data can add the space before parsing.