Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
Uses a modified Vagner-Fischer algorithm to find the Levenshtein distance between each pair of strings. Progressively narrows the threshold to equal the distance of the best match found so far, reducing run time.
Updated to correct the algorithm. (sorry!)
Optional behaviors include an upper-bound threshold distance, detect first or multiple matches of equal distance, case insensitivity.
Examples:
>> [i,d]=strnearest({'first string'},{'string 2','abcdefgh','FURSrtd','firststring'})
i =
[4]
d =
2
>> [i,d]=strnearest({'1','first string'},{'string 2','abcdefgh','1st string','FURSrtd','seconaaad string','2'})
i =
[6] [3]
d =
1 5
>>
Cita come
Brandon Kuczenski (2026). Find nearest-matching string from a set (https://it.mathworks.com/matlabcentral/fileexchange/36981-find-nearest-matching-string-from-a-set), MATLAB Central File Exchange. Recuperato .
Riconoscimenti
Ispirato da: Calculation of distance between strings
Informazioni generali
- Versione 1.2.0.0 (2,43 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
