urdu-text-utils 0.2.3 → 0.3.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ - Publish the PHP port to Packagist. A root composer.json (Packagist reads repo-root manifests only) exposes php/src/UrduTextUtils via PSR-4 autoload, with export-ignore rules in .gitattributes for a clean dist archive. The new Packagist workflow runs on the same version tags as the npm Release: a PHP 8.1-8.3 matrix re-verifies table sync, strict manifest validation and the 536-test parity suite, then notifies packagist.org's update API so every tag publishes to both registries. v0.3.1 is the first version indexed on Packagist (composer require urdu-text-utils/urdu-text-utils).
6
+
7
+
8
+ ## 0.3.0
9
+
10
+ - Complete the PHP port (stages 0.2-0.4): add Detect.php, StopWords.php, Words.php sentence/statistics APIs, Stemmer.php, Date.php and Names.php with full fixture parity against the TypeScript source
11
+ - Flow every shared table (stop words, sentence abbreviations, stemmer affixes, date names, name tables) through the generated php/data/tables.json
12
+ - Export PROTECTED_WORDS and ENGLISH_NAME_ALIASES from the TypeScript source and re-export them from the package root
13
+ - Add 360 PHP parity fixtures (536 PHPUnit tests) that pass with and without ext-intl
14
+ - Add scripts/verify-php-parity.mjs, a no-PHP smoke check mirroring the PHP algorithms in Node
15
+ - Use timezone-stable date fixtures so CI regeneration can never drift from locally generated fixtures
16
+
17
+
3
18
  ## 0.2.3
4
19
 
5
20
  - Add Complementary libraries section
package/README.md CHANGED
@@ -8,6 +8,7 @@
8
8
  [![dependencies](https://img.shields.io/badge/dependencies-0-157f52?style=flat-square)](https://www.npmjs.com/package/urdu-text-utils?activeTab=dependencies)
9
9
  [![downloads](https://img.shields.io/npm/dm/urdu-text-utils?style=flat-square)](https://www.npmjs.com/package/urdu-text-utils)
10
10
  [![license](https://img.shields.io/npm/l/urdu-text-utils?style=flat-square)](./LICENSE)
11
+ ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/Zaid-maker/urdu-text-utils?utm_source=oss&utm_medium=github&utm_campaign=Zaid-maker%2Furdu-text-utils&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)
11
12
 
12
13
  A complete, lightweight **Urdu text processing toolkit for JavaScript and TypeScript** (Node.js, Deno, Bun, and browsers). Zero runtime dependencies. Provides Unicode normalization, Roman Urdu transliteration, Urdu stop words, script detection, Urdu digit conversion, diacritics (aerab / harakat) removal, alphabetical collation / sorting, fuzzy search, and text statistics.
13
14
 
package/dist/index.cjs CHANGED
@@ -314,7 +314,7 @@ function splitWords(input) {
314
314
  if (!input) return [];
315
315
  return input.split(WORD_SPLIT_RE).map((w) => w.trim()).filter((w) => w.length > 0);
316
316
  }
317
- var ABBREVIATIONS = [
317
+ var SENTENCE_ABBREVIATIONS = [
318
318
  "\u0688\u0627\u06A9\u0679\u0631",
319
319
  "\u067E\u0631\u0648\u0641\u06CC\u0633\u0631",
320
320
  "\u0627\u0646\u062C\u06CC\u0646\u0626\u0631",
@@ -338,7 +338,7 @@ var ABBREVIATIONS = [
338
338
  "\u0635\u0644\u06CC",
339
339
  "\u0648\u0633\u0644\u0645"
340
340
  ];
341
- var ABBREV_PATTERN = new RegExp(`(?:${ABBREVIATIONS.join("|")})[.\u06D4]`, "gu");
341
+ var ABBREV_PATTERN = new RegExp(`(?:${SENTENCE_ABBREVIATIONS.join("|")})[.\u06D4]`, "gu");
342
342
  function countSentences(input, options) {
343
343
  return splitSentences(input, options).length;
344
344
  }
@@ -4712,6 +4712,13 @@ function extractNameParts(fullName) {
4712
4712
  return { honorific, firstName, familyName, suffix };
4713
4713
  }
4714
4714
 
4715
+ exports.ENGLISH_NAME_ALIASES = ENGLISH_NAME_ALIASES;
4716
+ exports.HONORIFICS = HONORIFICS;
4717
+ exports.NAME_PREFIXES = NAME_PREFIXES;
4718
+ exports.PROTECTED_WORDS = PROTECTED_WORDS;
4719
+ exports.SENTENCE_ABBREVIATIONS = SENTENCE_ABBREVIATIONS;
4720
+ exports.URDU_FAMILY_NAMES = URDU_FAMILY_NAMES;
4721
+ exports.URDU_FIRST_NAMES = URDU_FIRST_NAMES;
4715
4722
  exports.URDU_MONTHS_GREGORIAN = URDU_MONTHS_GREGORIAN;
4716
4723
  exports.URDU_MONTHS_HIJRI = URDU_MONTHS_HIJRI;
4717
4724
  exports.URDU_PREFIXES = URDU_PREFIXES;