私は2つのテーブルを持っています。
表1:
ID SENTENCE
1 The shoes are good shoes.
2 There is a tree.
3 This is nice, nice, nice!
表 2:
ID WORD
1 The
1 shoes
1 are
1 good
1 shoes
2 There
2 is
2 a
2 tree
3 This
3 is
3 nice
3 nice
3 nice
Table1 のすべての文で、各単語の出現回数をカウントする必要があります。いずれかの単語が複数回 (>1) 出現する場合は、それを数えます。それ以外の場合はスキップします。最終的に、結果のテーブルは次のようになります。
ID SENTENCE CNT
1 The shoes are good shoes. 2
2 There is a tree.
3 This is nice, nice, nice! 3