I’ve 2 Tables.
In 1 Table is my data with various columns. (Prename, Surname, Age, Ctry)
The Other Table has one column with expressions like Dr., Prof., Van, Von,
and so on.
I tried to search in the first table the expressions from the second table and manipulate that.
Example
Table 1
Dr. Hans | Wagner
Heinrich | Boerstel
Dr. Med. Franz | von Dietermeier
Table 2
Dr.
Prof.
Med.
Von
Van
Result Table 1
Hans | Wagner
Heinrich | Boerstel
Franz | von Dietermeier
Unfornately my WF is incorrect.
I tried a loop Table row to variable with second table + multiple column string manipulation.
The Loop End collect many version of the tables
I need only one final result
and your idea is to replace all expressions from Table 2 that come up in Table 1 in those two columns? If so seems “von” was left by accident in result table. Can you share your workflow?
this seems like a something others could benefit from so I have created an example which you can find on KNIME Hub:
I decided not to use loop and instead used regex in String Manipulation (Multi Column) node to perform same operation on multiple columns. Also instead of Joiner you can use new node to compare two tables - Table Difference Finder node.
Check it out and if any questions feel free to ask.
I had a similar problem myself for a client I contracted on. They had a list of keywords they considered to be part of the name prefix. The list was substantial. It included miltary ranks, religious titles, poltical titles etc and multiple languages so it needed to handle Mr., Heir and Singnor. What I did was looped through each word of the name field comparing it against the know list of prefixes. When I found a word not know to be a prefix, I marked that as the spot where the actual name began and removed the rest of the string before that into the name prefix. Here is a sample of how I did that. NamePrefix Parse.knwf (173.9 KB)
Well. Dont know but if i want use a loop. How is it possible to use one input table and get one output table.
In my first example it wasn’t possible to get out one table. I just got one big table which iterated added the common tables