Formatting tagged terms in the sentence

Dear friends:

Is it possible to format tagged words in a sentence and retain the formatting while being written in to XLS?

Thanks in advance for your suggestions.

Hi Sridhar,

yes, this is possible. Filter the tagged terms by e.g. the Modifiable Term Filter node or any other appropriate filter node and create a dictionary based on which terms can be replaced (term, new formatted term).

Create the dictionary by using (on the filtered documents) Bow->Term to String->GroupBy (by Terms as strings) and than a node to specify the formatting, e.g. string manipulation.

The resulting data table contains two string columns. The first contains the original terms, the second the formatted terms (as strings). Use this data table as dictionary with the Dict Replacer node. The group by the documents and extract the sentences (as strings). The resulting table can be written to csv or xls file.

Attached you find an example workflow.

Cheers, Kilian

Dear Kilian:

I wish to acknowledge and appreciate the support you and the KNIME team are providing users of the KNIME software, irrespective of whether we have commercial license or free users.  

As regards formatting, I have used the uppercase feature in string manipulation node to format the tagged words.  However, I was wondering whether there is more that is possible in terms of the formatting features e.g. color, bold/italics, fontsize, etc.

I am guessing that it is not available as of now.


Hi Sridhar,

there are nor formatting options for the XLS Writer available. Only the strings can be formatted with string manipulation functions.

However, to create nice reports (also XLS files) use the BIRT reporting engine. KNIME provides connector node (Data to Report, Image to Report). These nodes pass data and images to BIRT. Install the Reporting Extension (like any other KNIME extension) and access BIRT from within KNIME/eclipse (BIRT is an eclipse plugin as well). BIRT allows you to create nicely formatted Reports as XLS, PDF, HTML, PPT and much more.

Cheers, Kilian

Dear Kilian:

Sorry to persist with this.  

My requirement is to format a term within a sentence, especially a huge chunk of terms within a huge chunk of sentences.  I have already understood how to convert terms in to uppercase and thereby format them differently from other terms in a sentence.  However, I was wondering whether I could get them bold, in different colors, etc.

Looks like it is not possible.  Just wanted a confirmation on this.


Hi Sridhar,

it depends in which software you want to visualize the terms. As far is I understood the formatting is a visual formatting, like bold, italic, colored, etc. You can create a report with these terms, or your complete text and create a xls, ppt, pdf, html, ... report with that text. This is possible. KNIME can connect to BIRT, and hand over data. In BIRT you can create a variaty of reports, and of course you can format certain terms bold, italic, colored, etc.

KNIME itself provides the Tag Cloud node where you can visualize terms. In the dialog you can specify font formatting as well. The Tag Cloud node requires a  bag of words with frequencies appended.

Cheers, Kilian

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