Click here to Skip to main content
15,886,806 members
Articles / Programming Languages / C++

Implement Phonetic ("Sounds-like") Name Searches with Double Metaphone Part I: Introduction & C++ Implementation

Rate me:
Please Sign up or sign in to vote.
4.91/5 (21 votes)
19 Mar 2007CPOL15 min read 148K   2.8K   60  
Introduces the Double Metaphone algorithm for phonetic comparison of proper names, and provides a practical C++ implementation for use in the reader's projects.
<?xml version="1.0" encoding="Windows-1252" ?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="7.00"
	Name="MetaphoneCOMPS"
	ProjectGUID="{93E7C5CE-1634-465E-BBC7-B0B91D85297F}"
	Keyword="AtlPSProj">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="DebugPS"
			IntermediateDirectory="DebugPS"
			ConfigurationType="2">
			<Tool
				Name="VCCLCompilerTool"
				PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;REGISTER_PROXY_DLL;_DEBUG"
				RuntimeLibrary="3"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
				ModuleDefinitionFile="MetaphoneCOMPS.def"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"
				Description="Checking for required files"
				CommandLine="if exist dlldata.c goto :END
echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.
Exit 1
:END
"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="ReleasePS"
			IntermediateDirectory="ReleasePS"
			ConfigurationType="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="3"
				PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;REGISTER_PROXY_DLL;NDEBUG"
				RuntimeLibrary="2"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
				ModuleDefinitionFile="MetaphoneCOMPS.def"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"
				Description="Checking for required files"
				CommandLine="if exist dlldata.c goto :END
echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.
Exit 1
:END
"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
		</Configuration>
	</Configurations>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
			<File
				RelativePath="MetaphoneCOMps.def">
			</File>
		</Filter>
		<Filter
			Name="Generated Files"
			SourceControlFiles="FALSE">
			<File
				RelativePath="_MetaphoneCOM_i.c">
			</File>
			<File
				RelativePath="_MetaphoneCOM_p.c">
			</File>
			<File
				RelativePath="dlldata.c">
			</File>
		</Filter>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
My name is Adam Nelson. I've been a professional programmer since 1996, working on everything from database development, early first-generation web applications, modern n-tier distributed apps, high-performance wireless security tools, to my last job as a Senior Consultant at BearingPoint posted in Baghdad, Iraq training Iraqi developers in the wonders of C# and ASP.NET. I am currently an Engineering Director at Dell.

I have a wide range of skills and interests, including cryptography, image processing, computational linguistics, military history, 3D graphics, database optimization, and mathematics, to name a few.

Comments and Discussions