Title: Provide constants in non-Latin scripts (Cyrillic, Greek, Arabic, Hebrew) · Issue #269 · derek73/python-nameparser · GitHub
Open Graph Title: Provide constants in non-Latin scripts (Cyrillic, Greek, Arabic, Hebrew) · Issue #269 · derek73/python-nameparser
X Title: Provide constants in non-Latin scripts (Cyrillic, Greek, Arabic, Hebrew) · Issue #269 · derek73/python-nameparser
Description: The parsing machinery is fully Unicode-clean — \w, .lower(), and the piece logic all handle non-Latin scripts — but the constant sets (titles, prefixes, conjunctions, suffixes) are almost entirely Latin-script. Verified on v1.3.0 that ru...
Open Graph Description: The parsing machinery is fully Unicode-clean — \w, .lower(), and the piece logic all handle non-Latin scripts — but the constant sets (titles, prefixes, conjunctions, suffixes) are almost entirely ...
X Description: The parsing machinery is fully Unicode-clean — \w, .lower(), and the piece logic all handle non-Latin scripts — but the constant sets (titles, prefixes, conjunctions, suffixes) are almost entirely ...
Opengraph URL: https://github.com/derek73/python-nameparser/issues/269
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide constants in non-Latin scripts (Cyrillic, Greek, Arabic, Hebrew)","articleBody":"The parsing machinery is fully Unicode-clean — `\\w`, `.lower()`, and the piece logic all handle non-Latin scripts — but the constant sets (titles, prefixes, conjunctions, suffixes) are almost entirely Latin-script. Verified on v1.3.0 that runtime additions work end-to-end with no code changes, e.g.:\n\n```python\n\u003e\u003e\u003e C = Constants()\n\u003e\u003e\u003e C.titles.add('г-н')\n\u003e\u003e\u003e C.prefixes.add('بن')\n\u003e\u003e\u003e HumanName(\"г-н Иван Петров\", constants=C).title\n'г-н'\n\u003e\u003e\u003e HumanName(\"محمد بن سلمان\", constants=C).last\n'بن سلمان'\n```\n\nUnlike Latin transliterations (which collide across cultures and need opt-in flags), native-script constants cannot collide with Latin-script names, so they are viable as defaults. Only within-script ambiguity needs vetting.\n\n**Candidates:**\n- **Cyrillic titles:** `г-н`, `г-жа`, `д-р`, `проф`, `акад`; Ukrainian `пан`, `пані`. (Abbreviated forms like `проф.` currently work only by accident via the leading-position `period_abbreviation` fallback; hyphenated `г-н` doesn't.)\n- **Cyrillic conjunctions:** `и`; Ukrainian `і`/`та` (interacts with the `initial`-regex question, see #267)\n- **Cyrillic suffixes:** `мл`/`ст` (junior/senior) — needs within-script collision vetting\n- **Greek:** titles `κ`, `κα`, `κος`, `δρ`, `καθ`; conjunction `και`\n- **Arabic script prefixes:** `بن` (bin), `بنت` (bint), `ابن` (ibn), `أبو`/`ابو` (abu), `آل` (Āl); title `الشيخ`. Excluded: standalone `ال` (normally attached, too ambiguous), conjunction `و` (attaches without a space)\n- **Hebrew prefixes:** `בן` (ben), `בת` (bat); title `מר`. Titles containing geresh/gershayim (`ד\"ר`, `גב'`) need testing against the nickname-extraction regexes first.\n\nOut of scope: CJK (family-first order and unspaced segmentation — see #83), Cyrillic patronymic suffixes (already covered by the 1.3.0 regexes).\n\nCoverage should be parsing-behavior tests per script, not assertions on set contents. Related: #265, #266.\n","author":{"url":"https://github.com/derek73","@type":"Person","name":"derek73"},"datePublished":"2026-07-07T21:02:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/269/python-nameparser/issues/269"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eb69134f-4d41-1460-7325-01fb2bef9d1c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DB8:3BB025:8EA93F:BF8C31:6A55622B |
| html-safe-nonce | e7c0d12906c80f69b78bb928121616e8178e741d52f88f2b7e1400287cb9fd4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REI4OjNCQjAyNTo4RUE5M0Y6QkY4QzMxOjZBNTU2MjJCIiwidmlzaXRvcl9pZCI6IjYwNjQzMTcyNDQ3NDU1NDAxMzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 31b2cb8571cd9d40a0caf64a9a5465c59f0196e194ef4d61fbf225dfd8153e6c |
| hovercard-subject-tag | issue:4832213098 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/derek73/python-nameparser/269/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b1f955e7f23ec0c6157ab97012f62d863c6d1c27e370b936f2d7fa82b000ba93/derek73/python-nameparser/issues/269 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b1f955e7f23ec0c6157ab97012f62d863c6d1c27e370b936f2d7fa82b000ba93/derek73/python-nameparser/issues/269 |
| og:image:alt | The parsing machinery is fully Unicode-clean — \w, .lower(), and the piece logic all handle non-Latin scripts — but the constant sets (titles, prefixes, conjunctions, suffixes) are almost entirely ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | derek73 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/derek73/python-nameparser git https://github.com/derek73/python-nameparser.git |
| octolytics-dimension-user_id | 18306 |
| octolytics-dimension-user_login | derek73 |
| octolytics-dimension-repository_id | 18353524 |
| octolytics-dimension-repository_nwo | derek73/python-nameparser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 18353524 |
| octolytics-dimension-repository_network_root_nwo | derek73/python-nameparser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8201d0b7bc32164c4662de52242e463a356df543 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width