Repository navigation
Read a title written with a slash for its full stop as the title (#1149) - #1502
Merged
Merged
Conversation
Add rules/T9: a listed title opening the name, or the given part after a family comma, written with a slash in place of its full stop (`د/ أحمد`, `د/أحمد`, `د / أحمد`, `د /أحمد`; `Dr/ Jane Smith`) reads as that title, the slash's token dropped in script_segment ahead of T8's division. The name after the slash is one name word in T8's shape, its full stops set aside, that no title or suffix reading claims outright. A title that is also a suffix, a given name or a saint particle is none, and the part before a family comma is not read, a slash there joining two surnames. Credentials joined by a slash, the Malaysian relations, c/o, A/Prof, A/S, a title-slash later in a name, and title pairs keep their readings; each has a case row run against e0f698c. Against e0f698c, measure.py --base moves 88 snapshot entries, 77 to the title, 11 wrong before and after, none wrong that read right (decisions/T9). 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1149
#1497 left one of #1149's three questions open: question A, the slash. This PR builds the reading it proposed, so all three are now settled.
What changes
New rule T9 (a slash written for a title's full stop). It applies to a listed title that opens the name, or that opens the given part after a family comma, when the title is written with a slash where its full stop would stand. That title now reads as the title, and the slash is a separator that lands in no field. All four writings are covered, in any script:
د/ أحمد عليد/, middleأحمدد, givenأحمدد/أحمد علي حسند/أحمدد, givenأحمدد / أحمد عليد, given/د, givenأحمدDr /Jane SmithDr, given/JaneDr, givenJaneSmith, Dr/ JaneDr/, middleJaneDr, givenJaneأ.د/ أحمد عليأ.د/أ.دWhat a title must be. It is a title the vocabulary lists, and not also a suffix (
CPO/L,Ms/), a given name (Dean/) or a saint particle (St/). A title listed with a slash of its own (mag/judge) is read whole.What must follow the slash. One name word in T8's shape (rule T8: a word glued to the next at its full stop), with its full stops set aside so that initials count (
Dr/ J. Smith), that no title or suffix reading claims outright. A title or suffix that is also a given name reads as it does after a full stop (Dr/ Dean Smith→ givenDean, reported;Dr/ Md. Smith→ givenMd.).Why this needs a split rule beside T8, and the narrower forms declined
The slash is cut off and its token dropped in
script_segment, ahead of T8's division. Spans still index the original, so every later stage readsDr Jane Smith.د/) as titles, or readX/as a title in classify. Declined. Either one reads onlyX/ word, which is 38 of the 86 names. The glued (X/word) and spaced (X / word,X /word) writings need a division all the same, and listing them copies the vocabulary title by title._normalizefolds a full stop. Declined. It would read a trailingDr/anywhere in a name, and would reach every listed word written with a slash./word.What it leaves alone
Each of these has a case row, run against e0f698c, and each reads there as it does here:
MD/PhD,M.D/Ph.D,OTR/L;a/l,a/pands/o, andc/o;A/Prof(Ais no listed title),A/S, and a bracketed(UTC/GMT;Dr/Mrs), and a title joined to a credential (Dr/MD);JURIST/KOVAC, DANIEL/KAREN);Measured
tools/differential/measure.py --basewas run against a fresh checkout of e0f698c, and re-taken after merging master against de8324a (after #1498, #1499 and #1500): every figure below is the same at both.The 86, recounted from the merged tree. A listed title written with a slash opens 86 names in the local corpora. By list:
By the title that opens them:
د33,dr14,أ.د9,الدكتور4,اللواء4,دكتور3,م3,founder3,prof2,director2,لواء2, and one each ofmr,dean,jurist,president,ا,المستشارandدكتورة.88 snapshot entries move. By list: parliament 37, ORCID 36, ClinicalTrials.gov 9, PSC 6. Nothing else moves: no other local corpus, not the committed snapshot, and not the CLDR, GND or Wikidata records.
Director/Owner …(titleDirector, givenOwner, where master gave givenDirector/Owner), and ClinicalTrials.gov's job descriptions.The scoring moves come from how the boxes were filled in, not from misreadings.
Dr/orد/into the given-name box./James.د/ محمد علي) that now reads a title, beside a full chain of names that reads none.It settles a cost #1497 recorded. On e0f698c, 23 snapshot entries read
/as the given name. The 19 with a listed title before the slash now read the name after it; the 4 with no title before it keep/.Frames. Measured with
sys.setprofile:"/" intest.Smith, Jane MD/PhD: 142 → 147).JURIST/KOVAC, …: 127 → 203).With #1500's bound pairs
A slashed title before an Arabic bound pair reads as its full-stop spelling does, the pair joining the word the slash is cut from:
د/ نور الدين محمد عليandد/نور الدين محمد عليgive titleد, givenنور الدين;اللواء/ عبد الله أحمد عليgives givenعبد الله;د/ محمد نور الدينgives familyنور الدين. Four case rows hold these, each failing on de8324a (givenد/orد/نور الدين).Reviews
The reviews run:
pr-review-toolkit: code-reviewer, pr-test-analyzer, comment-analyzer, code-simplifier;design-docs-reviewer;They found and fixed:
JURIST) and title/suffix duals (CPO/L,MS/CCRP). Both were taken out.mag/judge) was cut at it. It is now cut at its last slash.fix(#752),fix(#797)andfix(#889), each traced to the published wheels.Dr/ J. Smithlost its title). Its full stops are now set aside for the shape.Md.(Muhammad written short, also a credential) was refused. A given name written short reads as a name first unless written in capitals, soDr/MDkeeps its word. That fix moved one more corpus name to the right reading (V. Gross, Prof/ md).Dr/Jane, PhD) is left unread, as on master, and recorded as accepted._divide_title_slashand the site code, and confirmed that no shared predicate is hand-copied.Docs
د.and the Iraqi academic abbreviations read as titles? (د. أحمد علي حسنgives given 'د.') #1149's question A to T9.د.and the Iraqi academic abbreviations read as titles? (د. أحمد علي حسنgives given 'د.') #1149 now says the slash reads as the title, in place of "still reads as the given name".script_segmentandParseStaterecord the dropped token.corpus_rules.jsonlandsnapshot.jsonlare regenerated, adding T9's 32 examples and changing nothing else.Checks
All pass on the final tree:
parity_check.py: 0 of 714 parity rows read otherwise under 1.4.0.🤖 Generated with Claude Code