> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hypothesis quality control functions

> Apply penalty coefficients to element hypotheses with the FuzzyQuality and Quality functions in FlexiLayout advanced post-search relations.

The FlexiLayout language supports the following functions for controlling the quality of an element hypothesis. Each function returns a penalty coefficient by which the quality of the hypothesis is multiplied.

## Hypothesis quality functions

| Definition                                                               | Description                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Quality FuzzyQuality(Area value, AreaFuzzyInterval interval)`           | Calculates the penalty coefficient by which the quality of the element hypothesis must be multiplied. The function checks whether the value `value` belongs to the fuzzy interval `interval`. For more information, see [Search for elements with Nearest and FuzzyQuality](/flexi-capture/fls/tips-tricks/date9). |
| `Quality FuzzyQuality( DistInterval value, DistFuzzyInterval interval )` | Calculates the penalty coefficient by which the quality of the element hypothesis must be multiplied. The function checks whether the value `value` belongs to the fuzzy interval `interval`. For more information, see [Search for elements with Nearest and FuzzyQuality](/flexi-capture/fls/tips-tricks/date9). |
| `Quality FuzzyQuality( Int value, IntFuzzyInterval interval )`           | Calculates the penalty coefficient by which the quality of the element hypothesis must be multiplied. The function checks whether the value `value` belongs to the fuzzy interval `interval`. For more information, see [Search for elements with Nearest and FuzzyQuality](/flexi-capture/fls/tips-tricks/date9). |
| `Quality Quality( Real )`                                                | Sets the penalty coefficient by which the quality of the element hypothesis must be multiplied.                                                                                                                                                                                                                    |
