Skip to content

Commit dc70563

Browse files
Copilotwannaphong
andcommitted
Address code review feedback: improve documentation clarity
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
1 parent c51760c commit dc70563

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

MIGRATION.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ This aligns with the ISO/ANSI standard used in EU, UK, US, and the Unicode Brail
2121
## Impact on Users
2222

2323
### For End Users
24-
- **No visible changes**: The Braille characters produced are identical
24+
- **Output changes**: The Unicode Braille characters will be different due to standardization
25+
- **Same semantic meaning**: The Braille patterns represent the same Thai text content, but using international standard encoding
2526
- **Same API**: All function signatures remain unchanged
26-
- **Same output**: `thai_word_braille()` and `thai_text_braille()` produce the same Unicode Braille characters
27+
- **Backward compatibility**: Existing code continues to work without modifications
2728

2829
### For Developers Working with Internal Representations
2930
If you were directly accessing or manipulating the internal dot pattern representations (e.g., in `thai_braille_mapping_dict` or the `Braille` class), you need to be aware of the new numbering:

thaibraille/text/core.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
1313
This follows the ISO/ANSI standard used internationally (EU, UK, US).
1414
The Unicode Braille Patterns block (U+2800-U+28FF) also uses this numbering.
15+
16+
Data structures:
17+
- thai_braille_mapping_dict: Maps Thai characters to lists of dot pattern strings
18+
Example: "ก" -> ["1245"] means character ก uses dots 1, 2, 4, 5
19+
- Braille.db: Maps dot pattern strings to Unicode Braille characters
20+
Example: "1245" -> "⠛" (U+281B)
1521
"""
1622
import re
1723
from pythainlp.util import Trie

0 commit comments

Comments
 (0)