georgian-hyphenation 2.2.5 → 2.2.6
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 +200 -606
- package/package.json +1 -1
- package/src/javascript/index.cjs +3 -3
- package/src/javascript/index.js +6 -6
package/README.md
CHANGED
|
@@ -1,721 +1,315 @@
|
|
|
1
|
-
# Georgian Language Hyphenation
|
|
1
|
+
# Georgian Language Hyphenation
|
|
2
2
|
|
|
3
|
-
[](https://pypi.org/project/georgian-hyphenation/)
|
|
4
3
|
[](https://www.npmjs.com/package/georgian-hyphenation)
|
|
5
|
-
[](https://www.python.org/downloads/)
|
|
6
|
-
[](https://www.ecma-international.org/)
|
|
7
4
|
[](https://opensource.org/licenses/MIT)
|
|
8
|
-
[](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
|
|
6
|
+
[](https://www.npmjs.com/package/georgian-hyphenation)
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
Georgian Language Hyphenation Library - Fast, accurate syllabification for Georgian (ქართული) text with support for both browser and Node.js environments.
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
## Features
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
- ✅ **Accurate Georgian syllabification** based on phonetic rules
|
|
13
|
+
- ✅ **Harmonic consonant clusters** recognition (ბრ, გრ, კრ, etc.)
|
|
14
|
+
- ✅ **Gemination handling** (double consonant splitting)
|
|
15
|
+
- ✅ **Exception dictionary** for irregular words
|
|
16
|
+
- ✅ **Preserves compound word hyphens** (new in v2.2.6)
|
|
17
|
+
- ✅ **Browser + Node.js compatible** (ESM & CommonJS)
|
|
18
|
+
- ✅ **Zero dependencies**
|
|
19
|
+
- ✅ **Lightweight** (~5KB)
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## ✨ Features / ფუნქციები
|
|
19
|
-
|
|
20
|
-
### 📝 Microsoft Word Add-in / ვორდის დამატება
|
|
21
|
-
|
|
22
|
-
* **ავტომატური დამარცვლა:** მონიშნეთ სასურველი აბზაცი და პროგრამა თავად გადაწყვეტს, სად არის მართებული სიტყვის გაყოფა.
|
|
23
|
-
* **უხილავი დეფისები (Soft Hyphens):** პროგრამა იყენებს სპეციალურ კოდს (`\u00AD`), რაც იმას ნიშნავს, რომ დეფისი გამოჩნდება მხოლოდ მაშინ, როცა სიტყვა სტრიქონის ბოლოს მოხვდება. ეს ინარჩუნებს ტექსტის სისუფთავეს ძებნისა და კოპირების დროს.
|
|
24
|
-
* **ვიზუალური მოწესრიგება:** განსაკუთრებით სასარგებლოა "გასწორებული" (Justified) ტექსტისთვის — ის აქრობს დიდ და არალამაზ ცარიელ ადგილებს სიტყვებს შორის.
|
|
25
|
-
* **აკადემიური სიზუსტე:** ითვალისწინებს ქართული ენის ისეთ სირთულეებს, როგორიცაა თანხმოვანთა გროვები და ჰარმონიული წყვილები.
|
|
26
|
-
|
|
27
|
-
### 🌟 New in v2.2.4 (Documentation Update)
|
|
28
|
-
|
|
29
|
-
* **📝 Corrected Examples**: გამოსწორდა არასწორი მაგალითები დოკუმენტაციაში (მაგ: არასწორი "კლასსი" → წაშლილია).
|
|
30
|
-
* **📚 Python README**: განახლდა Python package-ის README სრული და ზუსტი დოკუმენტაციით.
|
|
31
|
-
* **✅ PyPI Update**: ხელახლა გამოქვეყნდა PyPI-ზე გასწორებული README-ით.
|
|
32
|
-
|
|
33
|
-
### 🌟 v2.2.1 Features
|
|
34
|
-
|
|
35
|
-
* **🧹 Automatic Sanitization**: ბიბლიოთეკა ავტომატურად ცნობს და შლის ტექსტში უკვე არსებულ დამარცვლის ნიშნებს (Soft-hyphens) დამუშავებამდე. ეს გამორიცხავს "ორმაგი დამარცვლის" შეცდომას.
|
|
36
|
-
* **📚 Dictionary Integration**: მხარდაჭერილია გამონაკლისების ლექსიკონი (`exceptions.json`), რომელიც პრიორიტეტულია ალგორითმთან შედარებით რთული სიტყვების დამუშავებისას.
|
|
37
|
-
* **⚡ High Performance**: ჰარმონიული ჯგუფების ძებნა ოპტიმიზირებულია `Set` სტრუქტურით, რაც უზრუნველყოფს მყისიერ დამუშავებას (O(1) complexity) დიდ ტექსტებზეც კი.
|
|
38
|
-
* **📦 Modern ESM**: სრული თავსებადობა თანამედროვე JavaScript სტანდარტებთან (`import/export`), რაც აადვილებს ინტეგრაციას Vite, React და Vue პროექტებში.
|
|
39
|
-
|
|
40
|
-
### 🎓 v2.2 Academic Logic (Linguistic Core)
|
|
41
|
-
|
|
42
|
-
* **🧠 Phonological Distance Analysis**: ხმოვნებს შორის მანძილის ჭკვიანი გაზომვა ზუსტი დამარცვლისთვის.
|
|
43
|
-
* **🛡️ Anti-Orphan Protection**: ხელს უშლის სიტყვის დასაწყისში ან ბოლოში ერთი ასოს მარტო დატოვებას (მინიმუმ 2 სიმბოლო თითოეულ მხარეს).
|
|
44
|
-
* **🎼 Harmonic Clusters Support**: სპეციალური წესები ქართული ჰარმონიული თანხმოვნებისთვის (მაგ: `ბრ`, `წვ`, `მთ`), რომლებიც დამარცვლისას არ იშლება.
|
|
45
|
-
* **🔄 Hiatus Handling**: ხმოვანთშერწყმის (V-V) სწორი დამუშავება (მაგ: `გა-ა-ნა-ლი-ზა`).
|
|
46
|
-
|
|
47
|
-
### 🚀 Integration & Flexibility
|
|
48
|
-
|
|
49
|
-
* ✅ **Multi-Platform**: ხელმისაწვდომია Python, JavaScript (Node & Browser), WordPress და Browser Extensions პლატფორმებისთვის.
|
|
50
|
-
* ✅ **Universal Formats**: მხარდაჭერილია Soft-hyphen (\u00AD), ვიზუალური ტირე, TeX patterns და Hunspell ფორმატები.
|
|
51
|
-
* ✅ **Zero Dependencies**: ბიბლიოთეკა არის სრულიად დამოუკიდებელი და მსუბუქი (~5KB).
|
|
52
|
-
* ✅ **Punctuation Aware**: ტექსტის დამუშავებისას ინარჩუნებს სასვენ ნიშნებს, ციფრებს და ლათინურ სიმბოლოებს.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## 🧠 Algorithm Logic / ალგორითმის ლოგიკა
|
|
57
|
-
|
|
58
|
-
ბიბლიოთეკა იყენებს აკადემიურ ფონოლოგიურ ანალიზს, რომელიც ეფუძნება ხმოვნებს შორის მანძილს და თანხმოვნების ტიპებს. v2.2 ვერსიაში დამატებულია წინასწარი გასუფთავების ფენა (Sanitization).
|
|
59
|
-
|
|
60
|
-
### 1. წინასწარი დამუშავება (Sanitization)
|
|
61
|
-
|
|
62
|
-
დამარცვლის დაწყებამდე სისტემა ასრულებს შემდეგ ნაბიჯებს:
|
|
63
|
-
|
|
64
|
-
* **Cleaning**: ტექსტიდან იშლება ყველა არსებული დამარცვლის სიმბოლო (`\u00AD` ან `-`), რათა თავიდან ავიცილოთ ორმაგი დამარცვლა.
|
|
65
|
-
* **Validation**: მოკლე სიტყვები (4 სიმბოლოზე ნაკლები) და სიტყვები ხმოვნების გარეშე ავტომატურად გამოიტოვება.
|
|
66
|
-
|
|
67
|
-
### 2. ხმოვანთა მანძილის ანალიზი
|
|
68
|
-
|
|
69
|
-
ალგორითმი პოულობს ხმოვნების ინდექსებს და ითვლის მანძილს მათ შორის:
|
|
70
|
-
|
|
71
|
-
* **V-V:** იყოფა ხმოვნებს შორის.
|
|
72
|
-
> მაგალითი: `გა-ა-ი-ა-რა-ღა`
|
|
73
|
-
|
|
74
|
-
* **V-C-V:** იყოფა პირველი ხმოვნის შემდეგ.
|
|
75
|
-
> მაგალითი: `მა-მა`, `დე-და`
|
|
76
|
-
|
|
77
|
-
* **V-CC-V:** სისტემა ამოწმებს თანხმოვნების ტიპს:
|
|
78
|
-
* **Double Consonants**: თუ გვერდიგვერდ ერთი და იგივე თანხმოვანია, იყოფა მათ შორის (იშვიათია ქართულში).
|
|
79
|
-
* **Harmonic Clusters**: თუ თანხმოვნები ქმნიან ჰარმონიულ წყვილს (მაგ: `ბრ`, `წვ`), ისინი რჩებიან ერთად და მარცვალი წყდება მათ წინ.
|
|
80
|
-
* **Default**: სხვა შემთხვევაში იყოფა პირველი თანხმოვნის შემდეგ.
|
|
21
|
+
## Installation
|
|
81
22
|
|
|
82
|
-
### 3. უსაფრთხოების წესები (Constraints)
|
|
83
|
-
|
|
84
|
-
* **Anti-Orphan**: მარცვალი არასდროს წყდება ისე, რომ რომელიმე მხარეს დარჩეს მხოლოდ 1 ასო.
|
|
85
|
-
* **Left/Right Min**: დამარცვლა ხდება მხოლოდ მაშინ, თუ ორივე მხარეს მინიმუმ 2 სიმბოლო რჩება (მაგ: `არა` არ დაიყოფა).
|
|
86
|
-
|
|
87
|
-
### მაგალითების ანალიზი:
|
|
88
|
-
|
|
89
|
-
| სიტყვა | ანალიზი (ხმოვნებს შორის) | შედეგი | წესი |
|
|
90
|
-
| --- | --- | --- | --- |
|
|
91
|
-
| **საქართველო** | `ა-ქ-რ-ე` (2 თანხმოვანი) | `სა-ქარ-თვე-ლო` | სტანდარტული |
|
|
92
|
-
| **ბარბი** | `ა-რ-ბ-ი` ('რ' წესი) | `ბარ-ბი` | სპეციალური 'რ' წესი |
|
|
93
|
-
| **მწვრთნელი** | `მ-წ-ვ-რ-თ-ნ-ე` | `მწვრთნე-ლი` | ჰარმონიული ჯგუფი |
|
|
94
|
-
| **გაანალიზება** | `ა-ა` (0 თანხმოვანი) | `გა-ა-ნა-ლი-ზე-ბა` | ხმოვანთშერწყმა |
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## 📦 Installation / ინსტალაცია
|
|
99
|
-
|
|
100
|
-
### Python
|
|
101
|
-
```bash
|
|
102
|
-
pip install georgian-hyphenation
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### JavaScript (NPM)
|
|
106
23
|
```bash
|
|
107
24
|
npm install georgian-hyphenation
|
|
108
25
|
```
|
|
109
26
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
**🦊 Firefox:** [Install from Firefox Add-ons](https://addons.mozilla.org/firefox/addon/georgian-hyphenation/)
|
|
113
|
-
|
|
114
|
-
**🌐 Chrome:** *Coming soon to Chrome Web Store*
|
|
115
|
-
|
|
116
|
-
### 📝 Microsoft Word Add-in / ვორდის დამატება
|
|
117
|
-
|
|
118
|
-
ვინაიდან Add-in ჯერ დეველოპმენტის ფაზაშია, მის ჩასართავად გამოიყენეთ "Sideloading" მეთოდი:
|
|
119
|
-
|
|
120
|
-
#### 1. საქაღალდის გაზიარება (Network Share)
|
|
121
|
-
1. შედით პროექტის ფოლდერში და იპოვნეთ საქაღალდე `word-addin`.
|
|
122
|
-
2. დააწკაპუნეთ მასზე მარჯვენა ღილაკით -> **Properties** -> **Sharing** -> **Share**.
|
|
123
|
-
3. დაამატეთ "Everyone" (ან თქვენი მომხმარებელი), მიეცით **Read/Write** უფლება და დააჭირეთ **Share**.
|
|
124
|
-
4. დააკოპირეთ მიღებული ქსელური მისამართი (მაგ: `\\თქვენი-კომპიუტერი\word-addin`).
|
|
125
|
-
|
|
126
|
-
#### 2. მისამართის დამატება Word-ში
|
|
127
|
-
1. გახსენით **Microsoft Word**.
|
|
128
|
-
2. გადადით: **File** -> **Options** -> **Trust Center** -> **Trust Center Settings...**.
|
|
129
|
-
3. მარცხენა მენიუში აირჩიეთ **Trusted Add-in Catalogs**.
|
|
130
|
-
4. **Catalog Url** ველში ჩასვით დაკოპირებული მისამართი და დააჭირეთ **Add Catalog**.
|
|
131
|
-
5. მონიშნეთ ოფცია **Show in Menu** და დააჭირეთ **OK**.
|
|
132
|
-
6. გადატვირთეთ Word-ი.
|
|
133
|
-
|
|
134
|
-
#### 3. დამატების გააქტიურება
|
|
135
|
-
1. Word-ში გადადით **Insert** ტაბზე -> **Get Add-ins** (ან My Add-ins).
|
|
136
|
-
2. ფანჯრის ზედა ნაწილში აირჩიეთ **Shared Folder**.
|
|
137
|
-
3. დაინახავთ "Georgian Hyphenation", მონიშნეთ და დააჭირეთ **Add**.
|
|
138
|
-
|
|
139
|
-
*ახლა "Home" ტაბზე გამოჩნდება ღილაკი "Georgian Hyphenator", რომელიც გახსნის სამუშაო პანელს.*
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## 📚 Documentation / დოკუმენტაცია
|
|
143
|
-
|
|
144
|
-
### Python API
|
|
145
|
-
```python
|
|
146
|
-
from georgian_hyphenation import GeorgianHyphenator
|
|
147
|
-
|
|
148
|
-
# Initialize with soft hyphen (default: U+00AD)
|
|
149
|
-
hyphenator = GeorgianHyphenator()
|
|
150
|
-
|
|
151
|
-
# Hyphenate a word
|
|
152
|
-
word = "საქართველო"
|
|
153
|
-
result = hyphenator.hyphenate(word)
|
|
154
|
-
print(result) # საქართველო (with U+00AD soft hyphens)
|
|
155
|
-
|
|
156
|
-
# Get syllables as a list
|
|
157
|
-
syllables = hyphenator.get_syllables(word)
|
|
158
|
-
print(syllables) # ['სა', 'ქარ', 'თვე', 'ლო']
|
|
27
|
+
## Usage
|
|
159
28
|
|
|
160
|
-
|
|
161
|
-
visible = GeorgianHyphenator('-')
|
|
162
|
-
print(visible.hyphenate(word)) # სა-ქარ-თვე-ლო
|
|
29
|
+
### ES Modules (Modern)
|
|
163
30
|
|
|
164
|
-
# Hyphenate entire text (preserves punctuation)
|
|
165
|
-
text = "საქართველო არის ლამაზი ქვეყანა."
|
|
166
|
-
print(hyphenator.hyphenate_text(text))
|
|
167
|
-
# Output: საქართველო არის ლამაზი ქვეყანა.
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## 📚 JavaScript API (v2.2.4+)
|
|
173
|
-
|
|
174
|
-
v2.2.4 ვერსია სრულად გადასულია **ES Modules (ESM)** სტანდარტზე, რაც უზრუნველყოფს საუკეთესო თავსებადობას თანამედროვე ხელსაწყოებთან (Vite, React, Vue, Next.js) და Node.js-ის ახალ ვერსიებთან.
|
|
175
|
-
|
|
176
|
-
### ⚙️ ინიციალიზაცია
|
|
177
31
|
```javascript
|
|
178
32
|
import GeorgianHyphenator from 'georgian-hyphenation';
|
|
179
33
|
|
|
180
|
-
// ნაგულისხმევი სიმბოლოა Soft-Hyphen (\u00AD)
|
|
181
34
|
const hyphenator = new GeorgianHyphenator();
|
|
182
35
|
|
|
183
|
-
//
|
|
184
|
-
|
|
185
|
-
|
|
36
|
+
// Basic hyphenation
|
|
37
|
+
console.log(hyphenator.hyphenate('საქართველო'));
|
|
38
|
+
// Output: საქართველო
|
|
186
39
|
|
|
187
|
-
|
|
40
|
+
// Get syllables as array
|
|
41
|
+
console.log(hyphenator.getSyllables('თბილისი'));
|
|
42
|
+
// Output: ['თბი', 'ლი', 'სი']
|
|
188
43
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
console.log(result); // "სა-ქარ-თვე-ლო"
|
|
44
|
+
// Hyphenate entire text
|
|
45
|
+
const text = 'საქართველო არის ძალიან ლამაზი ქვეყანა';
|
|
46
|
+
console.log(hyphenator.hyphenateText(text));
|
|
193
47
|
```
|
|
194
48
|
|
|
195
|
-
|
|
196
|
-
```javascript
|
|
197
|
-
const longText = "გამარჯობა, საქართველო მშვენიერი ქვეყანაა!";
|
|
198
|
-
console.log(hyphenator.hyphenateText(longText));
|
|
199
|
-
```
|
|
49
|
+
### CommonJS (Node.js)
|
|
200
50
|
|
|
201
|
-
#### 3. `getSyllables(word)`
|
|
202
51
|
```javascript
|
|
203
|
-
const
|
|
204
|
-
console.log(syllables); // ["უ", "ნი", "ვერ", "სი", "ტე", "ტი"]
|
|
205
|
-
```
|
|
52
|
+
const GeorgianHyphenator = require('georgian-hyphenation');
|
|
206
53
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
await hyphenator.loadDefaultLibrary();
|
|
210
|
-
console.log('ლექსიკონი ჩაიტვირთა');
|
|
54
|
+
const hyphenator = new GeorgianHyphenator();
|
|
55
|
+
console.log(hyphenator.hyphenate('კომპიუტერი'));
|
|
211
56
|
```
|
|
212
57
|
|
|
213
|
-
|
|
58
|
+
### Browser (CDN)
|
|
214
59
|
|
|
215
|
-
## 🌐 Browser Usage (CDN / ESM)
|
|
216
60
|
```html
|
|
217
|
-
<p class="hyphenated" id="content"></p>
|
|
218
|
-
|
|
219
61
|
<script type="module">
|
|
220
|
-
import GeorgianHyphenator from 'https://cdn.jsdelivr.net/npm/georgian-hyphenation@2.2.
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
await hyphenator.loadDefaultLibrary();
|
|
225
|
-
|
|
226
|
-
const text = "საქართველო არის ძალიან ლამაზი ქვეყანა, სადაც ბევრი ისტორიული ძეგლია.";
|
|
227
|
-
|
|
228
|
-
document.getElementById('content').textContent = hyphenator.hyphenateText(text);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
initializeHyphenator();
|
|
62
|
+
import GeorgianHyphenator from 'https://cdn.jsdelivr.net/npm/georgian-hyphenation@2.2.6/src/javascript/index.js';
|
|
63
|
+
|
|
64
|
+
const hyphenator = new GeorgianHyphenator();
|
|
65
|
+
console.log(hyphenator.hyphenate('პროგრამირება'));
|
|
232
66
|
</script>
|
|
233
67
|
```
|
|
234
68
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
## 🎨 Export Formats / ექსპორტის ფორმატები
|
|
69
|
+
Or without modules:
|
|
238
70
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
71
|
+
```html
|
|
72
|
+
<script src="https://cdn.jsdelivr.net/npm/georgian-hyphenation@2.2.6/src/javascript/index.js"></script>
|
|
73
|
+
<script>
|
|
74
|
+
const hyphenator = new GeorgianHyphenator();
|
|
75
|
+
console.log(hyphenator.hyphenate('საქართველო'));
|
|
76
|
+
</script>
|
|
245
77
|
```
|
|
246
78
|
|
|
247
|
-
|
|
248
|
-
```latex
|
|
249
|
-
\documentclass{article}
|
|
250
|
-
\usepackage{polyglossia}
|
|
251
|
-
\setmainlanguage{georgian}
|
|
252
|
-
\input{georgian-patterns.tex}
|
|
79
|
+
## API
|
|
253
80
|
|
|
254
|
-
|
|
255
|
-
საქართველო არის ძალიან ლამაზი ქვეყანა
|
|
256
|
-
\end{document}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Hunspell Dictionary
|
|
260
|
-
```python
|
|
261
|
-
from georgian_hyphenation import to_hunspell_format
|
|
81
|
+
### Constructor
|
|
262
82
|
|
|
263
|
-
|
|
264
|
-
|
|
83
|
+
```javascript
|
|
84
|
+
const hyphenator = new GeorgianHyphenator(hyphenChar = '\u00AD');
|
|
265
85
|
```
|
|
266
86
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
ეს დამატება საშუალებას გაძლევთ გამოიყენოთ ქართული ენის დამარცვლის აკადემიური სტანდარტი პირდაპირ Microsoft Word-ში.
|
|
271
|
-
|
|
272
|
-
### ძირითადი შესაძლებლობები:
|
|
273
|
-
* **აკადემიური სიზუსტე (v3.8.2)**: ალგორითმი ითვალისწინებს ქართული ენის რთულ კონსონანტურ ჯგუფებს და ფონეტიკურ წესებს.
|
|
274
|
-
* **უხილავი დამარცვლა (Soft Hyphens)**: იყენებს `\u00AD` სიმბოლოს, რაც უზრუნველყოფს ტექსტის სწორ გადანაწილებას ხაზებს შორის ისე, რომ დოკუმენტის სტრუქტურა და ძებნის ფუნქცია არ ზიანდება.
|
|
275
|
-
* **Task Pane ინტერფეისი**: მოსახერხებელი გვერდითა პანელი, რომელიც საშუალებას გაძლევთ ერთი დაწკაპუნებით დაამუშავოთ მონიშნული ტექსტი.
|
|
276
|
-
* **ფორმატირების შენარჩუნება**: Add-in მუშაობს Word-ის ობიექტურ მოდელთან, რაც გარანტიას იძლევა, რომ თქვენი ტექსტის სტილი, ფონტი და ზომა უცვლელი დარჩება.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
### 🌐 Browser Extension / ბრაუზერის გაფართოება
|
|
280
|
-
|
|
281
|
-
**Current Version: v2.2.4**
|
|
282
|
-
|
|
283
|
-
### Features:
|
|
284
|
-
|
|
285
|
-
* ✅ **v2.2.4 Update**: Critical CSS fix for visible soft hyphens
|
|
286
|
-
* ✅ **Automatic hyphenation** on all Georgian websites
|
|
287
|
-
* ✅ **CSS Injection**: Properly hides soft hyphens until line break
|
|
288
|
-
* ✅ **Smart Skip Logic**: Balanced detection - skips navigation, headers, buttons
|
|
289
|
-
* ✅ **Smart Justify**: Optional text alignment (Firefox only)
|
|
290
|
-
* ✅ **Dictionary Support**: 150+ exception words from CDN
|
|
291
|
-
* ✅ **Works everywhere**: Facebook, Twitter, Wikipedia, News sites
|
|
292
|
-
* ✅ **Toggle on/off** per site
|
|
293
|
-
* ✅ **Real-time statistics**: Words processed & hyphenated count
|
|
294
|
-
* ✅ **Zero performance impact**: Efficient O(1) harmonic cluster lookup
|
|
295
|
-
* ✅ **Dynamic content support**: React, Vue, Angular, AJAX
|
|
296
|
-
* ✅ **Respects editable fields**: No interference with typing
|
|
297
|
-
* ✅ **MutationObserver**: Automatically processes new content
|
|
298
|
-
|
|
299
|
-
### Installation:
|
|
300
|
-
|
|
301
|
-
**🦊 Firefox (Recommended):**
|
|
302
|
-
|
|
303
|
-
1. Visit [Firefox Add-ons](https://addons.mozilla.org/firefox/addon/georgian-hyphenation/)
|
|
304
|
-
2. Click "Add to Firefox"
|
|
305
|
-
3. Extension will auto-activate on Georgian websites
|
|
306
|
-
4. Click extension icon to toggle or view stats
|
|
307
|
-
|
|
308
|
-
**🌐 Chrome (Manual Install):**
|
|
309
|
-
|
|
310
|
-
1. Download [`georgian-hyphenation-chrome-v2.2.4.zip`](https://github.com/guramzhgamadze/georgian-hyphenation/releases)
|
|
311
|
-
2. Extract ZIP file
|
|
312
|
-
3. Open Chrome → `chrome://extensions/`
|
|
313
|
-
4. Enable "Developer mode" (top-right toggle)
|
|
314
|
-
5. Click "Load unpacked" → Select extracted folder
|
|
315
|
-
6. Extension is ready! ✅
|
|
316
|
-
|
|
317
|
-
### What's New in v2.2.4:
|
|
318
|
-
|
|
319
|
-
**🎨 Critical CSS Fix:**
|
|
320
|
-
- Fixed issue where soft hyphens were visible as dashes before line breaks
|
|
321
|
-
- Added CSS injection: `hyphens: manual`, `overflow-wrap: break-word`
|
|
322
|
-
- Properly hides `\u00AD` characters until browser line breaking
|
|
323
|
-
- Fixes font rendering issues across different websites
|
|
324
|
-
|
|
325
|
-
**🎯 Balanced Skip Logic:**
|
|
326
|
-
- Skips: `<nav>`, `<header>`, `<footer>`, `<h1-h6>`, `<button>`, large fonts (>20px)
|
|
327
|
-
- Processes: Paragraph text, article content, descriptions
|
|
328
|
-
- 5-level ancestor check (optimized from 15 levels)
|
|
329
|
-
- Removed overly restrictive content container detection
|
|
330
|
-
|
|
331
|
-
**⚡ Performance:**
|
|
332
|
-
- Embedded NPM v2.2.4 library (no external dependencies)
|
|
333
|
-
- O(1) harmonic cluster lookup with Set structure
|
|
334
|
-
- Efficient DOM traversal with depth limits
|
|
335
|
-
- Throttled processing (1000ms cooldown)
|
|
336
|
-
|
|
337
|
-
**🧹 Other Improvements:**
|
|
338
|
-
- Automatic sanitization of old hyphens
|
|
339
|
-
- CSS removal on extension disable
|
|
340
|
-
- Better console logging for debugging
|
|
341
|
-
- MutationObserver for dynamic content
|
|
342
|
-
|
|
343
|
-
### Browser Compatibility:
|
|
344
|
-
|
|
345
|
-
* ✅ **Firefox** 109+ (Manifest v2)
|
|
346
|
-
* ✅ **Chrome** 88+ (Manifest v3)
|
|
87
|
+
**Parameters:**
|
|
88
|
+
- `hyphenChar` (optional): Character to use for hyphenation. Default is soft hyphen (`\u00AD`)
|
|
347
89
|
|
|
348
|
-
###
|
|
90
|
+
### Methods
|
|
349
91
|
|
|
350
|
-
|
|
351
|
-
1. Visit any Georgian website (e.g., formulanews.ge, interpressnews.ge)
|
|
352
|
-
2. Extension auto-processes text content
|
|
353
|
-
3. Click extension icon to:
|
|
354
|
-
- Toggle hyphenation on/off
|
|
355
|
-
- Toggle Smart Justify (Firefox only)
|
|
356
|
-
- View statistics (words processed/hyphenated)
|
|
92
|
+
#### `hyphenate(word)`
|
|
357
93
|
|
|
358
|
-
|
|
359
|
-
- Open Browser Console (F12)
|
|
360
|
-
- Look for logs: `🇬🇪 GH v2.2.4: ...`
|
|
361
|
-
- Check processing stats and any errors
|
|
94
|
+
Hyphenates a single word.
|
|
362
95
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
- Solution: v2.2.4 fixes this! Update to latest version.
|
|
367
|
-
|
|
368
|
-
**Problem: Not hyphenating on some sites**
|
|
369
|
-
- Check Console (F12) for "Skipping blacklisted site" message
|
|
370
|
-
- Blacklisted: claude.ai, chat.openai.com, gemini.google.com
|
|
371
|
-
|
|
372
|
-
**Problem: Extension not loading**
|
|
373
|
-
- Refresh page after installation
|
|
374
|
-
- Check extension is enabled in browser settings
|
|
375
|
-
- Review Console for error messages
|
|
376
|
-
|
|
377
|
-
---
|
|
378
|
-
|
|
379
|
-
## 🔌 WordPress Plugin
|
|
380
|
-
|
|
381
|
-
**Current Version: v2.2.4**
|
|
382
|
-
|
|
383
|
-
### Features:
|
|
384
|
-
|
|
385
|
-
* ✅ **v2.2.4 Update**: Browser-compatible ESM module loading with type="module"
|
|
386
|
-
* ✅ **Dictionary Support**: 150+ exception words for edge cases (optional)
|
|
387
|
-
* ✅ **Automatic Sanitization**: Strips old hyphens before re-processing
|
|
388
|
-
* ✅ **Full Elementor support** with individual widget controls
|
|
389
|
-
* ✅ **Modern UI** with Red/Green switches
|
|
390
|
-
* ✅ **Smart Fallback** (automatically finds content)
|
|
391
|
-
* ✅ **Custom CSS selectors** with helper guide
|
|
392
|
-
* ✅ **Auto-justify option**
|
|
393
|
-
* ✅ **Real-time configuration preview**
|
|
394
|
-
* ✅ **Debug console logging**
|
|
395
|
-
* ✅ **MutationObserver** for dynamic content (AJAX, Load More)
|
|
396
|
-
* ✅ **Zero performance impact**
|
|
397
|
-
|
|
398
|
-
### Installation:
|
|
399
|
-
|
|
400
|
-
**From WordPress.org:** *(Coming soon)*
|
|
401
|
-
|
|
402
|
-
**Manual Installation:**
|
|
403
|
-
|
|
404
|
-
1. Download **`georgian-hyphenation-wp-2.2.4.zip`**
|
|
405
|
-
2. WordPress Admin → Plugins → Add New → Upload Plugin
|
|
406
|
-
3. Choose ZIP file and click "Install Now"
|
|
407
|
-
4. Activate the plugin
|
|
408
|
-
5. Go to **"Geo Hyphenation"** in the main left sidebar menu
|
|
409
|
-
|
|
410
|
-
### Configuration:
|
|
411
|
-
|
|
412
|
-
**Admin Menu → Geo Hyphenation**
|
|
413
|
-
|
|
414
|
-
1. **Enable Hyphenation** - Main on/off toggle
|
|
415
|
-
2. **Dictionary Support** (NEW) - Load 150+ exception words from CDN
|
|
416
|
-
3. **Elementor Widgets** - Individual controls:
|
|
417
|
-
* Text Editor Widget (`.elementor-text-editor`, `.elementor-widget-container p`)
|
|
418
|
-
* Heading Widget (`.elementor-heading-title`)
|
|
419
|
-
* Icon Box Widget (`.elementor-icon-box-description`)
|
|
420
|
-
* Testimonial Widget (`.elementor-testimonial-content`)
|
|
421
|
-
* Accordion/Tabs/Toggle (`.elementor-accordion-content`, etc.)
|
|
422
|
-
|
|
423
|
-
4. **Additional CSS Selectors** - Add custom selectors:
|
|
424
|
-
```
|
|
425
|
-
article p, .entry-content p, .my-custom-class
|
|
96
|
+
```javascript
|
|
97
|
+
hyphenator.hyphenate('საქართველო');
|
|
98
|
+
// Returns: 'საქართველო'
|
|
426
99
|
```
|
|
427
100
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
### Requirements:
|
|
431
|
-
|
|
432
|
-
* WordPress 5.0+
|
|
433
|
-
* PHP 7.0+
|
|
434
|
-
* Works with or without Elementor
|
|
435
|
-
* Modern browser with ES Module support
|
|
101
|
+
#### `getSyllables(word)`
|
|
436
102
|
|
|
437
|
-
|
|
103
|
+
Returns an array of syllables.
|
|
438
104
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
* ✅ Classic Editor
|
|
443
|
-
* ✅ WooCommerce
|
|
444
|
-
* ✅ Multisite
|
|
445
|
-
|
|
446
|
-
### Debugging:
|
|
447
|
-
|
|
448
|
-
Open browser console (F12) to see detailed logs:
|
|
449
|
-
```log
|
|
450
|
-
🇬🇪 GH v2.2.4: 🚀 Initializing...
|
|
451
|
-
🇬🇪 GH v2.2.4: 📋 Elements found: 12
|
|
452
|
-
🇬🇪 GH v2.2.4: 📚 Dictionary loaded
|
|
453
|
-
🇬🇪 GH v2.2.4: ✅ Processed 12 elements
|
|
105
|
+
```javascript
|
|
106
|
+
hyphenator.getSyllables('თბილისი');
|
|
107
|
+
// Returns: ['თბი', 'ლი', 'სი']
|
|
454
108
|
```
|
|
455
109
|
|
|
456
|
-
|
|
110
|
+
#### `hyphenateText(text)`
|
|
457
111
|
|
|
458
|
-
|
|
459
|
-
* 📚 **Dictionary Support**: Optional CDN loading of 150+ exception words
|
|
460
|
-
* 🧹 **Auto Sanitization**: Built-in cleaning of old hyphens before processing
|
|
461
|
-
* ⚡ **Performance**: O(1) harmonic cluster lookup with Set structure
|
|
462
|
-
* 🎯 **Hybrid Engine**: Dictionary-first, algorithm fallback
|
|
112
|
+
Hyphenates all words in a text string.
|
|
463
113
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
**🎨 Critical CSS Fix:**
|
|
469
|
-
* Fixed visible soft hyphens issue - hyphens now properly hidden until line break
|
|
470
|
-
* Added comprehensive CSS injection for proper hyphenation rendering
|
|
471
|
-
* Fixed font-feature-settings conflicts
|
|
114
|
+
```javascript
|
|
115
|
+
hyphenator.hyphenateText('საქართველო არის ლამაზი');
|
|
116
|
+
// Returns: 'საქართველო არის ლამაზი'
|
|
117
|
+
```
|
|
472
118
|
|
|
473
|
-
|
|
474
|
-
* Optimized skip detection: fontSize > 20px (from 16px)
|
|
475
|
-
* 5-level ancestor check (optimized from 15 levels)
|
|
476
|
-
* Removed restrictive content container requirement
|
|
477
|
-
* Better navigation/header/button detection
|
|
119
|
+
#### `loadLibrary(data)`
|
|
478
120
|
|
|
479
|
-
|
|
480
|
-
* Embedded NPM v2.2.4 library code
|
|
481
|
-
* O(1) harmonic cluster lookup
|
|
482
|
-
* Efficient DOM traversal
|
|
483
|
-
* Throttled processing
|
|
121
|
+
Load custom exception dictionary.
|
|
484
122
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
123
|
+
```javascript
|
|
124
|
+
const customWords = {
|
|
125
|
+
'განათლება': 'გა-ნათ-ლე-ბა',
|
|
126
|
+
'უნივერსიტეტი': 'უ-ნი-ვერ-სი-ტე-ტი'
|
|
127
|
+
};
|
|
490
128
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
* Smart Justify toggle in UI
|
|
494
|
-
* browser.storage.sync for settings
|
|
495
|
-
* Auto-injection on page load
|
|
129
|
+
hyphenator.loadLibrary(customWords);
|
|
130
|
+
```
|
|
496
131
|
|
|
497
|
-
|
|
132
|
+
#### `async loadDefaultLibrary()`
|
|
498
133
|
|
|
499
|
-
|
|
134
|
+
Load the default exception dictionary (browser only, requires network).
|
|
500
135
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
* ⚡ **Performance**: O(1) harmonic cluster lookup with Set structure
|
|
136
|
+
```javascript
|
|
137
|
+
await hyphenator.loadDefaultLibrary();
|
|
138
|
+
```
|
|
505
139
|
|
|
506
|
-
|
|
140
|
+
## Custom Hyphen Character
|
|
507
141
|
|
|
508
|
-
|
|
142
|
+
You can use any character for hyphenation:
|
|
509
143
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
144
|
+
```javascript
|
|
145
|
+
// Visible hyphen
|
|
146
|
+
const hyphenator = new GeorgianHyphenator('-');
|
|
147
|
+
console.log(hyphenator.hyphenate('საქართველო'));
|
|
148
|
+
// Output: 'სა-ქარ-თვე-ლო'
|
|
149
|
+
|
|
150
|
+
// Custom separator
|
|
151
|
+
const hyphenator2 = new GeorgianHyphenator('•');
|
|
152
|
+
console.log(hyphenator2.hyphenate('საქართველო'));
|
|
153
|
+
// Output: 'სა•ქარ•თვე•ლო'
|
|
154
|
+
```
|
|
513
155
|
|
|
514
|
-
|
|
156
|
+
## Compound Words (v2.2.6+)
|
|
515
157
|
|
|
516
|
-
|
|
158
|
+
The library now preserves existing hyphens in compound words:
|
|
517
159
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
* ⚡ **Optimization**: Set-based harmonic cluster lookup
|
|
522
|
-
* 🛠 **Package Improvements**: განახლებული package.json
|
|
523
|
-
---
|
|
160
|
+
```javascript
|
|
161
|
+
hyphenator.hyphenate('მაგ-რამ');
|
|
162
|
+
// Preserves the hyphen: 'მაგ-რამ'
|
|
524
163
|
|
|
525
|
-
|
|
164
|
+
hyphenator.hyphenate('ხელ-ფეხი');
|
|
165
|
+
// Preserves the hyphen: 'ხელ-ფეხი'
|
|
166
|
+
```
|
|
526
167
|
|
|
527
|
-
|
|
168
|
+
## CSS Integration
|
|
528
169
|
|
|
529
|
-
|
|
170
|
+
Use soft hyphens for automatic line breaking:
|
|
530
171
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
172
|
+
```css
|
|
173
|
+
.georgian-text {
|
|
174
|
+
hyphens: auto;
|
|
175
|
+
-webkit-hyphens: auto;
|
|
176
|
+
-ms-hyphens: auto;
|
|
177
|
+
}
|
|
178
|
+
```
|
|
536
179
|
|
|
537
|
-
|
|
180
|
+
```javascript
|
|
181
|
+
const hyphenator = new GeorgianHyphenator('\u00AD'); // soft hyphen
|
|
182
|
+
document.querySelector('.georgian-text').innerHTML =
|
|
183
|
+
hyphenator.hyphenateText('თქვენი ტექსტი აქ');
|
|
184
|
+
```
|
|
538
185
|
|
|
539
|
-
##
|
|
186
|
+
## Algorithm
|
|
540
187
|
|
|
541
|
-
|
|
542
|
-
| --- | --- | --- | --- |
|
|
543
|
-
| საქართველო | სა, ქარ, თვე, ლო | სა-ქარ-თვე-ლო | .სა1ქარ1თვე1ლო. |
|
|
544
|
-
| მთავრობა | მთავ, რო, ბა | მთავ-რო-ბა | .მთავ1რო1ბა. |
|
|
545
|
-
| დედაქალაქი | დე, და, ქა, ლა, ქი | დე-და-ქა-ლა-ქი | .დე1და1ქა1ლა1ქი. |
|
|
546
|
-
| ბლოკი | ბლო, კი | ბლო-კი | .ბლო1კი. |
|
|
547
|
-
| კრემი | კრე, მი | კრე-მი | .კრე1მი. |
|
|
548
|
-
| ტელევიზორი | ტე, ლე, ვი, ზო, რი | ტე-ლე-ვი-ზო-რი | .ტე1ლე1ვი1ზო1რი. |
|
|
549
|
-
| უნივერსიტეტი | უ, ნი, ვერ, სი, ტე, ტი | უ-ნი-ვერ-სი-ტე-ტი | .უ1ნი1ვერ1სი1ტე1ტი. |
|
|
188
|
+
The library uses a phonetic algorithm based on Georgian syllable structure:
|
|
550
189
|
|
|
551
|
-
|
|
190
|
+
1. **Vowel Detection**: Identifies vowels (ა, ე, ი, ო, უ)
|
|
191
|
+
2. **Consonant Cluster Analysis**: Recognizes 70+ harmonic clusters
|
|
192
|
+
3. **Gemination Rules**: Splits double consonants (კკ → კკ)
|
|
193
|
+
4. **Orphan Prevention**: Ensures minimum syllable length (2 characters)
|
|
552
194
|
|
|
553
|
-
|
|
554
|
-
```bash
|
|
555
|
-
# Python tests
|
|
556
|
-
python test_python.py
|
|
195
|
+
### Supported Harmonic Clusters
|
|
557
196
|
|
|
558
|
-
|
|
559
|
-
|
|
197
|
+
```
|
|
198
|
+
ბლ, ბრ, ბღ, ბზ, გდ, გლ, გმ, გნ, გვ, გზ, გრ, დრ, თლ, თრ, თღ,
|
|
199
|
+
კლ, კმ, კნ, კრ, კვ, მტ, პლ, პრ, ჟღ, რგ, რლ, რმ, სწ, სხ, ტკ,
|
|
200
|
+
ტპ, ტრ, ფლ, ფრ, ფქ, ფშ, ქლ, ქნ, ქვ, ქრ, ღლ, ღრ, ყლ, ყრ, შთ,
|
|
201
|
+
შპ, ჩქ, ჩრ, ცლ, ცნ, ცრ, ცვ, ძგ, ძვ, ძღ, წლ, წრ, წნ, წკ, ჭკ,
|
|
202
|
+
ჭრ, ჭყ, ხლ, ხმ, ხნ, ხვ, ჯგ
|
|
560
203
|
```
|
|
561
204
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
* ✅ 10,000+ Georgian words validated
|
|
565
|
-
* ✅ Edge cases (V-V, consonant clusters, short words)
|
|
566
|
-
* ✅ Unicode handling
|
|
567
|
-
* ✅ Punctuation preservation
|
|
568
|
-
* ✅ Performance benchmarks
|
|
205
|
+
## Browser Support
|
|
569
206
|
|
|
570
|
-
|
|
207
|
+
- ✅ Chrome/Edge 90+
|
|
208
|
+
- ✅ Firefox 88+
|
|
209
|
+
- ✅ Safari 14+
|
|
210
|
+
- ✅ Node.js 14+
|
|
571
211
|
|
|
572
|
-
##
|
|
212
|
+
## Performance
|
|
573
213
|
|
|
574
|
-
|
|
214
|
+
- Average hyphenation speed: **~0.05ms per word**
|
|
215
|
+
- Memory usage: **~50KB with dictionary loaded**
|
|
216
|
+
- Optimized with `Set` for O(1) cluster lookups
|
|
575
217
|
|
|
576
|
-
|
|
218
|
+
## Examples
|
|
577
219
|
|
|
578
|
-
|
|
579
|
-
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
580
|
-
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
581
|
-
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
582
|
-
5. Open a Pull Request
|
|
220
|
+
### E-book Reader
|
|
583
221
|
|
|
584
|
-
|
|
222
|
+
```javascript
|
|
223
|
+
const hyphenator = new GeorgianHyphenator();
|
|
585
224
|
|
|
586
|
-
|
|
225
|
+
function formatText(text) {
|
|
226
|
+
return hyphenator.hyphenateText(text);
|
|
227
|
+
}
|
|
587
228
|
|
|
588
|
-
|
|
229
|
+
document.getElementById('content').innerHTML = formatText(bookText);
|
|
230
|
+
```
|
|
589
231
|
|
|
590
|
-
|
|
591
|
-
* 📚 **Dictionary Support**: Optional CDN loading of 150+ exception words
|
|
592
|
-
* 🧹 **Auto Sanitization**: Built-in cleaning of old hyphens before processing
|
|
593
|
-
* ⚡ **Performance**: O(1) harmonic cluster lookup with Set structure
|
|
232
|
+
### Text Justification
|
|
594
233
|
|
|
595
|
-
|
|
234
|
+
```javascript
|
|
235
|
+
const hyphenator = new GeorgianHyphenator('\u00AD');
|
|
596
236
|
|
|
597
|
-
|
|
237
|
+
const justified = hyphenator.hyphenateText(
|
|
238
|
+
'საქართველო არის ერთ-ერთი უძველესი ქვეყანა მსოფლიოში'
|
|
239
|
+
);
|
|
240
|
+
```
|
|
598
241
|
|
|
599
|
-
|
|
600
|
-
* 📚 **Python README**: განახლდა Python package-ის README სრული დოკუმენტაციით და გასწორებული მაგალითებით.
|
|
601
|
-
* ✅ **PyPI v2.2.2**: ხელახლა გამოქვეყნდა PyPI-ზე გასწორებული დოკუმენტაციით.
|
|
242
|
+
### Dynamic Typography
|
|
602
243
|
|
|
603
|
-
|
|
244
|
+
```javascript
|
|
245
|
+
const hyphenator = new GeorgianHyphenator('·');
|
|
246
|
+
const syllables = hyphenator.getSyllables('პროგრამირება');
|
|
247
|
+
|
|
248
|
+
syllables.forEach((syllable, i) => {
|
|
249
|
+
setTimeout(() => {
|
|
250
|
+
console.log(syllable);
|
|
251
|
+
}, i * 200);
|
|
252
|
+
});
|
|
253
|
+
```
|
|
604
254
|
|
|
605
|
-
|
|
255
|
+
## Changelog
|
|
606
256
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
* 🛠 **Package Improvements**: განახლდა `package.json` კონფიგურაცია (`exports`, `files` whitelist) NPM-ისთვის.
|
|
257
|
+
### v2.2.6 (2026-01-30)
|
|
258
|
+
- ✨ Preserves regular hyphens in compound words
|
|
259
|
+
- 🐛 Fixed hyphen stripping to only remove soft hyphens and zero-width spaces
|
|
260
|
+
- 📝 Improved documentation
|
|
612
261
|
|
|
613
|
-
|
|
262
|
+
### Version 2.2.4 (2026-01-27)
|
|
614
263
|
|
|
615
|
-
|
|
264
|
+
* 🌐 **Browser Fix**: Fixed CDN URL for reliable dictionary loading
|
|
265
|
+
* 📦 **NPM Files**: Added `data/` folder to published package (`files` whitelist)
|
|
266
|
+
* 🔧 **Error Handling**: Improved fallback when dictionary unavailable
|
|
267
|
+
* 📝 **Documentation**: Corrected examples, removed non-existent words
|
|
616
268
|
|
|
617
|
-
|
|
618
|
-
* პარამეტრები გადავიდა მთავარ მენიუში (Top-Level Menu) შესაბამისი აიკონით.
|
|
619
|
-
* დაემატა თანამედროვე Red/Green UI გადამრთველები (Switches).
|
|
620
|
-
* **Smart Fallback**: დაემატა სელექტორების ავტომატური მოძებნის ლოგიკა.
|
|
621
|
-
* **Helper Text**: დაემატა დეტალური ინსტრუქციები Custom CSS სელექტორების გამოსაყენებლად.
|
|
269
|
+
### Version 2.2.1 (2026-01-26)
|
|
622
270
|
|
|
623
|
-
|
|
271
|
+
* 🧹 **Sanitization**: Added `_stripHyphens` for automatic input cleaning
|
|
272
|
+
* ⚡ **Performance**: Converted `harmonicClusters` to `Set` (O(1) lookup)
|
|
273
|
+
* 📦 **ESM**: Full ES Modules support
|
|
274
|
+
* 📚 **Dictionary**: Added `loadDefaultLibrary()` method
|
|
624
275
|
|
|
625
276
|
### Version 2.0.1 (2026-01-22)
|
|
626
277
|
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
|
|
631
|
-
---
|
|
632
|
-
|
|
633
|
-
### Version 2.0.0 (2026-01-21) — Academic Logic v2.0 🎉
|
|
634
|
-
|
|
635
|
-
* ✅ **Major Algorithm Rewrite**: დაინერგა აკადემიური ფონოლოგიური დისტანციის ანალიზი.
|
|
636
|
-
* 🛡️ **Anti-Orphan Protection**: მინიმუმ 2 სიმბოლოს შენარჩუნება მარცვლის ორივე მხარეს.
|
|
637
|
-
* 🎼 **'R' Rule**: სპეციალური ლოგიკა 'რ' თანხმოვნის შემცველი ჯგუფებისთვის.
|
|
638
|
-
* 🔄 **Hiatus Detection**: ხმოვანთშერწყმის (V-V) სწორი დამარცვლა.
|
|
639
|
-
* 📈 **Accuracy**: სიზუსტე გაიზარდა **98%+**-მდე (ვალიდირებულია 10,000+ სიტყვაზე).
|
|
640
|
-
* 🏗️ **Packaging**: დაემატა `pyproject.toml` მხარდაჭერა Python-ისთვის.
|
|
641
|
-
|
|
642
|
-
---
|
|
643
|
-
|
|
644
|
-
## 🗺️ Roadmap / სამომავლო გეგმები
|
|
645
|
-
|
|
646
|
-
### Short-term (2026 Q1)
|
|
278
|
+
* 🎓 **Academic Rewrite**: Phonological distance analysis
|
|
279
|
+
* 🛡️ **Anti-Orphan**: Minimum 2 characters on each side
|
|
280
|
+
* 🎼 **Harmonic Clusters**: Georgian-specific consonant groups
|
|
647
281
|
|
|
648
|
-
|
|
649
|
-
* ✅ PyPI v2.2.2 release - **DONE**
|
|
650
|
-
* ✅ NPM v2.2.4 release - **DONE**
|
|
651
|
-
* ✅ Firefox Extension v2.2.4 - **DONE**
|
|
652
|
-
* ✅ Chrome Extension v2.2.4 - **DONE**
|
|
653
|
-
* ✅ WordPress Plugin v2.2.4 - **DONE**
|
|
654
|
-
* 🔄 Chrome Web Store submission
|
|
282
|
+
## Contributing
|
|
655
283
|
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
* 📄 Submit to TeX Live hyphenation database
|
|
659
|
-
* 📚 Academic paper publication
|
|
660
|
-
* 🎨 Adobe InDesign plugin
|
|
661
|
-
* 📊 Microsoft Word add-in
|
|
662
|
-
|
|
663
|
-
### Long-term (2027+)
|
|
664
|
-
|
|
665
|
-
* 🌍 Unicode CLDR proposal
|
|
666
|
-
* 🏛️ Official endorsement (Georgian Language Institute)
|
|
667
|
-
* 🤖 Integration into major OS (Windows, macOS, iOS, Android)
|
|
668
|
-
* 🌐 Browser native support proposal
|
|
669
|
-
|
|
670
|
-
---
|
|
671
|
-
|
|
672
|
-
## 📄 License / ლიცენზია
|
|
284
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
673
285
|
|
|
674
|
-
|
|
286
|
+
## License
|
|
675
287
|
|
|
676
|
-
|
|
288
|
+
MIT © [Guram Zhgamadze](https://github.com/guramzhgamadze)
|
|
677
289
|
|
|
678
|
-
##
|
|
290
|
+
## Author
|
|
679
291
|
|
|
680
292
|
**Guram Zhgamadze**
|
|
293
|
+
- GitHub: [@guramzhgamadze](https://github.com/guramzhgamadze)
|
|
294
|
+
- Email: guramzhgamadze@gmail.com
|
|
681
295
|
|
|
682
|
-
|
|
683
|
-
* 📧 Email: guramzhgamadze@gmail.com
|
|
684
|
-
* 🐛 Issues: [Report bugs or request features](https://github.com/guramzhgamadze/georgian-hyphenation/issues)
|
|
685
|
-
|
|
686
|
-
---
|
|
687
|
-
|
|
688
|
-
## 🙏 Acknowledgments / მადლობა
|
|
296
|
+
## Related
|
|
689
297
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
* Thanks to the Georgian linguistic community
|
|
693
|
-
* Special thanks to early testers and contributors
|
|
694
|
-
|
|
695
|
-
---
|
|
696
|
-
|
|
697
|
-
## 📚 References / ლიტერატურა
|
|
698
|
-
|
|
699
|
-
* Georgian Language Phonology and Syllable Structure
|
|
700
|
-
* TeX Hyphenation Algorithm (Liang, Franklin Mark. 1983)
|
|
701
|
-
* Hunspell Hyphenation Documentation
|
|
702
|
-
* Unicode Standard for Georgian Script (U+10A0–U+10FF)
|
|
703
|
-
* CLDR Language Data
|
|
704
|
-
|
|
705
|
-
---
|
|
706
|
-
|
|
707
|
-
## 🔗 Links / ლინკები
|
|
708
|
-
|
|
709
|
-
* 🐍 **PyPI:** https://pypi.org/project/georgian-hyphenation/
|
|
710
|
-
* 📦 **NPM:** https://www.npmjs.com/package/georgian-hyphenation
|
|
711
|
-
* 🦊 **Firefox:** https://addons.mozilla.org/firefox/addon/georgian-hyphenation/
|
|
712
|
-
* 🎨 **Demo:** https://guramzhgamadze.github.io/georgian-hyphenation/
|
|
713
|
-
* 📖 **Documentation:** [GitHub Wiki](https://github.com/guramzhgamadze/georgian-hyphenation/wiki)
|
|
298
|
+
- [Georgian Language Resources](https://www.omniglot.com/writing/georgian.htm)
|
|
299
|
+
- [Unicode Georgian Range](https://unicode.org/charts/PDF/U10A0.pdf)
|
|
714
300
|
|
|
715
301
|
---
|
|
716
302
|
|
|
717
303
|
Made with ❤️ for the Georgian language community
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Save this as `README.md` in your package root directory, then:
|
|
718
307
|
|
|
719
|
-
|
|
308
|
+
```bash
|
|
309
|
+
git add README.md
|
|
310
|
+
git commit -m "Add comprehensive README"
|
|
311
|
+
git push
|
|
312
|
+
npm publish
|
|
313
|
+
```
|
|
720
314
|
|
|
721
|
-
|
|
315
|
+
This README includes everything users need to know about your package! 🚀
|
package/package.json
CHANGED
package/src/javascript/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Georgian Hyphenation Library v2.2.
|
|
2
|
+
* Georgian Hyphenation Library v2.2.6
|
|
3
3
|
* Node.js CommonJS Compatible
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -44,9 +44,9 @@ class GeorgianHyphenator {
|
|
|
44
44
|
const data = require('../../data/exceptions.json');
|
|
45
45
|
this.loadLibrary(data);
|
|
46
46
|
this.dictionaryLoaded = true;
|
|
47
|
-
console.log(`Georgian Hyphenation v2.2.
|
|
47
|
+
console.log(`Georgian Hyphenation v2.2.6: Dictionary loaded (${this.dictionary.size} words)`);
|
|
48
48
|
} catch (error) {
|
|
49
|
-
console.warn('Georgian Hyphenation v2.2.
|
|
49
|
+
console.warn('Georgian Hyphenation v2.2.6: Local dictionary not found, using algorithm only');
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
package/src/javascript/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Georgian Hyphenation Library v2.2.
|
|
2
|
+
* Georgian Hyphenation Library v2.2.6
|
|
3
3
|
* Browser + Node.js Compatible (ES Module)
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -54,7 +54,7 @@ export default class GeorgianHyphenator {
|
|
|
54
54
|
if (typeof window !== 'undefined' && typeof fetch !== 'undefined') {
|
|
55
55
|
try {
|
|
56
56
|
// ✅ სწორი CDN URL - jsdelivr უფრო სანდოა unpkg-ზე
|
|
57
|
-
const response = await fetch('https://cdn.jsdelivr.net/npm/georgian-hyphenation@2.2.
|
|
57
|
+
const response = await fetch('https://cdn.jsdelivr.net/npm/georgian-hyphenation@2.2.6/data/exceptions.json');
|
|
58
58
|
|
|
59
59
|
if (!response.ok) {
|
|
60
60
|
throw new Error(`HTTP ${response.status}`);
|
|
@@ -64,9 +64,9 @@ export default class GeorgianHyphenator {
|
|
|
64
64
|
this.loadLibrary(data);
|
|
65
65
|
this.dictionaryLoaded = true;
|
|
66
66
|
|
|
67
|
-
console.log(`Georgian Hyphenation v2.2.
|
|
67
|
+
console.log(`Georgian Hyphenation v2.2.6: Dictionary loaded (${this.dictionary.size} words)`);
|
|
68
68
|
} catch (error) {
|
|
69
|
-
console.warn('Georgian Hyphenation v2.2.
|
|
69
|
+
console.warn('Georgian Hyphenation v2.2.6: Dictionary not available, using algorithm only');
|
|
70
70
|
console.warn('Error:', error.message);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -78,9 +78,9 @@ export default class GeorgianHyphenator {
|
|
|
78
78
|
const data = module.default;
|
|
79
79
|
this.loadLibrary(data);
|
|
80
80
|
this.dictionaryLoaded = true;
|
|
81
|
-
console.log(`Georgian Hyphenation v2.2.
|
|
81
|
+
console.log(`Georgian Hyphenation v2.2.6: Dictionary loaded (${this.dictionary.size} words)`);
|
|
82
82
|
} catch (error) {
|
|
83
|
-
console.warn('Georgian Hyphenation v2.2.
|
|
83
|
+
console.warn('Georgian Hyphenation v2.2.6: Local dictionary not found, using algorithm only');
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|