Co occurrence of two wordlist words within 1 to 5 lines of a text document in R

21 Views Asked by At

I want to detect the frequency of occurrence of words within 1 to 5 lines of a wordlist 'A' and a wordlist 'B'. The words in the lists are separated by the Boolean operator of 'OR' means that if anyone of the words in 'A' occurs within the above-mentioned range of anyone of the words in 'B'.

I have tried various codes and am able to find out the frequency of words, but am yet to figure out the issue of co-occurrence as mentioned above. Will really appreciate this help.

0

There are 0 best solutions below