{"id":15009680,"url":"https://github.com/saiful9379/pybangla","last_synced_at":"2026-02-25T11:11:50.097Z","repository":{"id":233790023,"uuid":"787820634","full_name":"saiful9379/pybangla","owner":"saiful9379","description":"Text Normalizer module use for Bangla as well as English digit convert to textual format, Normalize Date and Extract Date","archived":false,"fork":false,"pushed_at":"2025-11-27T10:47:28.000Z","size":4350,"stargazers_count":12,"open_issues_count":1,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-27T22:49:55.330Z","etag":null,"topics":["bangla","banglanlp","banglatext","normalization","normalizer","py","pybangla","text","textnormalizer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saiful9379.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-17T08:44:08.000Z","updated_at":"2025-11-27T10:01:16.000Z","dependencies_parsed_at":"2024-05-13T18:27:34.795Z","dependency_job_id":"bfe18e5b-1ccd-4037-8817-da9947e6e12f","html_url":"https://github.com/saiful9379/pybangla","commit_stats":null,"previous_names":["saiful9379/pybangla"],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/saiful9379/pybangla","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiful9379%2Fpybangla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiful9379%2Fpybangla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiful9379%2Fpybangla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiful9379%2Fpybangla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saiful9379","download_url":"https://codeload.github.com/saiful9379/pybangla/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiful9379%2Fpybangla/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29819266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bangla","banglanlp","banglatext","normalization","normalizer","py","pybangla","text","textnormalizer"],"created_at":"2024-09-24T19:27:28.296Z","updated_at":"2026-02-25T11:11:50.090Z","avatar_url":"https://github.com/saiful9379.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n __Citation Paper:__  Bnvits: a voice cloning approach for single speaker text-to-speech\n\nAlthough significant progress has been made in voice cloning and text-to-speech (TTS) models, especially in generating natural-sounding speech, low-resource languages such as Bangla (Bn) and other languages have remained nearly unexplored. Despite recent advancements, TTS systems for the Bangla language have still been challenged by the intricate phonology and morphology. Furthermore, no previous work had been done on voice cloning for Bangla. To address the research gap, a voice cloning method has been proposed that utilizes the limited amount of speech data available to build a TTS system for Bangla. Additionally, PYBANGLA, a text normalization tool created especially for Bangla language processing, has been introduced. Voice cloning has been achieved by refining the top-performing TTS models using just a few target speaker samples. Both subjective and objective evaluation metrics have been conducted to assess the system, and the results show that our BnVITS model has performed better than the earlier Bangla TTS model. This approach has opened up new opportunities for individualized voice technology by paving the road for more efficient Bangla TTS approaches in terms of speech data.\n\nPaper Link :https://link.springer.com/article/10.1007/s42452-025-07351-0\n\n__PyBangla:__\n\nPyBangla is a python3 package for Bangla Number, DateTime and Text Normalizer and Date Extraction. This package can be used to Normalize the text number and date (ex: number to text vice versa). This framework  also can be used Django, Flask, FastAPI, and others. PyBangla module supported operating systems Linux/Unix, Mac OS and Windows.\nAvailable Features.\n\n__Features available in PyBangla:__\n\n1. [Text Normalization](https://github.com/saiful9379/pybangla/blob/main/docs/Text_Normalizer.md)\n2. [Number Conversion](https://github.com/saiful9379/pybangla/blob/main/docs/Number_Conversion.md)\n3. [Date Format](https://github.com/saiful9379/pybangla/blob/main/docs/Date_Formating.md)\n4. [Emoji Removal](https://github.com/saiful9379/pybangla/blob/main/docs/Emoji_Remove.md)\n5. [Months, Weekdays, Seasons](https://github.com/saiful9379/pybangla/blob/main/docs/Day_Weeks_Months.md)\n6. [Email, URL, Phone number and Hotline number]\n7. [Account Number, NID, Driving license and Passport number]\n\u003ch4 style='color:LightGreen'\u003e [N.B: Here listed Every Feature has implemented Text Normalization as well as Isolated Uses feature]\n \u003c/h4\u003e\n\n\n\n## Installation\n\nThe easiest way to install pybangla is to use pip:\n\n```py\npip install pybangla\n#or\npip install git+https://github.com/saiful9379/pybangla.git\n#or\ngit clone https://github.com/saiful9379/pybangla.git\ncd pybangla\npip install -e .\n```\n\n## Evaluation\nFor the evaluation, we selected 200 sentences. The dataset contains numerical values and has been normalized using PyBangla. We generated AI-based ground truth (GT) text and had it corrected by human annotators. The performance of our tool is evaluated using three key metrics: Word Error Rate (WER), Character Error Rate (CER), and Match Error Rate (MER).\n\n### PyBangla Evaluation\n\nThe performance of PyBangla was evaluated using **200** sentences. However, no evaluation report is available for versions earlier than **V2.0.9**.\n**PyBangla** V2.0.9 Presenting conversion accuracy as well as it's processing time performance.\n\n ### Conversion Accuracy\n\n| Module Version | No. of Sentences | WER (Word Error Rate) | CER (Character Error Rate) | MER (Match Error Rate) |\n|---------------|----------------|----------------------|----------------------|----------------------|\n| **\u003c= V2.0.8** | 200            | _No evaluation report_ | _No evaluation report_ | _No evaluation report_ |\n| **V2.0.9**    | 200            | 0.1291               | 0.0319               | 0.0975               |\n| **V2.10.0**    | 200            |               |                |               |\n| **V2.11.0**    | 200            |               |                |               |\n| **V2.11.5**    | 399            | 0.0146        |0.0061           | N/A           |\n| **V2.11.7**    | 399            | 0.0112      |0.0037           | N/A           |\n| **V2.11.8**    | 399            | 0.0112      |0.0037           | N/A           |\n| **V2.13.0**    | 399            | 0.0117      |0.0035           | N/A           |\n| **V2.15.0**    | 399            |0.0185       |0.0078        | N/A           |\n| **V2.19.0**    | 459            |--------      |-------        | N/A           |\n| **V3.0.0**    | 459            |0.0134      |0076       | N/A           |\n\n```\n============================================================\nEVALUATION SUMMARY\n============================================================\nTotal Samples: 459\nExact Matches: 420 (91.50%)\nAverage CER: 0.0076\nAverage WER: 0.0134\nAverage Processing Time: 0.64 ms\nSamples with CER \u003c 0.05: 436\nSamples with CER \u003c 0.10: 450\n============================================================\n\nReports saved to:\n  - Excel: ./report/eval_data_3.0.0.xlsx\n  - CSV: ./report/eval_data_3.0.0_detailed.csv\n  - Comparison: ./report/eval_data_3.0.0_comparison.txt\n```\n\n__N.B : For more detail and all of processing category listed here please check : [link](./pybangla/eval_data/eval_data_2.11.2_v2.xlsx)__\n\n__Pybangla V2.11.5:  Report file(./eval_data/eval_data_2.11.5_v5.xlsx))__\n\n\n### Processing Time Performance\n\n\n\n\n| Module Version | Total Sentences | Raw Character Count | Normalized Character Count | Per Character Processing Time (sec) | Total Processing Time (sec) |\n|---------------|---------------|---------------------|--------------------------|----------------------------------|----------------------|\n| 2.0.9        | 200           | 9,217               | 12,584                   | 0.0001167                         | 1.076                |\n| 2.11.5        | 399           | -               | -                   | -                        | 0.41 ms                |\n## Interpretation\n\n- The text normalization process increased the character count from **9,217** to **12,584** due to transformations such as Unicode normalization, diacritic removal, and standardization.\n- The **average processing time per character** was **0.0001167 seconds**, resulting in a **total processing time of 1.076 seconds** for 200 sentences.\n- These metrics demonstrate the efficiency of **PyBangla** in handling Bangla text normalization.\n\n\n\n## Suported Category\n\n\n\n## Usage\n\n### 1. [Text Normalization](https://github.com/saiful9379/pybangla/blob/main/docs/Text_Normalizer.md)\nIt supports converting Bangla abbreviations, symbols, and currencies to Bangla textual format.\n\nProcesses a given text by applying various normalization techniques based on specified boolean parameters.\n\n__Parameters:__\n- `text` (str): The input text to be normalized.\n- `all_operation` (bool): Make this `True` if you need all operations to take place or `False`\n- `number_plate` (bool, default=False): Converts or normalizes vehicle number plates if present in the text.\n- `abbreviations` (bool, default=False): Expands common abbreviations into their full forms.\n- `year` (bool, default=False): Handles and formats years correctly.\n- `punctuation` (bool, default=False): Removes or standardizes unwanted punctuation marks.\n- `phone_number` (bool, default=False): Extracts and normalizes phone numbers.\n- `symbols` (bool, default=False): Expands common symbols into their textual representation.\n- `ordinals` (bool, default=False): Converts ordinal numbers.\n- `currency` (bool, default=False): Converts currency values into words.\n- `date` (bool, default=False): Standardizes and normalizes date formats.\n- `nid` (bool, default=False): Converts national identification numbers (NID) into a textual format.\n- `passport` (bool, default=False): Normalizes passport numbers.\n- `number` (bool, default=False): Processes and converts numeric values into textual form.\n- `emoji` (bool, default=False): Removes emojis from text.\n-\n__Returns:__\n- str: The normalized text after applying the selected transformations.\n\n__Example:__\n\n\u003ch3\u003eWe can enable all conversion with a simple boolean parameter.\u003c/h3\u003e\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ntext = \"রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য ২০৩০ শতাব্দীতে ¥২০৩০.১২৩৪ দিতে হয়েছে\"\nprint(f\"Input: {text} \\nOutput {nrml.text_normalizer(text,\n                                                     all_operation=True)}\")\n\nprint(text)\n\n# output:\n'রাহিম ক্লাস ওয়ান এ প্রথম, এন্ড বাসার ক্লাস এ তেত্রিশতম, সে জন্য দুই হাজার ত্রিশ শতাব্দীতে দুই হাজার ত্রিশ দশমিক এক দুই তিন চার ইয়েন দিতে হয়েছে'\n```\n\n\u003ch3\u003eThis can be used for single operations also.\u003c/h3\u003e\n\nFor example, if only year conversion needed -\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ntext = \"রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য ২০৩০ শতাব্দীতে ¥২০৩০.১২৩৪ দিতে হয়েছে\"\nprint(f\"Input: {text} \\nOutput {nrml.text_normalizer(text,\n                                                     all_operation=False\n                                                     year=True)}\")\n\nprint(text)\n\n# output:\n'রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য দুই হাজার ত্রিশ শতাব্দীতে ¥২০৩০.১২৩৪ দিতে হয়েছে'\n```\n\nIf only ordinal conversion needed -\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ntext = \"রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য ২০৩০ শতাব্দীতে ¥২০৩০.১২৩৪ দিতে হয়েছে\"\nprint(f\"Input: {text} \\nOutput {nrml.text_normalizer(text,\n                                                     all_operation=False\n                                                     ordinals=True)}\")\n\nprint(text)\n\n# output:\n'রাহিম ক্লাস ওয়ান এ প্রথম, এন্ড বাসার ক্লাস এ তেত্রিশতম, সে জন্য ২০৩০ শতাব্দীতে ¥২০৩০.১২৩৪ দিতে হয়েছে'\n```\n\nIf only currency conversion needed -\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ntext = \"রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য ২০৩০ শতাব্দীতে ¥২০৩০.১২৩৪ দিতে হয়েছে\"\nprint(f\"Input: {text} \\nOutput {nrml.text_normalizer(text,\n                                                     all_operation=False\n                                                     currency=True)}\")\n\nprint(text)\n\n# output:\n'রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য ২০৩০ শতাব্দীতে দুই হাজার ত্রিশ দশমিক এক দুই তিন চার ইয়েন দিতে হয়েছে'\n```\n\n\u003ch3\u003eWe can also use multiple conversion at once.\u003c/h3\u003e\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ntext = \"রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য ২০৩০ শতাব্দীতে ¥২০৩০.১২৩৪ দিতে হয়েছে\"\nprint(f\"Input: {text} \\nOutput {nrml.text_normalizer(text,\n                                                     all_operation=False\n                                                     currency=True)}\")\n\nprint(text)\n\n# output:\n'রাহিম ক্লাস ওয়ান এ ১ম, এন্ড বাসার ক্লাস এ ৩৩ তম, সে জন্য দুই হাজার ত্রিশ শতাব্দীতে দুই হাজার ত্রিশ দশমিক এক দুই তিন চার ইয়েন দিতে হয়েছে'\n```\n\nNormalizer more information or example check the [link](./docs/Text_Normalizer.md)\n## 2. [Number Conversion](https://github.com/saiful9379/pybangla/blob/main/docs/Number_Conversion.md)\nExample:\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ntext = \"আমাকে এক লক্ষ দুই হাজার এক টাকা দেয় এন্ড তুমি বিশ হাজার টাকা নিও এন্ড এক লক্ষ চার হাজার দুইশ এক টাকা এক ডবল দুই\"\ntext = nrml.word2number(text)\nprint(text)\n#output:\n'আমাকে 102001 টাকা দেয় এন্ড তুমি 20000 টাকা নিও এন্ড 104201 টাকা 122 '\n\n```\nNumber conversion more information or examples check the [link](./docs/Number_Conversion.md)\n\n## 3. [Date Format](https://github.com/saiful9379/pybangla/blob/main/docs/Date_Formating.md)\n\nExample:\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ndate = \"০১-এপ্রিল/২০২৩\"\ndate = nrml.date_format(date, language=\"bn\")\nprint(date)\n#output:\n\n\n{'date': '০১', 'month': '৪', 'year': '২০২৩', 'txt_date': 'এক', 'txt_month': 'এপ্রিল', 'txt_year': 'দুই হাজার তেইশ', 'weekday': 'শনিবার', 'ls_month': 'শ্রাবণ', 'seasons': 'বর্ষা'}\n\n```\nDate Format for more information or example check the [link](./docs/Date_Formating.md)\n\n## 4. [Today, Months, Weekdays, Seasons](https://github.com/saiful9379/pybangla/blob/main/docs/Day_Weeks_Months.md)\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\ntoday = nrml.today()\nprint(today)\n\nOutput:\n{'date': '৩০', 'month': 'এপ্রিল', 'year': '২০২৪', 'txt_date': 'ত্রিশ', 'txt_year': 'দুই হাজার চব্বিশ', 'weekday': 'মঙ্গলবার', 'ls_month': 'শ্রাবণ', 'seasons': 'বর্ষা'}\n```\n\nToday, Months, Weekdays, Seasons more information or examples check the [link](./docs/Day_Weeks_Months.md)\n\n\u003ch1 style='color:LightGreen'\u003e New Feature \u003c/h1\u003e\n\n## \u003ch2 style='color:LightBlue'\u003e(UPDATE TEXT NORMALIZATION) It supports year conversion like \u003c/h2\u003e\n\n* \"১৯৮৭-র\" to \"উনিশশো সাতাশি এর\"\n* \"১৯৯৫ সালে\" to \"উনিশশো পঁচানব্বই সালে\"\n* \"২০২৬-২৭\" to \"দুই হাজার ছাব্বিশ সাতাশ\"\n\n## \u003ch3 style='color:LightBlue'\u003e Now it also has the abbreviation for units of temperature \u003c/h3\u003e\n\n* \"৪৪°F\" to \"চুয়াল্লিশ ডিগ্রী ফারেনহাইট\"\n* \"৪৪°C\" to \"চুয়াল্লিশ ডিগ্রী সেলসিয়াস\"\n\n\n## \u003ch2 style='color:LightBlue'\u003ePhone Number Processing \u003c/h2\u003e\n\n* \"01790-540211\" to \"জিরো ওয়ান সেভেন নাইন জিরো ফাইভ ফোর জিরো টু ডাবল ওয়ান\"\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\nnumber_string = nrml.process_phone_number(\"01790-540211\")\nOutput:\nজিরো ওয়ান সেভেন নাইন জিরো ফাইভ ফোর জিরো টু ডাবল ওয়ান\n```\n\n\n## \u003ch2 style='color:LightBlue'\u003e Compare Two String Changes \u003c/h2\u003e\n\n```py\nimport pybangla\nnrml = pybangla.Normalizer()\n\ninput1 = \"১৯৯৬সালের ৬ সেপ্টেম্বররণ ভ্রমণ পরিকল্পনা করছি ২০৩০সালের ৬সেপ্টেম্বর\"\n\ninput2 = \"উনিশশো ছিয়ানব্বই সালের ছয় সেপ্টেম্বর রণ ভ্রমণ পরিকল্পনা করছি দুই হাজার ত্রিশ সালের ছয় সেপ্টেম্বর\"\n\nprint(nrml.text_diff(input1, input2))\n\n#Output:\n\n(\n    ['১৯৯৬সালের ৬', 'সেপ্টেম্বররণ', '২০৩০সালের', '৬সেপ্টেম্বর'],\n    ['উনিশশো ছিয়ানব্বই সালের ছয়', 'সেপ্টেম্বর রণ', 'দুই হাজার ত্রিশ সালের ছয়', 'সেপ্টেম্বর']\n)\n\n```\n\n\u003ch2\u003e \u003c/h2\u003e\n\n### Next Upcoming Features\n\n1. Bangla lemmatization and stemming algorithm\n2. Bangla Tokenizer\n\n\n## Contact\nIf you have any suggestions: Email: saifulbrur79@gmail.com\n\n## Contributor\n\n```\n@misc{pybangla,\n  title={PYBANGLA module used for normalize textual format like text to number and number to text},\n  author={Islam, Md Saiful and Emon, Hassan Ali and  HM-badhon and Sarker, Sagor and Das, Udoy},\n  howpublished={},\n  year={2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaiful9379%2Fpybangla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaiful9379%2Fpybangla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaiful9379%2Fpybangla/lists"}