urdu-text-utils 0.2.0 → 0.2.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 +9 -0
- package/dist/index.cjs +478 -157
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.iife.js +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +476 -158
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -483,4 +483,40 @@ declare function stemUrdu(word: string, options?: StemmerOptions): string;
|
|
|
483
483
|
*/
|
|
484
484
|
declare function stemUrduText(text: string, options?: StemmerOptions): string;
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
interface NameTransliterationOptions {
|
|
487
|
+
/** Preserve the original case of the English name. Default: true (capitalized). */
|
|
488
|
+
preserveCase?: boolean;
|
|
489
|
+
/** Include honorifics in the output. Default: true. */
|
|
490
|
+
includeHonorifics?: boolean;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Transliterate an Urdu name to English.
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* transliterateNameToEnglish("محمد علی") // "Muhammad Ali"
|
|
497
|
+
* transliterateNameToEnglish("جناب خان صاحب") // "Janab Khan Sahib"
|
|
498
|
+
*/
|
|
499
|
+
declare function transliterateNameToEnglish(urduName: string, options?: NameTransliterationOptions): string;
|
|
500
|
+
/**
|
|
501
|
+
* Transliterate an English name to Urdu script.
|
|
502
|
+
*
|
|
503
|
+
* @example
|
|
504
|
+
* transliterateNameToUrdu("Muhammad Ali") // "محمد علی"
|
|
505
|
+
* transliterateNameToUrdu("Janab Khan Sahib") // "جناب خان صاحب"
|
|
506
|
+
*/
|
|
507
|
+
declare function transliterateNameToUrdu(englishName: string): string;
|
|
508
|
+
/**
|
|
509
|
+
* Extract name parts from a full Urdu name.
|
|
510
|
+
*
|
|
511
|
+
* @example
|
|
512
|
+
* extractNameParts("جناب محمد علی خان صاحب")
|
|
513
|
+
* // { honorific: "جناب", firstName: "محمد علی", familyName: "خان", suffix: "صاحب" }
|
|
514
|
+
*/
|
|
515
|
+
declare function extractNameParts(fullName: string): {
|
|
516
|
+
honorific?: string;
|
|
517
|
+
firstName: string;
|
|
518
|
+
familyName?: string;
|
|
519
|
+
suffix?: string;
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
export { type AffixBreakdown, type DigitStyle, type FormatUrduDateOptions, type IsUrduOptions, type NameTransliterationOptions, type NormalizeOptions, type SearchOptions, type SearchResult, type SlugOptions, type SortOptions, type SplitSentenceOptions, type StemmerOptions, type TimeAgoOptions, URDU_MONTHS_GREGORIAN, URDU_MONTHS_HIJRI, URDU_PREFIXES, URDU_STOP_WORDS, URDU_SUFFIXES, URDU_WEEKDAYS, type UrduStats, analyzeUrdu, compareUrdu, convertNumbers, countSentences, countWords, editDistance, extractNameParts, filterStopWords, foldUrdu, formatUrduDate, getAffixes, getUrduMonthName, getUrduWeekdayName, hasUrduSpecificLetters, highlightUrdu, isStopWord, isUrdu, normalizeUrdu, numberToUrduWords, parseUrduNumber, removeDiacritics, removeStopWords, romanToUrdu, romanize, searchUrdu, searchUrduRanked, sortUrdu, splitSentences, splitWords, stemUrdu, stemUrduText, timeAgoUrdu, toArabicIndicDigits, toEnglishDigits, toUrduDigits, transliterateNameToEnglish, transliterateNameToUrdu, urduRatio, urduSlug };
|
package/dist/index.d.ts
CHANGED
|
@@ -483,4 +483,40 @@ declare function stemUrdu(word: string, options?: StemmerOptions): string;
|
|
|
483
483
|
*/
|
|
484
484
|
declare function stemUrduText(text: string, options?: StemmerOptions): string;
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
interface NameTransliterationOptions {
|
|
487
|
+
/** Preserve the original case of the English name. Default: true (capitalized). */
|
|
488
|
+
preserveCase?: boolean;
|
|
489
|
+
/** Include honorifics in the output. Default: true. */
|
|
490
|
+
includeHonorifics?: boolean;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Transliterate an Urdu name to English.
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* transliterateNameToEnglish("محمد علی") // "Muhammad Ali"
|
|
497
|
+
* transliterateNameToEnglish("جناب خان صاحب") // "Janab Khan Sahib"
|
|
498
|
+
*/
|
|
499
|
+
declare function transliterateNameToEnglish(urduName: string, options?: NameTransliterationOptions): string;
|
|
500
|
+
/**
|
|
501
|
+
* Transliterate an English name to Urdu script.
|
|
502
|
+
*
|
|
503
|
+
* @example
|
|
504
|
+
* transliterateNameToUrdu("Muhammad Ali") // "محمد علی"
|
|
505
|
+
* transliterateNameToUrdu("Janab Khan Sahib") // "جناب خان صاحب"
|
|
506
|
+
*/
|
|
507
|
+
declare function transliterateNameToUrdu(englishName: string): string;
|
|
508
|
+
/**
|
|
509
|
+
* Extract name parts from a full Urdu name.
|
|
510
|
+
*
|
|
511
|
+
* @example
|
|
512
|
+
* extractNameParts("جناب محمد علی خان صاحب")
|
|
513
|
+
* // { honorific: "جناب", firstName: "محمد علی", familyName: "خان", suffix: "صاحب" }
|
|
514
|
+
*/
|
|
515
|
+
declare function extractNameParts(fullName: string): {
|
|
516
|
+
honorific?: string;
|
|
517
|
+
firstName: string;
|
|
518
|
+
familyName?: string;
|
|
519
|
+
suffix?: string;
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
export { type AffixBreakdown, type DigitStyle, type FormatUrduDateOptions, type IsUrduOptions, type NameTransliterationOptions, type NormalizeOptions, type SearchOptions, type SearchResult, type SlugOptions, type SortOptions, type SplitSentenceOptions, type StemmerOptions, type TimeAgoOptions, URDU_MONTHS_GREGORIAN, URDU_MONTHS_HIJRI, URDU_PREFIXES, URDU_STOP_WORDS, URDU_SUFFIXES, URDU_WEEKDAYS, type UrduStats, analyzeUrdu, compareUrdu, convertNumbers, countSentences, countWords, editDistance, extractNameParts, filterStopWords, foldUrdu, formatUrduDate, getAffixes, getUrduMonthName, getUrduWeekdayName, hasUrduSpecificLetters, highlightUrdu, isStopWord, isUrdu, normalizeUrdu, numberToUrduWords, parseUrduNumber, removeDiacritics, removeStopWords, romanToUrdu, romanize, searchUrdu, searchUrduRanked, sortUrdu, splitSentences, splitWords, stemUrdu, stemUrduText, timeAgoUrdu, toArabicIndicDigits, toEnglishDigits, toUrduDigits, transliterateNameToEnglish, transliterateNameToUrdu, urduRatio, urduSlug };
|