Skip to content
Prev 366088 / 398502 Next

weird behavior of DoubleMetaphone

No real need to answer. I found that function 'metaphone' from package
"phonics" doesn't misbehave this way!

library(phonics)
mymetaphone = function(x){
    temp <- strsplit(x, split=" ")[[1]]
    for(word in 1:length(temp)){
     temp[word]<-metaphone(temp[word])
    }
    return(paste(temp, collapse = ""))
}

The next 4 lines return the same thing:
metaphone("netflix")
metaphone("net flex")
mymetaphone("netflix")
mymetaphone("net flex")

Dimitri

On Wed, Dec 14, 2016 at 2:35 PM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote: