Skip to content

Commit c51760c

Browse files
Copilotwannaphong
andcommitted
Regenerate Braille.db dictionary for international standard and update tests
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
1 parent 281f1ae commit c51760c

File tree

3 files changed

+237
-240
lines changed

3 files changed

+237
-240
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Thai Braille for Natural Language Processing.
44
**Note**: As of the latest version, Thaibraille uses the **international standard Braille dot numbering system** (ISO/ANSI) for better compatibility with the global Braille community. This ensures that internal representations align with standards used in EU, UK, US, and the Unicode Braille Patterns specification.
55

66
สวัสดีชาวโลก
7-
> ⠎⠺⠜⠎⠙⠆ ⠬⠡⠺ ⠊⠇
7+
> ⠎⠺⠖⠎⠓⠌ ⠦⠡⠺⠊⠍
88
99
## Install
1010

@@ -19,7 +19,7 @@ from thaibraille import thai_word_braille
1919

2020
print(thai_word_braille("แมว"))
2121

22-
# output: ⠣⠍
22+
# output: ⠩⠇
2323
```
2424

2525
This function support Thai and number only.
@@ -31,7 +31,7 @@ from thaibraille import thai_text_braille
3131

3232
print(thai_text_braille("แมวกิน ปลา"))
3333

34-
# output: ['⠣⠍⠺', '⠛⠃⠝', ' ', '⠯⠡']
34+
# output: ['⠩⠇⠺', '⠛⠉⠗', ' ', '⠯⠡']
3535
```
3636

3737
This function support Thai and number only.

tests/test_text.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55

66
class TestTextPackage(unittest.TestCase):
77
def test_thai_word_braille(self):
8-
self.assertEqual(thai_word_braille("ลิ้น"), '⠇⠃⠲⠝')
8+
# Updated for international standard Braille dot numbering
9+
self.assertEqual(thai_word_braille("ลิ้น"), '⠍⠉⠸⠗')
910
self.assertEqual(thai_word_braille("ว่าง"), '⠺⠔⠡⠻')
10-
self.assertEqual(thai_word_braille("แก้ม"), '⠣⠛⠲⠍')
11+
self.assertEqual(thai_word_braille("แก้ม"), '⠩⠛⠸⠇')
1112

1213
def test_thai_text_braille(self):
13-
self.assertEqual(thai_text_braille("แมวกิน ปลา"), ['⠣⠍⠺', '⠛⠃⠝', ' ', '⠯⠇⠡'])
14+
# Updated for international standard Braille dot numbering
15+
self.assertEqual(thai_text_braille("แมวกิน ปลา"), ['⠩⠇⠺', '⠛⠉⠗', ' ', '⠯⠍⠡'])

0 commit comments

Comments
 (0)