| | |
Phonematic Name Search in C#
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2004
Posts: 2
Reputation:
Solved Threads: 0
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.
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
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.
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Solved Threads: 0
[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
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
•
•
Join Date: Jul 2006
Posts: 1
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Jul 2006
Posts: 4
Reputation:
Solved Threads: 0
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.
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.
C# Syntax (Toggle Plain Text)
public static int GetLavenshteinDistance(string s, string t) { if (String.IsNullOrEmpty(s) || String.IsNullOrEmpty(t)) throw new ArgumentException("The strings must not be null."); /* * Ported from a Java algorithm by Chas Emerick * <a rel="nofollow" class="t" href="http://www.merriampark.com/ldjava.htm" target="_blank">http://www.merriampark.com/ldjava.htm</a> * */ int n = s.Length; int m = t.Length; if (n == 0) { return m; } else if (m == 0) { return n; } int[] p = new int[n + 1]; int[] d = new int[n + 1]; int[] _d; char t_j; int cost; for (int i = 0; i <= n; i++) { p[i] = i; } for (int j = 1; j <= m; j++) { t_j = t[j - 1]; d[0] = j; for (int i = 1; i <= n; i++) { cost = (s[i - 1] == t_j) ? 0 : 1; d[i] = Math.Min(Math.Min(d[i - 1] + 1, p[i] + 1), p[i - 1] + cost); } _d = p; p = d; d = _d; } return p[n]; }
![]() |
Similar Threads
- experienced Search Engine Optimizer's and Soft works (Post your Resume)
- UK Search Engine Marketing Services (Post your Resume)
- Search Engine Manager needed (Internet Marketing Job Offers)
- Search Engine Optimization (SEO) / Link Building / PPC Management / SEM Services (Post your Resume)
Other Threads in the C# Forum
- Previous Thread: accessing Open network Ports in C#
- Next Thread: send/received data
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access algorithm array barchart bitmap box buttons c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees draganddrop drawing encryption enum event excel file files form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





