I have list of sentences with million rows (N) and list of string list (M). I want to get matrix MxN that each element is how many occurances match list of string list in list of sentences with overlapped. For example:
sentence_list = ['Homegrown tech giant', 'GoTo gained 23 percent', 'at its Indonesia Stock Exchange']
list_of_string_list = [['homeg', 'goto'], ['to ga', 'gained', 'cents']]
and I want result array with 2x3 dimension like this:
[[1, 1, 0] #match homeg, match goto, no match
[0, 2, 0]] #no match, match to ga and gained, no match
how to do that in fast way using python?