How to replace content from a row if exists in another cell in the same row?

Hi, I am newbie to KNIME and this is my first post.
I am trying to replace content in a data set with 3 columns that looks like this:

CAR MAKER MODEL SENTENCE
Ford Mondeo The 1995 Ford Mondeo was a great car…
Mercedes A Class The german producer has brought a new A Class
VW Polo Ultimately, the Polo is all new

The need is to look at the two columns (Car maker & Model) and if one or the two words appear in the Sentence column, to replace the keywords by “VEHICLE”. A kind of removal of car attributes so that the sentence is neutral.

Expected result:
CAR MAKER MODEL SENTENCE
Ford Mondeo The 1995 “VEHICLE” “VEHICLE” was a great car…
Mercedes A Class The german producer has brought a new “VEHICLE”
VW Polo Ultimately, the “VEHICLE” is all new

Thank you for your help!

Hi @esabata and welcome to the Forum

Check this workflow make_model_vehicle.knwf (14.5 KB) .
Screenshot from 2020-04-23 20-50-02

Happy KNIMing
gr .Hans

4 Likes

Hi @HansS,
this was just AMAZING and so neat :slight_smile:. It works great .
Thank you very much for your swift reply and help!

1 Like

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