plautzer Posted November 15, 2009 Share Posted November 15, 2009 Hi, I want to compare to tables A and B containing similar names. If the names from B don't exist in the Table A than i wanna insert them in A. Before i want to do that, want to make sure that it is a new Name and here comes tricky part... because the names can differ in many ways (e.g. misspelled, some could have middle names in either table...) ... so some LIKE "%name%" wont do it. Are there more sophisticated approaches to determine if to names are the same? I was thinking of the google function (DO u mean:....) if u misspelled a word. Are there scripts that would help me accomplish that? Greetz Plautzer Quote Link to comment https://forums.phpfreaks.com/topic/181590-script-to-comapring-names/ Share on other sites More sharing options...
arfa Posted November 15, 2009 Share Posted November 15, 2009 You may find an existing script but your requirements are pretty specific so best have a go at coding it yourself. Quote Link to comment https://forums.phpfreaks.com/topic/181590-script-to-comapring-names/#findComment-957890 Share on other sites More sharing options...
Daniel0 Posted November 15, 2009 Share Posted November 15, 2009 This is a non-deterministic problem. How is the computer supposed to know if Denial is a mis-spelling Daniel? It sounds like your database is poorly designed if it allows for insertion and update anomalies and if it allows for multiple values to be stored in the same field. Quote Link to comment https://forums.phpfreaks.com/topic/181590-script-to-comapring-names/#findComment-957893 Share on other sites More sharing options...
plautzer Posted November 15, 2009 Author Share Posted November 15, 2009 i think detecting an spelling error (missing a letter or switched letter ...) should be pretty general, isnt it? Dont want to invent the wheel there again Im thinking of comparing each letter and its position within the word and if its matching lets say over 95% its likely to be the same word (e.g. spelling e instead of an è).. in that case "Denial" and "Daniel" wouldnt be detected as the same word. Do u know how google does that? As for the database design... i have no other choice but to combine these tables thru matching names either manually or automatic thru a algotithm.. and i want to do as much automatic as possible. Quote Link to comment https://forums.phpfreaks.com/topic/181590-script-to-comapring-names/#findComment-957902 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.