greek-name-correction 2.2.0 → 2.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/README.md +18 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ A powerful, zero-dependency Node.js library for correcting, formatting, and vali
|
|
|
23
23
|
🔤 **Sort Keys** - Accent-free sorting support
|
|
24
24
|
✅ **Validation** - Greek name pattern validation
|
|
25
25
|
🔧 **Flexible I/O** - Supports strings, arrays, and objects
|
|
26
|
-
✨ **Accent Addition** - Automatically adds accents to unaccented Greek names (
|
|
26
|
+
✨ **Accent Addition** - Automatically adds accents to unaccented Greek names using comprehensive name dictionary (1,100+ names) with intelligent fallback rules
|
|
27
27
|
|
|
28
28
|
## Installation
|
|
29
29
|
```bash
|
|
@@ -314,6 +314,7 @@ GreekNameCorrection('Ελένη Γεωργίου', {
|
|
|
314
314
|
### Accent Addition
|
|
315
315
|
```javascript
|
|
316
316
|
// Add accents to unaccented Greek names (one accent per word)
|
|
317
|
+
// Uses comprehensive name dictionary for accurate placement
|
|
317
318
|
GreekNameCorrection('γιωργος παπαδοπουλος', {
|
|
318
319
|
addAccents: true
|
|
319
320
|
});
|
|
@@ -346,8 +347,17 @@ GreekNameCorrection('δημήτρης νικολάου', {
|
|
|
346
347
|
addAccents: true
|
|
347
348
|
});
|
|
348
349
|
// → "Δημήτρης Νικολάου"
|
|
350
|
+
|
|
351
|
+
// Uses name dictionary for accurate accent placement
|
|
352
|
+
// Falls back to heuristic rules for unknown names
|
|
353
|
+
GreekNameCorrection('γιαννης γεωργιου', {
|
|
354
|
+
addAccents: true
|
|
355
|
+
});
|
|
356
|
+
// → "Γιάννης Γεωργίου"
|
|
349
357
|
```
|
|
350
358
|
|
|
359
|
+
**Note**: The `addAccents` feature (v2.2.1+) uses a comprehensive name dictionary built from `generate_greek_names.js` with over 1,100 Greek names. It first checks the dictionary for accurate accent placement, then falls back to intelligent heuristic rules based on word endings for names not in the dictionary.
|
|
360
|
+
|
|
351
361
|
### Name Corrections
|
|
352
362
|
```javascript
|
|
353
363
|
GreekNameCorrection('γιοργος παπαδοπουλος', {
|
|
@@ -473,7 +483,7 @@ GreekNameCorrection(input, options)
|
|
|
473
483
|
| `detectDiminutive` | `boolean` | `false` | Detect diminutive/nickname forms |
|
|
474
484
|
| `handleTitles` | `boolean` | `true` | Extract and format titles |
|
|
475
485
|
| `addGeneralTitle` | `boolean` | `false` | Automatically add general title (κ. for men, κα for women) if no title exists (always lowercase) |
|
|
476
|
-
| `addAccents` | `boolean` | `false` | Add accents to firstname and lastname (one accent per word) |
|
|
486
|
+
| `addAccents` | `boolean` | `false` | Add accents to firstname and lastname (one accent per word). Uses comprehensive name dictionary (1,100+ names) for accurate placement, with intelligent fallback rules |
|
|
477
487
|
| `suggestCorrections` | `boolean` | `false` | Suggest corrections for misspellings |
|
|
478
488
|
| `recognizeKatharevousa` | `boolean` | `false` | Convert archaic Greek forms |
|
|
479
489
|
| `databaseSafe` | `boolean` | `false` | Remove problematic characters |
|
|
@@ -805,7 +815,12 @@ The test suite covers:
|
|
|
805
815
|
|
|
806
816
|
## Changelog
|
|
807
817
|
|
|
808
|
-
### Version 2.2.
|
|
818
|
+
### Version 2.2.1 (Current)
|
|
819
|
+
- 🔧 **Enhanced Accent Addition** - Improved `addAccents` feature with comprehensive name dictionary support. Now uses actual Greek name dictionaries from `generate_greek_names.js` for accurate accent placement on common names. Includes CLI support with `-addAccents` flag.
|
|
820
|
+
- ✨ **Name Dictionary** - Built-in dictionary with 1,100+ Greek names (first names, surnames, compound surnames) for accurate accent placement
|
|
821
|
+
- 🐛 **CLI Fix** - Added missing `-addAccents` flag to command-line interface
|
|
822
|
+
|
|
823
|
+
### Version 2.2.0
|
|
809
824
|
- ✨ **Accent Addition Feature** - Added `addAccents` option to automatically add accents to unaccented Greek names (one accent per word). Intelligently places accents based on Greek accentuation rules and word endings.
|
|
810
825
|
- ✨ **TypeScript Support** - Added comprehensive TypeScript definitions (`index.d.ts`) with full type safety, IntelliSense support, and exported types
|
|
811
826
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "greek-name-correction",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "A zero-dependency Node.js library for correcting and formatting Greek names with transliteration, genitive conversion, and advanced features",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "index.d.ts",
|