Hi,

hoping someone can help, driving me crazy, probably easiest if I explain it as follows:

I have the below sentences, I'd like to firstly get the total count of keyterms that exist in each line/sentence from the list of keyterms.

Sentences

banana cake, carrot cake, orange cake..
blueberry cake, shortbread biscuit, banana..
shortbread biscuit..
carrot cake, chocolate cake, carrot cake..
chocolate cake, shortbread biscuit, apple.
chocolate biscuit, carrot cake..

Secondly, I have keyterms that i'd like to get the total occurrence count in all the sentences

Keyterms

banana cake
blueberry cake
shortbread biscuit
carrot cake
chocolate cake
chocolate biscuit

Hope that makes sense, i'd expect the results to look as follows:

Sentences

2 banana cake, carrot cake, orange cake..
2 blueberry cake, shortbread biscuit, banana..
1 shortbread biscuit..
2 carrot cake, chocolate cake, carrot cake..
2 chocolate cake, shortbread biscuit, apple.
2 chocolate biscuit, carrot cake..

Keyterms

1 banana cake
1 blueberry cake
3 shortbread biscuit
4 carrot cake
2 chocolate cake
1 chocolate biscuit

Thanks in advance

Best rgds

Marco