by arichards » Wed Aug 29, 2012 8:31 pm
by shibenchouhan » Wed Oct 10, 2012 8:05 pm
dictionary = \
['b4', 'before']] #Plus lots more words in the compete dictionary
item = """c u r 2 wk y hello evry1 sed pix r gd""" #the word hello doesn't make it through because it's not in the dictionary but I need it to come through.
##Convert sms to english starts here...
item_split = item.split()
for word in item_split:
for j in range(len(dictionary)):
if word == dictionary[j]:
sms.append(word) #this will add the hello word which are not present in dictionary as the original word.
return " ".join(sms)
Keep up on our always latest technology tutorials, articles and news. Enter your e-mail and subscribe to our newsletter.
© Copyright 2015. All Rights Reserved.