Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_triples_dict(text):
- triples_dict = dict()
- text = text.lower()
- print(text)
- for i in range(0,len(text)-2):
- if text[i].isalpha() and text[i+1].isalpha() and text[i+2].isalpha():
- key = str(text[i]) + str(text[i+1]) + str(text[i+2])
- triples_dict[key] = 1
- print(key)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement