# Adjusting comparison sensitivity Learn more about document comparison sensitivity and how to adjust it to achieve best performance and accuracy when compare documents with GroupDocs.Comparison for .NET. [GroupDocs.Comparison](https://products.groupdocs.com/comparison/net) allows you to adjust comparison sensitivity to achieve the necessary balance between the comparison speed and accuracy. Possible comparison sensitivity values range is from **0** to **100**. - **Minimal value** (**0**) sets sensitivity to a minimal value provides the fastest comparison speed, but it may produce worst comparison quality. If there is at least one common letter in two compared words then these words are not treated as fully inserted and deleted - **Value by default** means **75**. Comparison occurs when the percentage of deleted or inserted elements in relation to all elements does not exceed 75% - **Maximum value** (**100**) provides the best quality, but slowest comparison speed. Comparison occurs at any length of a common sub-sequence of two compared objects For better understanding about how comparison algorithms work let's suppose we have two strings: | Strings | | -------------------------------- | | ` 1``. It is our equity poetry ` | | ` 2``. Jack is a glad calf ` | So, these strings have two common sub-sequences: "**is**" word and 4 space symbols.  Common sub-sequence is - " **is** " and its length is 4 symbols (there are 2 space symbols in it). Length of inserted sub-sequence is 13 symbols - **Jackagladcalf** Removed sub-sequence length is 17 symbols - **Itourequitypoetry\*_ Lets calculate percent of removed and inserted symbols: (17 + 13) / (17 + 13 + 4) * 100 = 88% *Case 1.* If **SensitivityOfComparison = 80%** comparison of these two strings produces the next result: **Jack is a glad calfIt is our equity poetry** Because calculated percent of removed and inserted symbols equals **88%** and it is bigger than value of **SensitivityOfComparison** equals **80%** then this common sub-sequence will be not taken into account. The first string considered completely removed and the second string considered completely inserted. The same results are produced for any calculated percent less than **83%**. _Case 2._ If **SensitivityOfComparison = 89%**, comparison of these two strings produces the next result: **JackIt is aour gladequity calfpoetry** Common sub-sequence was found, because **89% > 88%**. The same results are produced for any calculated percent bigger than **88%**. To compare documents with specific comparison sensitivity, follow these steps: 1. Instantiate the [Comparer](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/comparer) object. Specify the source document path or stream. 2. Call the [Add](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/comparer/methods/add/index) method. Specify the target document path or stream. 3. Instantiate the [CompareOptions](https://reference.groupdocs.com/comparison/net/groupdocs.comparison.options/compareoptions) object. Specify the appropriate [SensitivityOfComparison](https://reference.groupdocs.com/comparison/net/groupdocs.comparison.options/compareoptions/properties/sensitivityofcomparison) value. 4. Call the [Compare](https://reference.groupdocs.com/comparison/net/groupdocs.comparison.comparer/compare/methods/1) method. Specify the [CompareOptions](https://reference.groupdocs.com/comparison/net/groupdocs.comparison.options/compareoptions) object. The following code snippet shows how to compare documents with specific sensitivity: {{< tabs "example1">}} {{< tab "C#" >}} ```csharp using GroupDocs.Comparison; using GroupDocs.Comparison.Options; // ... using (Comparer comparer = new Comparer("source.docx")) { comparer.Add("target.docx"); CompareOptions options = new CompareOptions() { SensitivityOfComparison = 100 }; comparer.Compare("result.docx", options); } ``` {{< /tab >}} {{< /tabs >}} The result is as follows: | SensitivityOfComparison = 50 | SensitivityOfComparison = 100 | | :-----------------------------------------------------------------: | :----------------------------------------------------------------: | | ![](https://docs.groupdocs.com/comparison/net/images/sensitivity50.png) | ![](https://docs.groupdocs.com/comparison/net/images/sensitivity100.png) | You can also set the sensitivity level specifically for tables. The following code snippet shows how to do it: {{< tabs "example2">}} {{< tab "C#" >}} ```csharp using GroupDocs.Comparison; using GroupDocs.Comparison.Options; // ... using (Comparer comparer = new Comparer("source.docx")) { comparer.Add("target.docx"); CompareOptions options = new CompareOptions() { SensitivityOfComparison = 100, SensitivityOfComparisonForTables = 75 }; comparer.Compare("result.docx", options); } ``` {{< /tab >}} {{< /tabs >}} The result is as follows: | SensitivityOfComparisonForTables = 50 | SensitivityOfComparisonForTables = 75 | | :-----------------------------------------------------------------: | :----------------------------------------------------------------: | | ![](https://docs.groupdocs.com/comparison/net/images/tablesensitivity50.png) | ![](https://docs.groupdocs.com/comparison/net/images/tablesensitivity75.png) |