Created
July 13, 2013 08:13
-
-
Save rmehta/5989949 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open("para1.txt", "r") as pfile: | |
ptxt = pfile.read() | |
with open("para1-1.txt", "r") as ufile: | |
utxt = ufile.read() | |
pwords = ptxt.split() | |
uwords = utxt.split() | |
my_map = { | |
"Q": "\u0902", | |
"D": "\u0905", | |
"k": "\u0915", | |
"p": "\u091c", | |
"l": "\u0924", | |
"v": "\u0928", | |
"h": "\u092a", | |
"c": "\u092e", | |
"j": "\u0930", | |
"ee": "\u093e", | |
"er": "\u0940", | |
"ees": "\u094b", | |
"es": "\u0947", | |
"~": "\u0964", | |
} | |
for i, w in enumerate(pwords): | |
print w, "\t", uwords[i], "\t", repr(unicode(uwords[i], "utf-8")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment