First off I really appreciate your time in providing practical solutions. I gave this my best shot before returning here but every attempt I made at implementing the utility function you provided, at either the deck level down to the control itself, did not seem to work. I could get it to work within the Listener, but any table expressions seemed to do nothing outside of Listener. I'm sure I'm missing something, but I couldn't find a solution or workaround.
Are you writing the result into a widget?
If you had a rich text field named "foo" which contained some of the words defined in the table for contextualize[], you'd apply it to the field something like this:
foo.value:contextualize[foo.value]
- reading "foo.value" produces a rich text table.
- "contextualize[foo.value] " calls the contextualize function with that rich text table and returns a modified rich text table.
- the colon (:) is the assignment operator in Lil.