From 2a31c83b0e53cb06552d78cdeb76d7ea7eccdc8d Mon Sep 17 00:00:00 2001 From: Md Kishor Morol Date: Sun, 2 Aug 2026 23:59:38 -0400 Subject: [PATCH] fix: address remaining CodeRabbit review comments - Add missing Urdu link to Bengali README language selectors - Narrow zero-width char regex to only ZWSP (U+200B) and BOM (U+FEFF), preserving bidi controls and separators - Add pg_encoding_to_char check for PostgreSQL UTF-8 verification Co-Authored-By: Claude Opus 4.6 --- docs/bn/README.md | 4 ++-- skills/bengali-nlp/SKILL.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/bn/README.md b/docs/bn/README.md index c5c2cb216..bf67cce43 100644 --- a/docs/bn/README.md +++ b/docs/bn/README.md @@ -1,4 +1,4 @@ -**ভাষা:** [English](../../README.md) | [Português (Brasil)](../pt-BR/README.md) | [简体中文](../../README.zh-CN.md) | [繁體中文](../zh-TW/README.md) | [日本語](../ja-JP/README.md) | [한국어](../ko-KR/README.md) | [Türkçe](../tr/README.md) | [Русский](../ru/README.md) | [Tiếng Việt](../vi-VN/README.md) | [ไทย](../th/README.md) | [Deutsch](../de-DE/README.md) | [Español](../es/README.md) | বাংলা +**ভাষা:** [English](../../README.md) | [Português (Brasil)](../pt-BR/README.md) | [简体中文](../../README.zh-CN.md) | [繁體中文](../zh-TW/README.md) | [日本語](../ja-JP/README.md) | [한국어](../ko-KR/README.md) | [Türkçe](../tr/README.md) | [Русский](../ru/README.md) | [Tiếng Việt](../vi-VN/README.md) | [ไทย](../th/README.md) | [Deutsch](../de-DE/README.md) | [Español](../es/README.md) | [اردو](../ur/README.md) | বাংলা # Everything Claude Code @@ -15,7 +15,7 @@ **Language / ভাষা / 语言 / 語言 / 언어 / Dil / Язык / Ngôn ngữ** -[**English**](../../README.md) | [Português (Brasil)](../pt-BR/README.md) | [简体中文](../../README.zh-CN.md) | [繁體中文](../zh-TW/README.md) | [日本語](../ja-JP/README.md) | [한국어](../ko-KR/README.md) | [Türkçe](../tr/README.md) | [Русский](../ru/README.md) | [Tiếng Việt](../vi-VN/README.md) | [ไทย](../th/README.md) | [Deutsch](../de-DE/README.md) | [Español](../es/README.md) | [বাংলা](README.md) +[**English**](../../README.md) | [Português (Brasil)](../pt-BR/README.md) | [简体中文](../../README.zh-CN.md) | [繁體中文](../zh-TW/README.md) | [日本語](../ja-JP/README.md) | [한국어](../ko-KR/README.md) | [Türkçe](../tr/README.md) | [Русский](../ru/README.md) | [Tiếng Việt](../vi-VN/README.md) | [ไทย](../th/README.md) | [Deutsch](../de-DE/README.md) | [Español](../es/README.md) | [اردو](../ur/README.md) | [বাংলা](README.md) diff --git a/skills/bengali-nlp/SKILL.md b/skills/bengali-nlp/SKILL.md index 8a3dd4fd1..faa40ad84 100644 --- a/skills/bengali-nlp/SKILL.md +++ b/skills/bengali-nlp/SKILL.md @@ -287,7 +287,7 @@ def prepare_bangla_dataset(texts: list[str]) -> list[str]: # Normalize Unicode text = unicodedata.normalize("NFC", text) # Remove unwanted zero-width characters but preserve ZWNJ/ZWJ (important for conjuncts) - text = re.sub(r'[\u200b\u200e\u200f\u2028-\u202f\ufeff]', '', text) + text = re.sub(r'[\u200b\ufeff]', '', text) # Normalize whitespace text = re.sub(r'\s+', ' ', text).strip() if text: @@ -305,7 +305,8 @@ CREATE TABLE bengali_content ( body TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ); --- PostgreSQL: UTF-8 is the default. Verify ICU collation availability first: +-- PostgreSQL: Verify UTF-8 encoding and ICU collation availability: +-- SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname = current_database(); -- SELECT collname FROM pg_collation WHERE collname LIKE 'bn%'; -- If missing, create it (requires ICU-enabled PostgreSQL build): -- CREATE COLLATION IF NOT EXISTS "bn-BD-x-icu" (provider = icu, locale = 'bn-BD'); @@ -370,5 +371,5 @@ title = "বাংলা ভাষা" text = scraped_html.get_text() # GOOD — strip unwanted zero-width chars, preserving ZWNJ (U+200C) and ZWJ (U+200D) -text = re.sub(r'[\u200b\u200e\u200f\u2028-\u202f\ufeff]', '', scraped_html.get_text()) +text = re.sub(r'[\u200b\ufeff]', '', scraped_html.get_text()) ```