|
1 | 1 | # AsoSoft Library (Python)
|
2 |
| -AsoSoft Library offers basic natural language processing (NLP) algorithms for the Kurdish Language (ckb: Central branch of Kurdish). |
3 |
| -AsoSoft Library is originally written in C# and this library is the Python port. |
4 |
| -- **Grapheme-to-Phoneme (G2P) converter and Transliteration**: converts Kurdish text into syllabified phoneme string. Also transliterates Kurdish texts from Arabic script into Latin script and vice versa. |
| 2 | +AsoSoft Library offers the following natural language processing (NLP) algorithms for the Kurdish Language (ckb: Central branch of Kurdish): |
| 3 | +- **Grapheme-to-Phoneme (G2P) converter and Transliterator**: converts Kurdish text into syllabified phoneme string. Also transliterates Kurdish texts from Arabic script into Latin script and vice versa. |
5 | 4 | - **Normalizer**: normalizes the Kurdish text and punctuation marks, unifies numerals, replaces Html Entities, extracts and replaces URLs and emails, and more.
|
6 | 5 | - **Numeral Converter**: converts any type of numbers into Kurdish words.
|
7 | 6 | - **Sort**: Sorts a list in correct Kurdish alphabet order.
|
8 |
| -- **Poem Meter Classifier**: Classifies the meter of the input Kurdish poem |
| 7 | +- **Poem Meter Classifier**: Classifies the meter of the input Kurdish poem |
| 8 | + |
| 9 | +AsoSoft Library is originally written in C# by [Aso Mahmudi](https://github.com/aso-mehmudi) and this library is its Python port. |
9 | 10 |
|
10 | 11 | ## How to use?
|
11 |
| -- **Python version**: Python 3.11+ |
12 |
| -- **Install package using pip**: [pip install asosoft](https://pypi.org/project/asosoft/) |
13 |
| -- **Import package in your py file**: |
| 12 | +- **Requierements**: Python 3.8+ |
| 13 | +- **Install the package using pip**: [pip install asosoft](https://pypi.org/project/asosoft/) |
| 14 | +- **Import the package in your Python file**: |
14 | 15 | ```python
|
15 | 16 | import asosoft
|
16 | 17 | ```
|
17 | 18 |
|
18 |
| -## Development |
19 |
| -AsoSoft Library is developed and maintained by Aso Mahmudi. |
20 |
| -AsoSoft Library is written in C# (.NET 6). |
21 |
| - |
22 | 19 | ## Grapheme-to-Phoneme (G2P) converter and Transliteration
|
23 | 20 | This function is based on the study "[Automated Grapheme-to-Phoneme Conversion for Central Kurdish based on Optimality Theory](https://www.sciencedirect.com/science/article/abs/pii/S0885230821000292)".
|
24 | 21 |
|
@@ -196,16 +193,16 @@ Sorting a string list in correct order of Kurdish alphabet ("ئءاآأإبپت
|
196 | 193 | ```
|
197 | 194 | or using your custom order:
|
198 | 195 | ```python
|
199 |
| ->>> inputList = ["یەک", "ڕەنگ", "ئەو", "ئاو", "ڤەژین", "فڵان"] |
200 |
| ->>> inputOrder = list("ئءاآأإبپتثجچحخدڎڊذرڕزژسشصضطظعغفڤقكکگڴلڵمنوۆۊۉۋهھەیێ") |
201 |
| ->>> print(asosoft.CustomSort(inputList, inputOrder)) |
| 196 | +>>> input_list = ["یەک", "ڕەنگ", "ئەو", "ئاو", "ڤەژین", "فڵان"] |
| 197 | +>>> input_order = list("ئءاآأإبپتثجچحخدڎڊذرڕزژسشصضطظعغفڤقكکگڴلڵمنوۆۊۉۋهھەیێ") |
| 198 | +>>> print(asosoft.CustomSort(input_list, input_order)) |
202 | 199 | ["ئاو", "ئەو", "ڕەنگ", "فڵان", "ڤەژین", "یەک"]
|
203 | 200 | ```
|
204 | 201 | ## Poem Meter Classifier
|
205 | 202 | It classifies the meter of the input Kurdish poem typed in Arabic script. The lines of the poem should be seprated by new line char ('\n').
|
206 | 203 | You can find Kurdish poems in https://books.vejin.net/.
|
207 | 204 | ```python
|
208 |
| ->>> poem = "گەرچی تووشی ڕەنجەڕۆیی و حەسرەت و دەردم ئەمن\nقەت لەدەس ئەم چەرخە سپڵە نابەزم مەردم ئەمن\nئاشقی چاوی کەژاڵ و گەردنی پڕ \nخاڵ نیم\nئاشقی کێو و تەلان و بەندەن و بەردم ئەمن" |
| 205 | +>>> poem = f"گەرچی تووشی ڕەنجەڕۆیی و حەسرەت و دەردم ئەمن\nقەت لەدەس ئەم چەرخە سپڵە نابەزم مەردم ئەمن\nمن لە زنجیر و تەناف و دار و بەند باکم نییە\nلەت لەتم کەن، بمکوژن، هێشتا دەڵێم کوردم ئەمن" |
209 | 206 | >>> classified = asosoft.ClassifyKurdishPoem(poem)
|
210 | 207 | >>> print("Poem Type= " + classified.overalMeterType)
|
211 | 208 | Quantitative/عەرووزی
|
|
0 commit comments