br6
v0.0.1
Published
A simple, Unified English Braille (UEB) Grade 1 library [Old WIP]
Downloads
1
Readme
Br6
A simple, Unified English Braille (UEB) Grade 1 library [Old WIP]
Br6 = 6-dot Braille
Usage
Installing:
npm install br6
Example:
const {toBrailleText, toAlphabetText} = require('br6');
const sentence = 'Lewis CARROLL published "ALICE IN WONDERLAND" in 1865. ^~^';
const inBraille = toBrailleText(sentence);
// '⠠⠇⠑⠺⠊⠎⠀⠠⠠⠉⠁⠗⠗⠕⠇⠇⠀⠏⠥⠃⠇⠊⠎⠓⠑⠙⠀⠦⠠⠠⠠⠁⠇⠊⠉⠑⠀⠊⠝⠀⠺⠕⠝⠙⠑⠗⠇⠁⠝⠙⠠⠄⠴⠀⠊⠝⠀⠼⠁⠓⠋⠑⠲⠀⠤⠤⠤'
const inAlphabet = toAlphabetText(inBraille);
// 'Lewis CARROLL published “ALICE IN WONDERLAND” in 1865. ---'
Learning Braille
These are the resources I used and liked:
- Rules of Unified English Braille, second edition, 2013
- Brailliac: Braille Tutor app
- Unified English Braille Chart (Braille Cheat Sheet) by Aroga Technologies (2014)
- LEARN BRAILLE font by WeMe Studio (more like a mnemonical image)
How It Works
Legend: CHANGE; ADDITION.
- Starting with a text like this:
Lewis CARROLL published "ALICE IN WONDERLAND" in 1865. ^~^
- Convert straight quotation marks to curly ones
Lewis CARROLL published “ALICE IN WONDERLAND” in 1865. ^~^
- Replace (yet) unsupported characters with "-"
Lewis CARROLL published “ALICE IN WONDERLAND” in 1865. ---
- Add capital indicators and terminators, then lowercase everything
Lewis CARROLL published “⠠⠠⠠alice in wonderland⠠⠄” in 1865. ---
Lewis ⠠⠠carroll published “⠠⠠⠠alice in wonderland⠠⠄” in 1865. ---
⠠lewis ⠠⠠carroll published “⠠⠠⠠alice in wonderland⠠⠄” in 1865. ---
- Add numeric indicators and translate numbers
⠠lewis ⠠⠠carroll published “⠠⠠⠠alice in wonderland⠠⠄” in ⠼⠁⠓⠋⠑. ---
- Using a map, convert the remaining characters to Braille
⠠⠇⠑⠺⠊⠎⠀⠠⠠⠉⠁⠗⠗⠕⠇⠇⠀⠏⠥⠃⠇⠊⠎⠓⠑⠙⠀⠦⠠⠠⠠⠁⠇⠊⠉⠑⠀⠊⠝⠀⠺⠕⠝⠙⠑⠗⠇⠁⠝⠙⠠⠄⠴⠀⠊⠝⠀⠼⠁⠓⠋⠑⠲⠀⠤⠤⠤
- And there you have it:
⠠⠇⠑⠺⠊⠎⠀⠠⠠⠉⠁⠗⠗⠕⠇⠇⠀⠏⠥⠃⠇⠊⠎⠓⠑⠙⠀⠦⠠⠠⠠⠁⠇⠊⠉⠑⠀⠊⠝⠀⠺⠕⠝⠙⠑⠗⠇⠁⠝⠙⠠⠄⠴⠀⠊⠝⠀⠼⠁⠓⠋⠑⠲⠀⠤⠤⠤
TODO
- [ ] Either handle letters with accents/diactritics, or remove them (
Téle
->Tele
) - [ ] Support contractions and wordsigns
- [ ] ...
License
CC0