teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

追記

2020/08/11 06:12

投稿

taiyakix
taiyakix

スコア427

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,8 @@
1
1
  [こちらの記事](https://lionbridge.ai/ja/articles/deep-learning-multiclass-text-classification/)を参考にして単語リストをトークン化していたのですが、以下のようなエラーが起きました。
2
+ ```
3
+ # NameError: name 'max_features' is not defined
4
+ ```
5
+ コード
2
6
  ```Python
3
7
  import keras
4
8
  from keras.preprocessing.text import Tokenizer
@@ -7,7 +11,6 @@
7
11
  tokenizer.fit_on_texts(sentences)
8
12
  X = tokenizer.texts_to_sequences(sentences)
9
13
  print(X)
10
- # NameError: name 'max_features' is not defined
11
14
  ```
12
15
  [その記事](https://lionbridge.ai/ja/articles/deep-learning-multiclass-text-classification/)を読んだだけでは`max_features`が何を指しているか私には分からなかったので、教えていただきたいです。
13
16