Because of a lapse in government funding, the information on this website may not be up to date, transactions submitted via the website may not be processed, and the agency may not be able to respond to inquiries until appropriations are enacted. The NIH Clinical Center (the research hospital of NIH) is open. For more details about its operating status, please visit cc.nih.gov. Updates regarding government operating status and resumption of normal operations can be found at OPM.gov
Token Similarity Score
Introduction
The token similarity score is calculated by cost of edit distance and the penalty of splits. It is different from edit distance:
Source Codes & Algorithm:
String-1 | String-2 | Edit Distance | Notes |
---|---|---|---|
Spell | Spell | 0 | same strings |
Spell | Spel | 1 | delete |
Spell | Speell | 1 | insert |
Spell | Spall | 1 | substitute |
Spell | Sepll | 1 | transpose |
Spell | spell | 1 | case change |
Spell | Sp ell | 1 | split |
Spell | Seplls | 2 | transpose, insert |
String-1 | String-2 | Edit Distance Cost | Split Penalty | Token Similarity Score | Notes |
---|---|---|---|---|---|
Spell | Spell | 0 | 0 | 1.000 | same strings |
Spell | Spel | 96 | 0 | 0.904 | delete |
Spell | Speell | 90 | 0 | 0.910 | insert |
Spell | Spall | 100 | 0 | 0.900 | substitute |
Spell | Sepll | 94 | 0 | 0.906 | transpose |
Spell | spell | 10 | 0 | 0.990 | case change |
Spell | Sp ell | 90 | 90 | 0.820 | split |
Spell | Seplls | 184 | 0 | 0.816 | transpose, insert |