Phonematic Name Search in C#

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2004
Posts: 2
Reputation: shabosco is an unknown quantity at this point 
Solved Threads: 0
shabosco shabosco is offline Offline
Newbie Poster

Phonematic Name Search in C#

 
0
  #1
Aug 18th, 2004
I just wrote a phonematic name search in C# using the Levenshtein Distance Algorithm. It is very tricky and was quite hard to figure out. This is the samething google uses, and many major search engines. it matches by rank to the text you type in, even if it is mispelled. I believe in open source, and I wrote this for one of my company projects, and with a little simple modification. You can use it for yourself. If you would like a copy of the source. feel free to contact me. Also, I am an expert in .NET so if you need help. Just ask.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 153
Reputation: cosi is an unknown quantity at this point 
Solved Threads: 1
cosi's Avatar
cosi cosi is offline Offline
Junior Poster

Re: Phonematic Name Search in C#

 
0
  #2
Aug 18th, 2004
It would be nice of you to post something in the code snippets section if it is easy enough to just isolate the relevant code sections. I think many people would be interested in taking a look.


Ed

Originally Posted by shabosco
I just wrote a phonematic name search in C# using the Levenshtein Distance Algorithm. It is very tricky and was quite hard to figure out. This is the samething google uses, and many major search engines. it matches by rank to the text you type in, even if it is mispelled. I believe in open source, and I wrote this for one of my company projects, and with a little simple modification. You can use it for yourself. If you would like a copy of the source. feel free to contact me. Also, I am an expert in .NET so if you need help. Just ask.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1
Reputation: arifmd09 is an unknown quantity at this point 
Solved Threads: 0
arifmd09 arifmd09 is offline Offline
Newbie Poster

Re: Phonematic Name Search in C#

 
0
  #3
Jul 1st, 2005
[QUOTE=shabosco]I just wrote a phonematic name search in C# using the Levenshtein Distance Algorithm.

Hi Shabosco, this is arif, i need the source for search file, as am struck in one of my project that rquires the file search. It would be of great pleasure if you could post it to my mail id : arif_829@rediffmail.com.
Thanks in advance
Arif
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 38
Reputation: c#dummie is an unknown quantity at this point 
Solved Threads: 1
c#dummie c#dummie is offline Offline
Light Poster

Re: Phonematic Name Search in C#

 
0
  #4
Jul 20th, 2005
Hi.

Any idea how do i...

i) arrange/sort people's names displayed in a listbox in alphabetical order AND by their surnames?

ii) search for people by name? (my code now can only search by their ID no.)


Thz a lot!
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1
Reputation: sandeepiitm is an unknown quantity at this point 
Solved Threads: 0
sandeepiitm sandeepiitm is offline Offline
Newbie Poster

Re: Phonematic Name Search in C#

 
0
  #5
Jul 6th, 2006
Hi there,
I am trying to find person names from text files in DOT NET. Could you help me with some guidelines with your code?
My yahoo id is sandeepiitm@yahoo.com
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 4
Reputation: Numen is an unknown quantity at this point 
Solved Threads: 0
Numen Numen is offline Offline
Newbie Poster

Re: Phonematic Name Search in C#

 
0
  #6
Jul 6th, 2006
This might be what you're after.... not 100% sure as just passing through the thread.

It's always worth Googling for Java solutions to these problems. This code took 2min to transpose from Java to C#

My apologise if I've misunderstood what people are after.

  1. public static int GetLavenshteinDistance(string s, string t) {
  2. if (String.IsNullOrEmpty(s) || String.IsNullOrEmpty(t)) throw new ArgumentException("The strings must not be null.");
  3. /*
  4.   * Ported from a Java algorithm by Chas Emerick
  5.   * <a rel="nofollow" class="t" href="http://www.merriampark.com/ldjava.htm" target="_blank">http://www.merriampark.com/ldjava.htm</a>
  6.   *
  7.   */
  8. int n = s.Length;
  9. int m = t.Length;
  10. if (n == 0) {
  11. return m;
  12. } else if (m == 0) {
  13. return n;
  14. }
  15. int[] p = new int[n + 1];
  16. int[] d = new int[n + 1];
  17. int[] _d;
  18. char t_j;
  19. int cost;
  20. for (int i = 0; i <= n; i++) {
  21. p[i] = i;
  22. }
  23. for (int j = 1; j <= m; j++) {
  24. t_j = t[j - 1];
  25. d[0] = j;
  26. for (int i = 1; i <= n; i++) {
  27. cost = (s[i - 1] == t_j) ? 0 : 1;
  28. d[i] = Math.Min(Math.Min(d[i - 1] + 1, p[i] + 1), p[i - 1] + cost);
  29. }
  30. _d = p;
  31. p = d;
  32. d = _d;
  33. }
  34. return p[n];
  35. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC