mirror of
https://github.com/gmihaila/ml_things.git
synced 2021-10-04 01:29:04 +03:00
Created using Colaboratory
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
"tk = Tokenizer(num_words=(n_words+1), filters=string.punctuation, lower=True, split=' ', char_level=False, oov_token='<unk>')\n",
|
||||
"texts = [\"my name is far faraway asdasd\", \"my name is\",\"your name is\"]\n",
|
||||
"tk.fit_on_texts(texts)\n",
|
||||
"## NOTE: You can fit chunks of data, it will work same way. When having big data don't need to load all files\n",
|
||||
"\n",
|
||||
"print('Original text: %s\\n'%texts)\n",
|
||||
"print('Only use top %s words\\n\\n'%n_words)\n",
|
||||
|
||||
Reference in New Issue
Block a user