Skip to content

Should a conjunction inside a hyphenated surname keep its lowercase? Ortega-y-Gasset now capitalizes to Ortega-Y-Gasset #478

Description

@derek73

capitalize() on a hyphenated compound surname now uppercases a conjunction inside it. Measured on the released wheels and on the 2.2 branch, all with force=True:

input 1.4.0 2.0.0 2.1.0 2.2
jose ortega-y-gasset Jose Ortega-y-Gasset Jose Ortega-y-Gasset Jose Ortega-y-Gasset Jose Ortega-Y-Gasset
JOSE ORTEGA-Y-GASSET Jose Ortega-Y-Gasset Jose Ortega-Y-Gasset Jose Ortega-Y-Gasset Jose Ortega-Y-Gasset

The two spellings disagreed on every version through 2.1. #458 made them agree — by taking the uppercase answer, which is a deviation from 1.4.0 for the lowercase spelling. The same applies to Silva-e-Sousa, -et-, -und- and every other member of Lexicon.conjunctions.

Why it happens

#458 moved the conjunction-or-initial decision into the parse, and the decision is the whole token's. Ortega-y-Gasset is one family token carrying no conjunction tag, so repair capitalizes each word of it.

The spaced spelling is unaffected and still reads the convention correctly — there y is a token of its own and is tagged conjunction:

parse("jose ortega y gasset")   # family "ortega y gasset", the `y` tagged conjunction
# capitalize() -> "Jose Ortega y Gasset"   (unchanged on every version)

The case for leaving it

A hyphenated token is one word to the parser, and re-deciding per sub-word inside a token is exactly what #458 removed — it was producing two answers for one name. Reintroducing a sub-word rule for conjunctions only would be a narrower version of the thing that was wrong.

The case for changing it

Ortega-y-Gasset is a real orthography with a real convention, and the hyphenated spelling is common in library catalogues and bibliographies. The library gets the spaced form right, so a user reasonably expects the hyphenated form to match. Today the two spellings of one name repair differently.

Scope, measured

  • The parse is unaffected. Ortega-y-Gasset is a single family token before and after; only capitalized() differs.
  • 0 of 1,103 differential corpus names have a conjunction inside a hyphenated token, and compare.py never calls capitalized() anyway (decisions.md#R4), so no gate run can see this either way.
  • No safe workaround today. A capitalization_exceptions key of ortega-y-gasset never matches — keys are looked up per word. A 'y' -> 'y' entry does restore it, but breaks initials: y. smith repairs to y Smith.

Found while replacing the constructed e-f example in 2.2's release note with a real name (#477).

Activity

  1. derek73 commented on Sep 1, 2026

    @derek73
    OwnerAuthor

    Related: #479 — the same y/e word, but the parse rather than the rendering, and a different cause. There an all-caps name reads the conjunction as an initial because nothing checks whether the capital carries any signal; here a hyphenated token has no conjunction tag to read at all.

  2. added this to the 2.4 milestone on Sep 9, 2026
  3. derek73 commented on Sep 14, 2026

    @derek73
    OwnerAuthor

    PR #527 decides the one-case reading of y in the spaced form: y stays outside the new Lexicon.conjunctions_ambiguous subset, so jose ortega y gasset and JOSE ORTEGA Y GASSET now both keep the family Ortega y Gasset and repair to Jose Ortega y Gasset (a bare capital Y in a name written wholly in one case joins; in mixed case it is still an initial). This issue's "the spaced form is right" argument now rests on that membership, recorded at decisions.md#P3. The hyphenated token is untouched by that PR.

  4. added 3 commits that reference this issue on Sep 24, 2026
  5. derek73 commented on Sep 26, 2026

    @derek73
    OwnerAuthor

    Shipped in PR #539 (merged 2026-09-25, 120033b5), with the rule as proposed: a connective interior to a hyphenated token keeps its lowercase, so jose ortega-y-gasset and JOSE ORTEGA-Y-GASSET both give Jose Ortega-y-Gasset. Edge parts stay ordinary name text (juan e-f smith keeps E-F, #458's answer), a period-marked single letter is an initial (j.-e.-p. dupont keeps J.-E.-P.), and Māori Te Awanui-a-Rangi is the recorded non-reach. One boundary decided on the way: the hyphen is the writer's own join, so the interior word reads as a connective even in a name written in one case, where the spaced form reads a marked letter as an initial. J-E-P DUPONT → J-e-P Dupont is the pinned cost, and Lexicon.conjunctions_ambiguous does not reach hyphenated words. Record: rules.md#R4, the 2026-09-23/24 hyphen bullets under decisions.md#R4, release log.

  6. added 5 commits that reference this issue on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions