Skip to content

Instantly share code, notes, and snippets.

@rmehta
Created July 13, 2013 08:13
Show Gist options
  • Save rmehta/5989949 to your computer and use it in GitHub Desktop.
Save rmehta/5989949 to your computer and use it in GitHub Desktop.
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