Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ferrygun
Created June 8, 2020 09:13
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 ferrygun/45b743a5f6192d2e98dc89fedac7940f to your computer and use it in GitHub Desktop.
Save ferrygun/45b743a5f6192d2e98dc89fedac7940f to your computer and use it in GitHub Desktop.
tokenizer = Tokenizer(num_words = vocab_size, oov_token=oov_tok)
tokenizer.fit_on_texts(train_articles)
word_index = tokenizer.word_index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment