回答編集履歴

2

コードの修正

2017/07/28 06:07

投稿

MasashiKimura
MasashiKimura

スコア1150

test CHANGED
@@ -12,8 +12,10 @@
12
12
 
13
13
  ```Python
14
14
 
15
- for tid, val in corpus_tfidf:
15
+ for i in corpus_tfidf:
16
16
 
17
+ for j in i:
18
+
17
- print(gensim_dictionary[tid], val)
19
+ print(gensim_dictionary[j[0]], j[1])
18
20
 
19
21
  ```

1

追加質問への回答

2017/07/28 06:07

投稿

MasashiKimura
MasashiKimura

スコア1150

test CHANGED
@@ -5,3 +5,15 @@
5
5
  ```
6
6
 
7
7
  で取り出せるはずです。
8
+
9
+
10
+
11
+ 一覧で見るには以下のように書けばよいでしょう。
12
+
13
+ ```Python
14
+
15
+ for tid, val in corpus_tfidf:
16
+
17
+ print(gensim_dictionary[tid], val)
18
+
19
+ ```