質問編集履歴
1
エラー文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -43,7 +43,8 @@
|
|
43
43
|
import openpyxl as px
|
44
44
|
from wordcloud import WordCloud
|
45
45
|
import matplotlib.pyplot as plt
|
46
|
+
imp
|
46
|
-
|
47
|
+
ort my_mecab as my_tokenizer
|
47
48
|
|
48
49
|
#url = 'http://svn.sourceforge.jp/svnroot/slothlib/CSharp/Version1/SlothLib/NLP/Filter/StopWord/word/Japanese.txt'
|
49
50
|
#urllib.request.urlretrieve(url, './data/stopwords.txt')
|
@@ -57,6 +58,16 @@
|
|
57
58
|
lists = my_tokenizer.tokens(texts)
|
58
59
|
words.extend(lists)
|
59
60
|
```
|
61
|
+
上記を実行して出力されるエラーメッセージは下記の通りです。
|
62
|
+
```
|
63
|
+
Traceback (most recent call last):
|
64
|
+
File "test.py", line 19, in <module>
|
65
|
+
lists = my_tokenizer.tokens(texts)
|
66
|
+
File "/home/hoge/test/my_mecab.py", line 18, in tokens
|
67
|
+
term = elem[7] if elem[7] != '*' else node.surface
|
68
|
+
IndexError: list index out of range
|
69
|
+
```
|
70
|
+
|
60
71
|
原因がわからず、解決することができませんでした。
|
61
72
|
参考情報などお持ちの方がいらっしゃいましたら是非お教えください。
|
62
73
|
よろしくお願いいたします。
|