Skip to content

Commit

Permalink
feat: invert_180 for klmbr
Browse files Browse the repository at this point in the history
  • Loading branch information
av committed Sep 23, 2024
1 parent 1f43e4b commit 4eea9db
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions boost/src/modules/klmbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,59 @@
"l": "1",
}

invert_map = {
'a': 'ɐ',
'b': 'q',
'c': 'ɔ',
'd': 'p',
'e': 'ǝ',
'f': 'ɟ',
'g': 'ƃ',
'h': 'ɥ',
'i': 'ᴉ',
'j': 'ɾ',
'k': 'ʞ',
'l': 'l',
'n': 'u',
'o': 'o',
'p': 'd',
'q': 'b',
'r': 'ɹ',
's': 's',
't': 'ʇ',
'u': 'n',
'v': 'ʌ',
'w': 'ʍ',
'x': 'x',
'y': 'ʎ',
'z': 'z',
'A': '∀',
'B': '𐐒',
'C': 'Ɔ',
'D': 'ᗡ',
'E': 'Ǝ',
'F': 'Ⅎ',
'G': '⅁',
'H': 'H',
'I': 'I',
'K': '⋊',
'L': '˥',
'M': 'W',
'N': 'N',
'O': 'O',
'P': 'Ԁ',
'Q': 'Q',
'R': 'ᴚ',
'S': 'S',
'T': '⊥',
'U': '∩',
'V': 'Λ',
'W': 'M',
'X': 'X',
'Y': '⅄',
'Z': 'Z',
}

diacritics = ["̀", "́", "̂", "̃", "̈", "̄", "̆", "̇", "̊", "̋"]

punctuation = ".,!?;:"
Expand All @@ -51,11 +104,16 @@ def remove_vowel(chars, idx):
return chars[idx]


def invert_180(chars, idx):
return invert_map.get(chars[idx], chars[idx])


mods = {
"capitalize": capitalize,
"diacritic": diacritic,
"leetspeak": leetspeak,
"remove_vowel": remove_vowel,
"invert_180": invert_180,
}


Expand Down

0 comments on commit 4eea9db

Please sign in to comment.