agrep

unexpected agrep() results related to max.distance in R

This was tweeted to me by @leoniedu today and I don't have an answer for him so I thought I would post it here. I have read the documentation for agrep() (fuzzy string matching) and it appears that I don't fully understand the max.distance parameter. Here's an example: pattern <- "Staatssekretar im Bundeskanzleramt" x <- "Bundeskanzle...

Approximate string matching with a letter confusion matrix?

I'm trying to model a phonetic recognizer that has to isolate instances of words (strings of phones) out of a long stream of phones that doesn't have gaps between each word. The stream of phones may have been poorly recognized, with letter substitutions/insertions/deletions, so I will have to do approximate string matching. However, I ...