What is the minemum percentage in Metaphone3 that I can use it to tell these names are matched

16 Views Asked by At

I am working or matching name project, and I am using metaphone3 in java to check if two names are matched phonetically or not, metaphone3 is working great in English names but the names that I am using are Arabic names, so some times i give it two alternative spelling names that should matched but it gives me a low percent, for example Muhammed and Mhmad after calculate the ratio distance between two these names using Fuzzy it gives me they are matched 73.0 !! and I give it Muhammed and Mahmood, it gives me 83.0 !!

so I am trying to put the percentage let's say if it greater than x then they are matched otherwise they are not, what is the better approach or better way to boost its accurate with non English names
this is my code

private boolean metaphone3Ratio(String nameOne, String nameTwo){
        Metaphone3 metaphone3 = new Metaphone3();

        metaphone3.SetEncodeExact(false);
        metaphone3.SetEncodeVowels(true);

        metaphone3.SetWord(nameOne);
        metaphone3.Encode();

        String nameOneEncoded = metaphone3.GetMetaph();

        metaphone3.SetWord(nameTwo);
        metaphone3.Encode();

        String nameTwoEncoded = metaphone3.GetMetaph();

        return FuzzySearch.ratio(nameOneEncoded,nameTwoEncoded) > 88.0;
    }
0

There are 0 best solutions below