String Comparison

The input will contain two columns containing strings. The comparison of the strings is returned as HTML where deleted characters are highlighted in red and inserted characters are highlighted in green.

This node uses the algorithm from googles diff-match-patch library. Specifically the forked version published to maven central is used.

Additional information on the change is provided in terms of counts of character insertions, deletions and equality. These counts are simply how many characters are in the text for deletion elements, how many are in the text for insertion elements and finally how many are in the text for equal elements. The % change is simply the proportion of characters in the deletion and insertion vs the equal diff elements.

Cleanup Method Options:

  • NONE - No cleanup method applied.
  • EFFICIENCY - Increase computational efficiency by factoring out short commonalities which are not worth the overhead.
  • SEMANTIC - Increase human readability by factoring out commonalities which are likely to be coincidental.
  • SEMANTIC_LOSSLESS - Looks for single edits surrounded on both sides by equalities which can be shifted sideways to align the edit to a word boundary.

Options

First Column
Column containing first string
Second Column
Column containing second string
Retain white space
If selected spaces will be replaced with with a non-breaking space and new lines with breaks
Cleanup method
Optional cleanup method will be applied to make the result more human-readable. Select NONE for no cleanup

Input Ports

Icon
Input containing two columns with strings (or cells compatible with string value) for comparison.

Output Ports

Icon
Output containing the highlighted changes as an HTML formatted string with inline styles.

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.