Search words from a list in a sentence and add the words found to a new column

The attached image has the example of the Input data and how the Output data to be reflected.
I used Rule Engine (Dictionary) to add a single word, but not sure how to do it for multiple words.

If there is an existing post for this topic, please do tag it. I did not find a similar post, hence created this.

Try dictionary tagger for this

1 Like

It did not work for this data set.

Hello @Asghar

Take a look into this post:

I think that you can get insights from it. Duplicating the column $wildcard$ in the loop and using it for the pivoting, it can do the trick.


Hi again @Asghar

P.S.- If $words_found$ order (text position?) is important, some additional work would be needed; sorting based on indexOf() can be added in the loop as well.


Hi @Asghar

Please see the workflow attached. I believe it’s easiest to do with regex-based nodes & loops. Examples below using either palladian’s regex extractor (available on nodepit) or Column expressions:

Wildcard search.knwf (36.3 KB)

hope this helps!


HI @Add94 - thanks for the workflow

The Regex Extractor does the job.

Facing performance issues when using Column expressions.

Hi @gonhaddock - Thank you for tagging the post.

And, No - the text position doesn’t matter.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.