Word by Word

For Compare and Merge operations there is an option to control the granularity of the operation. This parameter by default is set to false - i.e. it searches for full string equality.  When set to true, it allows a more granular word level comparison.

wordByWord defaults to false because it is more appropriate where the content being compared is mostly data.  Where there is more natural language it can be very useful to use word by word as shown in the example below.

It is similar to the Word by Word Text Comparison feature in our other Compare products.

Input AInput B
This is a good example of Word by Word comparison.This is great example of Word by Word comparison.

The outputs using different settings of the Word By Word parameter are as follows:

wordByWord = False
{
  "dx_delta": {
    "A": "This is a good example of Word by Word processing.",
    "B": "This is a great example of Word by Word processing."
  }
}

When using Word By Word, we wrap the string in an array that contains a dx_delta object where the A and B words are different.

wordByWord = True
{
  "dx_delta_string": [
    "This is a ",
    {
      "dx_delta": {
        "A": "good",
        "B": "great"
      }
    },
    " example of Word by Word processing."
  ]
}
#content .code