On 27 Giu, 14:35, Francogrex <······@grex.org> wrote:
> Hello, I have a question about matching strings.
> Suppose I have the following strings:
> "tets"
> "estt"
> "rtes7"
> "gstes"
> "tes5t"
> Is there a straightforward and simple Lisp procedure to determine how
> related each string is to the reference string "test", for example to
> say that "tets" is similar to "test" with a probability of 0.9 or
> something of that sort? Thanks
Probability of what?
On Jun 29, 12:20 pm, Vend <······@virgilio.it> wrote:
> On 27 Giu, 14:35, Francogrex <······@grex.org> wrote:
>
> > Hello, I have a question about matching strings.
> > Suppose I have the following strings:
> > "tets"
> > "estt"
> > "rtes7"
> > "gstes"
> > "tes5t"
> > Is there a straightforward and simple Lisp procedure to determine how
> > related each string is to the reference string "test", for example to
> > say that "tets" is similar to "test" with a probability of 0.9 or
> > something of that sort? Thanks
>
> Probability of what?
Just guessing:
(let ((source "test"))
(- 1 (/ (levenshtein source "tets") (length source))))
Regards.