Hi
sample_df <- data.frame(stringsAsFactors = FALSE,
text = c("inspected system and found high volume and language not matching",
"inspected and found language not accessible and forgot to reconfigured",
"rear seats are not folding and stitches are not good",
"screen losses vision"))
x <- data.frame("SN" = 1:2, "Positive" = c("(LANGUAGE,volume)","(LANGUAGE,CHANG)","(fold|rear)","(rear|seat)"), "Negative" = c("High","rear"))
Simply I want to search positive words(from x dataframe ) in the text if there are any matching and do not want any of negative words in the text. There are multiple positive and negative words in Or and And conditions.
eg.
For 1st Text line the output will be
Text = "inspected system and found high volume and language not matching"
Here Matching words are language and volume as per positive words in x dataframe
But in text there is also a negative word "High" which is in negative words in x data frame
So I need in new column in sample_df as "no match".
I am having difficulty to do so.