我有两张桌子。
表格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