How to alter Contractions to Full Word using String Manipulator and Recursive Loop

Hi KNIME Team,

I want to to map contraction terms to full word, e.g. don’t, wouldn’t to become do not, would not. Hence I had adopted the workflow in the KNIME Forum :
Altering contractions Using String Manipulator or Regex - #2 by izaychik63.

In my modified workflow, I have applied the Recursive Loop and String Manipulator nodes to my existing workflow.

When I checked the Document Viewer node, e.g. Document name: 2469841rneg-1.txt, the contraction words were not mapped to the full word based on the Excel Reader node.

In the modified workflow, the Bag of Words node output connected to the Stanford Tagger node is 2400 rows. In my existing workflow, the Bag of Words node output connected to the Stanford Tagger node is 220753 rows.

I have appended my modified workflow: "Recursive Loop to map Contractions to Full Word in Txt file.knwf. I would greatly appreciate your advice if I have connected the nodes correctly and if the node settings are also configured properly.

Greatly appreciate your advice. Thank you.

Recursive Loop to map Contractions to Full Word in Txt file.knwf (111.9 KB)

Hello @taysl
An alternative workflow solution would be ‘Tagging and Replace’ of Document format, avoiding loop iterations.

Take a look into the following topic:

I hope this helps.
BR

1 Like