#### Topic: The formula for utl_match.edit_distance_similarity

All greetings!

On an input in a java-method there are 2 words and already counted distance of Levenshtejna.

Under this data it is necessary to count similarity in percentage (as in utl_match.edit_distance_similarity).

I can not pick up the formula, who can faced?

Or it is not enough such input data?

```
with q as (
select ' ' s1, ' ' s2 from dual union all
select ' 11 ', ' ' from dual union all
select ' 22 ', ' 3333 ' from dual
)
select
utl_match.edit_distance (s1, s2) distance;
utl_match.edit_distance_similarity (s1, s2) similarity_etalon;
round (100-utl_match.edit_distance (s1, s2) *100 / greatest (length (s1), length (s2)) / 2, 2) formula1;
round (100-utl_match.edit_distance (s1, s2) *100 / least (length (s1), length (s2)) / 2, 2) formula2;
round (100-utl_match.edit_distance (s1, s2) *100 / length (s1 || s2), 2) formula3
from q
/
DISTANCE SIMILARITY_ETALON FORMULA1 FORMULA2 FORMULA3
-------- ----------------- ---------- ---------- ----------
4 72 71.43 71.43 71.43
6 63 66.67 57.14 62.5
8 56 63.64 55.56 60
```

Thankful in advance.