years ago when writing an APL system to control interactive memory experiments, where subjects
typed words they could remember from a given list.
To handle typos, I used the generalized outer product operator, null dot equals to create
a binary matrix comparing an input string with each correct word,
input o.= word
giving a 0/1 array whose rows reprepresented the letters in the input and whose columns
the letters in the output, from which varous measures of string similarity could be calculated
using reduction operators, or even a correlation, based on the positions of the 1s.
Thinking in arrays always helps avoid explicit loops.
--
Michael Friendly Email: [EMAIL PROTECTED] Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT M3J 1P3 CANADA
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
