urdu-text-utils 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1
4
+
5
+ - Expand the transliteration dictionary to ~450 entries: high-frequency vocabulary, oblique infinitives (`کرنے`, `رہنے`), English loanwords (`سکول`, `کمپیوٹر`) and common Roman spelling variants. The dictionary moved to `src/dictionary.ts`.
6
+ - Improve the rule fallback for words outside the dictionary: word-initial `و`/`ی` transliterate as consonants (`والا` → `wala`), word-final `ہ` as `-a` (`کمرہ` → `kamra`), and a schwa is inserted after an initial consonant cluster so output stays pronounceable (`رہنے` → `rehne` instead of `rhne`).
7
+ - `romanToUrdu("school")` now returns `سکول` instead of `سچول`.
8
+ - Releases publish through npm Trusted Publishing (OIDC); no npm token is stored in the repository.
9
+
10
+ ## 0.1.0
11
+
12
+ First release: normalization, script detection, digit conversion, diacritic removal, Urdu collation, diacritic-insensitive search with highlighting, text statistics, and experimental transliteration and slugs.
package/README.md CHANGED
@@ -153,7 +153,9 @@ analyzeUrdu("پاکستان ایک خوبصورت ملک ہے۔ اس کی آبا
153
153
 
154
154
  Read this before putting it in front of users.
155
155
 
156
- Urdu script omits short vowels, so the mapping is genuinely ambiguous: `کتب` is `kitab` or `kutub` depending on context and no rule table can decide which. The reverse direction is worse, because Roman Urdu has no standard orthography (`hai` / `hay` / `he` all occur). These functions use a dictionary of common words with a rule fallback — expect roughly 70% word accuracy on ordinary prose, and do not build anything irreversible on the output. A real lexicon plus a statistical model is planned; it is not faked here.
156
+ Urdu script omits short vowels, so the mapping is genuinely ambiguous: `کتب` is `kitab` or `kutub` depending on context and no rule table can decide which. The reverse direction is worse, because Roman Urdu has no standard orthography (`hai` / `hay` / `he` all occur).
157
+
158
+ These functions work in two layers: a dictionary of ~450 high-frequency words, English loanwords and oblique verb forms, then a rule fallback that handles aspirated digraphs, word-initial `و`/`ی` as consonants, word-final `ہ` as `-a`, and a schwa insertion so unseen words stay pronounceable. Dictionary hits are reliable; rule output is an approximation. Do not build anything irreversible on it. A real lexicon plus a statistical model is planned, not faked here.
157
159
 
158
160
  ```ts
159
161
  romanize("آپ کیسے ہیں"); // "aap kaisay hain"
@@ -191,7 +193,7 @@ git push --follow-tags
191
193
 
192
194
  The `Release` workflow then verifies the tag matches `package.json`, re-runs typecheck/tests/build, publishes with `--provenance`, and opens a GitHub Release with generated notes.
193
195
 
194
- One-time setup: add an npm **Automation** access token as the `NPM_TOKEN` repository secret (`gh secret set NPM_TOKEN`). Automation tokens bypass 2FA prompts, which classic publish tokens do not.
196
+ Authentication is npm [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) over OIDC no npm token exists in this repository and none needs to be rotated. npm trusts `Zaid-maker/urdu-text-utils` publishing from `release.yml` specifically, so renaming that workflow file breaks releases until the trusted publisher is updated on npm.
195
197
 
196
198
  ## License
197
199