Skip to content

Instantly share code, notes, and snippets.

@mkonicek
Created January 24, 2018 13:49
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 mkonicek/ac66eb2d6e2586060bb05b96d631e01e to your computer and use it in GitHub Desktop.
Save mkonicek/ac66eb2d6e2586060bb05b96d631e01e to your computer and use it in GitHub Desktop.
def load_words(file_path: str) -> List[Word]:
"""Load and cleanup the data."""
words = load_words_raw(file_path)
print(f"Loaded {len(words)} words.")
words = remove_stop_words(words)
print(f"Removed stop words, {len(words)} remain.")
words = remove_duplicates(words)
print(f"Removed duplicates, {len(words)} remain.")
return words
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment