Guest User

neW ELITE HACK CODED BY PRIVATE HACKER

a guest
Feb 14th, 2014
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. #lukebot-trainer.py
  2. import pickle
  3. b=open('war&peace.txt')
  4. text=[]
  5. for line in b:
  6. for word in line.split():
  7. text.append (word)
  8. b.close()
  9. textset=list(set(text))
  10. follow={}
  11. for l in range(len(textset)):
  12. working=[]
  13. check=textset[l]
  14. for w in range(len(text)-1):
  15. if check==text[w] and text[w][-1] not in '(),.?!':
  16. working.append(str(text[w+1]))
  17. follow[check]=working
  18. a=open('lexicon-luke','wb')
  19. pickle.dump(follow,a,2)
  20. a.close()
Add Comment
Please, Sign In to add comment