Filtering rows in a table from a word list in another table

Hi, I have an excel node that outputs a list of words (each one in a row), and another table with sentences in each row. Basically I want to filter out every row in the second table that does not contain one or more of the words in the first one, but I'm struggling to figure out how to do it with the actual filter nodes.

The Reference row filter seems to work only using exact matches. I tried converting the words in the reference table to *word* or (.*?)word(.*?) but it didn't work. It's a list of ~500 words that changes periodically so I can't do it manually.

I've seen that there's a Rule Engine node with dictionary and I wonder if that could be used in this case, but still didn't figure out how to do it.

Basically the idea is to match a keywords output from another app and a threads table from my forum and see which subjects match with any word of the keyword list.


Any help, please?

Hi iagovar, 

Possible options to solve the problems might be the following:

1. Use a nested loop (looping over sentences and words) and a String Manipulation node which checks if sentence contains the word with the indexOf function.

2. Use Cross Joiner - String Manipulation (the indexOf function) - GroupBy - Rule Engine - Row Filter. 

The 2nd one is more efficient.


Please find attached a sample workflow containing both options. 





Hi, I finally ended up using a string manipulation node + rule based row filter node. The first node to transform string into conditions, and the second one to apply those conditions to my data.

Anyway, a suggestion if anyone at KNIME is reading, I realized very late that conditions are case-sensitive. IDK if that's good or not, but I had to make a lot of trial and error to realize it, and had to transform my data table to lowercase with a node.