Description Usage Arguments Details Value Author(s) References See Also Examples
Compute the average Levenshtein distances between a word and its n nearest neighbors in a lexicon.
1 2 |
sources |
a list of words for which the average Levenshtein distance should be computed. Must be of type |
targets |
a list of words containing possible neighbors. Must be of type |
method |
specifies the distance function. With "levenshtein", |
n |
specifies the number of nearest neighbors on which the average should be based. The variant |
parallel |
with parallel=TRUE, ald will run in parallel an multiple cores. The number of parallel processes is specified by |
The OLD20 measure was originally proposed by Yarkoni et al. (2008). This implementation is orders of magnitude faster than Tal Yarkoni's LDcalc program (see http://talyarkoni.com/materials.php). Do not use multicore=TRUE in a GUI environment, as it will most likely crash your R session.
A vector of average Levenshtein distances with names corresponding to sources.
Emmanuel Keuleers
Yarkoni, T., Balota, D., & Yap, M. (2008). Moving beyond Coltheart’s N: A new measure of orthographic similarity. Psychonomic Bulletin & Review, 15(5), 971–979.
levenshtein.distance
, levenshtein.neighbors
1 2 3 | data(basque.words)
ald(basque.words[1:10],basque.words,20)
old20(basque.words[1:10],basque.words)
|
Loading required package: stringdist
Loading required package: lattice
Loading required package: latticeExtra
Loading required package: RColorBrewer
aba abade abadesa abadetza abagune abaila abaildu
1.45 2.00 2.90 3.10 2.75 1.95 2.40
abako abandonatu abandonu
1.85 3.85 3.70
aba abade abadesa abadetza abagune abaila abaildu
1.45 2.00 2.90 3.10 2.75 1.95 2.40
abako abandonatu abandonu
1.85 3.85 3.70
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.