diff --git a/src/fenrir-package/utils/char_utils.py b/src/fenrir-package/utils/char_utils.py index 10295180..8f09fd9a 100644 --- a/src/fenrir-package/utils/char_utils.py +++ b/src/fenrir-package/utils/char_utils.py @@ -36,3 +36,19 @@ def getNextChar(currX,currY, currText): x += 1 currChar = wrappedLines[y][x] return x, y, currChar + +def getPhonetic(currChar): + if len(currChar) != 1: + return currChar + phoneticsDict = { + "A":"alpha", "B":"bravo", "C":"charlie", "D":"delta", "E":"echo", + "F":"foxtrot", "G":"golf", "H":"hotel", "I":"india", "J":"juliet", + "K":"kilo", "L":"lima", "M":"mike", "N":"november", "O":"oscar", + "P":"papa", "Q":"quebec", "R":"romeo", "S":"sierra", "T":"tango", + "U":"uniform", "V":"victor", "W":"whisky", "X":"x ray", + "Y":"yankee", "Z":"zulu" + } + try: + return phoneticsDict[currChar.upper()] + except: + return currChar