Jaro-Winkler distance: Difference between revisions
Content added Content deleted
m (Rust - bug fix) |
m (remove spaces, redo output) |
||
Line 60: | Line 60: | ||
Using a dictionary of your choice and the following list of 9 commonly misspelled words: |
Using a dictionary of your choice and the following list of 9 commonly misspelled words: |
||
" |
"accomodate", "definately", "goverment", "occured", "publically", "recieve", "seperate", "untill", "wich" |
||
* Calculate the Jaro-Winkler distance between the misspelled word and words in the dictionary. |
* Calculate the Jaro-Winkler distance between the misspelled word and words in the dictionary. |
||
Line 211: | Line 211: | ||
"accomodate", |
"accomodate", |
||
"definately", |
"definately", |
||
" |
"goverment", |
||
"occured", |
"occured", |
||
"publically", |
"publically", |
||
" |
"recieve", |
||
"seperate", |
"seperate", |
||
" |
"untill", |
||
" |
"wich", |
||
] |
] |
||
Line 270: | Line 270: | ||
</lang>{{out}} |
</lang>{{out}} |
||
<pre> |
<pre> |
||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " accomodate " are: |
||
Word | Distance |
Word | Distance |
||
accommodate | 0. |
accommodate | 0.0182 |
||
accommodated | 0. |
accommodated | 0.0333 |
||
accommodates | 0. |
accommodates | 0.0333 |
||
accommodating | 0. |
accommodating | 0.0815 |
||
accommodation | 0. |
accommodation | 0.0815 |
||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " definately " are: |
||
Word | Distance |
Word | Distance |
||
definitely | 0. |
definitely | 0.0400 |
||
defiantly | 0. |
defiantly | 0.0422 |
||
define | 0. |
define | 0.0800 |
||
definite | 0. |
definite | 0.0850 |
||
definable | 0.0872 |
|||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " goverment " are: |
||
Word | Distance |
Word | Distance |
||
government | 0. |
government | 0.0533 |
||
govern | 0. |
govern | 0.0667 |
||
governments | 0. |
governments | 0.0697 |
||
movement | 0. |
movement | 0.0810 |
||
governmental | 0. |
governmental | 0.0833 |
||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " occured " are: |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " occured " are: |
||
Line 310: | Line 310: | ||
biblically | 0.1400 |
biblically | 0.1400 |
||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " recieve " are: |
||
Word | Distance |
Word | Distance |
||
receive | 0. |
receive | 0.0333 |
||
received | 0. |
received | 0.0625 |
||
receiver | 0. |
receiver | 0.0625 |
||
receives | 0. |
receives | 0.0625 |
||
relieve | 0. |
relieve | 0.0667 |
||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " seperate " are: |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " seperate " are: |
||
Line 326: | Line 326: | ||
separates | 0.1144 |
separates | 0.1144 |
||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " untill " are: |
||
Word | Distance |
Word | Distance |
||
until | 0. |
until | 0.0333 |
||
untie | 0. |
untie | 0.1067 |
||
untimely | 0. |
untimely | 0.1083 |
||
Antilles | 0.1264 |
|||
untidy | 0.1333 |
|||
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " |
Close dictionary words ( distance < 0.15 using Jaro-Winkler distance) to " wich " are: |
||
Word | Distance |
Word | Distance |
||
witch | 0. |
witch | 0.0533 |
||
which | 0. |
which | 0.0600 |
||
witches | 0.1143 |
|||
rich | 0.1167 |
|||
wick | 0.1167 |
|||
</pre> |
</pre> |
||
=={{header|Raku}}== |
=={{header|Raku}}== |