You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get the total permutation count, call HebrewWord#inspect
word.inspect# => "אַברָהָם: Permutations: 1 single | 18 short | 6000 long"
Adding Custom Phoneme maps
Format
Phoneme Maps are simply JSON files, placed in the lib/phoneme_maps directory.
The file should map between each String (the phonemes) and an Arrays of replacement characters.
{
"ב": ["v"],
"בּ": ["b", "bb"]
}
A phoneme can be a Hebrew character א, nekuda (ָ), or character with modifiers, such as a dagesh (בּ). Keep in mind that many characters will be normalized (see below).
Installation
To install your custom map, place the file in lib/resources
Your file will be available as the symbol:<filename> without the .json extension.
Example: klingon.json becomes :klingon
Now you can use it anywhere:
word.transliterate(:klingon)# => (Results)
At present, your map will not display results in HebrewWord#inspect
Contributing
TranslitKit is currently maintained by @AnalyzePlatypus.
Contributions welcome!
Appendix: Pre-Processing
When a word is transliterated, it is pre-processed to normalize certain characters.
Specifically:
Whitespace is stripped
The final letters [םןךףץ] are normalized to their standard forms
CHATAFnekudos['ֲ','ֳ','ֱ'] are normalized to their standard forms
Full CHIRIK, TZEIREI, and CHOLOMnekudos have their letters removed
DAGESH characters are removed from all but the characters [בוכפת]