Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 19, 2021 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/84104db6dc715080a2d45a9f32022f6c to your computer and use it in GitHub Desktop.
Save amankharwal/84104db6dc715080a2d45a9f32022f6c to your computer and use it in GitHub Desktop.
with open('dataset.txt', 'r') as dataset:
for line in dataset:
words = line.strip().split(' ')
for i in range(len(words) - 1):
update_lexicon(words[i], words[i+1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment