This workflow shows how to remove a list of specific words from all the sentences of the rows in a table.
This workflow is, let’s say, L2 KNIME level where it is needed to use loops and variables.
The word $${SWords}$$ means variable Words, which appears in the “Flow Variable List”. It is named with an S character at the beginning to indicate that it is of type String.
The variable $${SWords}$$ is created by the -Table Row to Variable- node and it provides as a variable to the -String Manipulation- node the word to be replaced at every iteration of the recursive loop.
A recursive loop is needed because it is required to eliminate ‘ANY’ word appearing in a table of words (2nd Table) if several words to eliminate appear in the same sentence. The recursive loop injects back the same table of sentences into next loop iteration, and at every new iteration, a word is checked and eliminated. So for instance, ‘new york’ is eliminated in first iteration from your sentences and once this is done, then ‘paris’ is eliminated from those updated sentences in the second iteration. And so on so forth until all the words of the table of words are checked. The final number of iterations is necessarily the number of words to check, and this information is gathered by the -Extract Table Dimension- node.
To use this workflow in KNIME, download it from the below URL and open it in KNIME:
Download WorkflowDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter or botsin.space/@nodepit on Mastodon.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.