[RavenclawDev 294] [1880] Agents: Updated Helios3, Kalliope, NlgServer2, and Phoenix2 to compile under MSVS 2005.
tk@edam.speech.cs.cmu.edu
tk at edam.speech.cs.cmu.edu
Wed Aug 8 17:27:03 EDT 2007
An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20070808/151851e5/attachment-0001.html
-------------- next part --------------
Property changes on: Agents/Helios3
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
Modified: Agents/Helios3/Helios3.vcproj
===================================================================
--- Agents/Helios3/Helios3.vcproj 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Helios3/Helios3.vcproj 2007-08-08 21:27:02 UTC (rev 1880)
@@ -1,126 +1,187 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="Helios3"
ProjectGUID="{93C8F5F8-6C43-4179-9B9F-A31AA6438513}"
- SccProjectName="SAK"
- SccAuxPath="SAK"
- SccLocalPath="SAK"
- SccProvider="SAK"
- Keyword="Win32Proj">
+ RootNamespace="Helios3"
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
- CharacterSet="2">
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\Libraries\Galaxy\contrib\MITRE\utilities\include; ..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="TRUE"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="4"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib ..\..\Libraries\Galaxy\lib\x86-nt\libGalaxy_debug.lib"
OutputFile="$(OutDir)/Helios3.exe"
LinkIncremental="2"
- IgnoreAllDefaultLibraries="FALSE"
- GenerateDebugInformation="TRUE"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/Helios3.pdb"
SubSystem="1"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="2"
- CharacterSet="2">
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- OmitFramePointers="TRUE"
+ OmitFramePointers="true"
AdditionalIncludeDirectories="..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- StringPooling="TRUE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
+ EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib ..\..\Libraries\Galaxy\lib\x86-nt\libGalaxy.lib"
OutputFile="$(OutDir)/Helios3.exe"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"
+ />
</Configuration>
</Configurations>
<References>
@@ -128,120 +189,156 @@
<Files>
<Filter
Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
<File
- RelativePath="FBigram.cpp">
+ RelativePath="FBigram.cpp"
+ >
</File>
<File
- RelativePath="FConfidence.cpp">
+ RelativePath="FConfidence.cpp"
+ >
</File>
<File
- RelativePath="FDialog.cpp">
+ RelativePath="FDialog.cpp"
+ >
</File>
<File
- RelativePath="FGarble.cpp">
+ RelativePath="FGarble.cpp"
+ >
</File>
<File
- RelativePath="FLexicalAnalysis.cpp">
+ RelativePath="FLexicalAnalysis.cpp"
+ >
</File>
<File
- RelativePath="FMarkers.cpp">
+ RelativePath="FMarkers.cpp"
+ >
</File>
<File
- RelativePath="FParse.cpp">
+ RelativePath="FParse.cpp"
+ >
</File>
<File
- RelativePath="FRecognition.cpp">
+ RelativePath="FRecognition.cpp"
+ >
</File>
<File
- RelativePath="Helios.cpp">
+ RelativePath="Helios.cpp"
+ >
</File>
<File
- RelativePath="InputSelector.cpp">
+ RelativePath="InputSelector.cpp"
+ >
</File>
<File
- RelativePath="MetaInput.cpp">
+ RelativePath="MetaInput.cpp"
+ >
</File>
<File
- RelativePath="PhoenixInput.cpp">
+ RelativePath="PhoenixInput.cpp"
+ >
</File>
<File
- RelativePath="Utils.cpp">
+ RelativePath="Utils.cpp"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc">
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
<File
- RelativePath="FBigram.h">
+ RelativePath="FBigram.h"
+ >
</File>
<File
- RelativePath="FConfidence.h">
+ RelativePath="FConfidence.h"
+ >
</File>
<File
- RelativePath="FDialog.h">
+ RelativePath="FDialog.h"
+ >
</File>
<File
- RelativePath="FeatureComputation.h">
+ RelativePath="FeatureComputation.h"
+ >
</File>
<File
- RelativePath="FGarble.h">
+ RelativePath="FGarble.h"
+ >
</File>
<File
- RelativePath="FLexicalAnalysis.h">
+ RelativePath="FLexicalAnalysis.h"
+ >
</File>
<File
- RelativePath="FMarkers.h">
+ RelativePath="FMarkers.h"
+ >
</File>
<File
- RelativePath="FParse.h">
+ RelativePath="FParse.h"
+ >
</File>
<File
- RelativePath="FRecognition.h">
+ RelativePath="FRecognition.h"
+ >
</File>
<File
- RelativePath="Helios.h">
+ RelativePath="Helios.h"
+ >
</File>
<File
- RelativePath="HeliosInterfaceFunctions.h">
+ RelativePath="HeliosInterfaceFunctions.h"
+ >
</File>
<File
- RelativePath="InputSelector.h">
+ RelativePath="InputSelector.h"
+ >
</File>
<File
- RelativePath="MetaInput.h">
+ RelativePath="MetaInput.h"
+ >
</File>
<File
- RelativePath="PhoenixInput.h">
+ RelativePath="PhoenixInput.h"
+ >
</File>
<File
- RelativePath="Utils.h">
+ RelativePath="Utils.h"
+ >
</File>
</Filter>
<Filter
Name="Documentation"
- Filter="">
+ >
<File
- RelativePath="ToDo.txt">
+ RelativePath="ToDo.txt"
+ >
</File>
</Filter>
<Filter
Name="Configuration"
- Filter="">
+ >
<File
- RelativePath="confidence.model">
+ RelativePath="confidence.model"
+ >
</File>
<File
- RelativePath="garble.model">
+ RelativePath="garble.model"
+ >
</File>
<File
- RelativePath="helios.cfg">
+ RelativePath="helios.cfg"
+ >
</File>
<File
- RelativePath="lexical_markers.def">
+ RelativePath="lexical_markers.def"
+ >
</File>
<File
- RelativePath="target_prompts.def">
+ RelativePath="target_prompts.def"
+ >
</File>
</Filter>
</Files>
Modified: Agents/Helios3/PhoenixInput.cpp
===================================================================
--- Agents/Helios3/PhoenixInput.cpp 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Helios3/PhoenixInput.cpp 2007-08-08 21:27:02 UTC (rev 1880)
@@ -159,7 +159,7 @@
while (true) {
// compare the level names
- if (strcmpi( sub_slot.c_str(), sub_patt.c_str()) == 0) {
+ if (_strcmpi( sub_slot.c_str(), sub_patt.c_str()) == 0) {
// the final subslot of both the pattern and the slot matched:
// we won!
Modified: Agents/Helios3/Utils.cpp
===================================================================
--- Agents/Helios3/Utils.cpp 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Helios3/Utils.cpp 2007-08-08 21:27:02 UTC (rev 1880)
@@ -47,14 +47,14 @@
// D: make a string uppercase
string ToUpperCase(string sString) {
strcpy(szBuffer, sString.c_str());
- strupr(szBuffer);
+ _strupr(szBuffer);
return (string)szBuffer;
}
// D: makes a string lowercase
string ToLowerCase(string sString) {
strcpy(szBuffer, sString.c_str());
- strlwr(szBuffer);
+ _strlwr(szBuffer);
return (string)szBuffer;
}
Property changes on: Agents/Kalliope
___________________________________________________________________
Name: svn:ignore
+ SwiftDebug
SwiftRelease
Modified: Agents/Kalliope/Kalliope.cpp
===================================================================
--- Agents/Kalliope/Kalliope.cpp 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Kalliope/Kalliope.cpp 2007-08-08 21:27:02 UTC (rev 1880)
@@ -305,6 +305,43 @@
}
//-----------------------------------------------------------------------------
+// [2006-07-22] (tk): this function can be called by the Galaxy architecture
+// to add voices. useful for dynamic multi-dm architectures.
+// frame includes the dm name and the voice name for that
+// dm. for now at least it only works with swift.
+//-----------------------------------------------------------------------------
+Gal_Frame add_voice(Gal_Frame gfFrame, void *server_data) {
+#ifdef USE_SWIFT
+ // update hub communication structures
+ pLastGalSS_Environment = (GalSS_Environment *)server_data;
+ pHubCommStruct = GalSS_EnvComm(pLastGalSS_Environment);
+
+ DisplayMessage("GXI", "add_voice called.");
+
+ string sName;
+ if(Gal_GetObject(gfFrame, ":name")) {
+ sName = Gal_GetString(gfFrame, ":name");
+ } else {
+ DisplayMessage("GXI", "Error: Could not find 'name' in incoming frame.");
+ Gal_SetProp(gfFrame, ":error", Gal_IntObject(1));
+ return gfFrame;
+ }
+
+ string sVoice;
+ if(Gal_GetObject(gfFrame, ":voice")) {
+ sVoice = Gal_GetString(gfFrame, ":voice");
+ } else {
+ DisplayMessage("GXI", "Error: Could not find 'voice' in incoming frame.");
+ Gal_SetProp(gfFrame, ":error", Gal_IntObject(1));
+ return gfFrame;
+ }
+
+ mssVoiceOf[sName] = sVoice;
+#endif
+ return gfFrame;
+}
+
+//-----------------------------------------------------------------------------
// D: this function is called by the Galaxy architecture each time a "reset"
// request comes in...
//-----------------------------------------------------------------------------
Modified: Agents/Kalliope/Kalliope.vcproj
===================================================================
--- Agents/Kalliope/Kalliope.vcproj 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Kalliope/Kalliope.vcproj 2007-08-08 21:27:02 UTC (rev 1880)
@@ -1,333 +1,514 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="Kalliope"
ProjectGUID="{9CDBFBA5-F7EB-432F-A7CF-2E80322FE2ED}"
- SccProjectName="SAK"
- SccAuxPath="SAK"
- SccLocalPath="SAK"
- SccProvider="SAK"
- Keyword="Win32Proj">
+ RootNamespace="Kalliope"
+ Keyword="Win32Proj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\Libraries\Cepstral\SDK\include\;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_THETA"
- MinimalRebuild="TRUE"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_THETA;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ..\..\Libraries\Cepstral\SDK\lib\theta.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy_debug.lib wsock32.lib"
OutputFile="$(OutDir)/KalliopeTheta.exe"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/Kalliope.pdb"
SubSystem="1"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- OmitFramePointers="TRUE"
+ OmitFramePointers="true"
AdditionalIncludeDirectories="..\..\Libraries\Cepstral\SDK\include\;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include; ..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_THETA"
- StringPooling="TRUE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_THETA;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
+ EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ..\..\Libraries\Cepstral\SDK\lib\theta.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy.lib wsock32.lib"
OutputFile="$(OutDir)/KalliopeTheta.exe"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"
+ />
</Configuration>
<Configuration
Name="FestivalDebug|Win32"
OutputDirectory="FestivalDebug"
IntermediateDirectory="FestivalDebug"
ConfigurationType="1"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\Libraries\Cepstral\SDK\include\;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_FESTIVAL"
- MinimalRebuild="TRUE"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_FESTIVAL;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy_debug.lib wsock32.lib"
OutputFile="$(OutDir)/KalliopeFestival.exe"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/Kalliope.pdb"
SubSystem="1"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"
+ />
</Configuration>
<Configuration
Name="FestivalRelease|Win32"
OutputDirectory="FestivalRelease"
IntermediateDirectory="FestivalRelease"
ConfigurationType="1"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- OmitFramePointers="TRUE"
+ OmitFramePointers="true"
AdditionalIncludeDirectories="..\..\Libraries\Cepstral\SDK\include\;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include; ..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_FESTIVAL"
- StringPooling="TRUE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_FESTIVAL;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
+ EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy.lib wsock32.lib"
OutputFile="$(OutDir)/KalliopeFestival.exe"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"
+ />
</Configuration>
<Configuration
Name="SwiftDebug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\Libraries\Cepstral\SDK\include\;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_SWIFT"
- MinimalRebuild="TRUE"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_SWIFT;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="4"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ..\..\Libraries\Cepstral\SDK\lib\winnt\swift.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy_debug.lib wsock32.lib"
OutputFile="$(OutDir)/KalliopeSwift.exe"
LinkIncremental="2"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/Kalliope.pdb"
SubSystem="1"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName)_debug.exe"
+ />
</Configuration>
<Configuration
Name="SwiftRelease|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- CharacterSet="2">
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- OmitFramePointers="TRUE"
- AdditionalIncludeDirectories="..\..\Libraries\Cepstral\SDK\include\;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\Galaxy\include\"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_SWIFT"
- StringPooling="TRUE"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="..\..\Libraries\Cepstral\SDK\include;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\Galaxy\include\"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_SWIFT;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
+ EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
- Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib ..\..\Libraries\Cepstral\SDK\lib\winnt\swift.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy.lib wsock32.lib"
OutputFile="$(OutDir)/KalliopeSwift.exe"
LinkIncremental="1"
- GenerateDebugInformation="TRUE"
+ GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy $(TargetPath) ..\..\Bin\x86-nt\$(TargetName).exe"
+ />
</Configuration>
</Configurations>
<References>
@@ -335,80 +516,105 @@
<Files>
<Filter
Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
+ >
<File
- RelativePath="FestivalSynthesisManager.cpp">
+ RelativePath="FestivalSynthesisManager.cpp"
+ >
</File>
<File
- RelativePath="Kalliope.cpp">
+ RelativePath="Kalliope.cpp"
+ >
</File>
<File
- RelativePath="PlaybackManager.cpp">
+ RelativePath="PlaybackManager.cpp"
+ >
</File>
<File
- RelativePath="RequestManager.cpp">
+ RelativePath="RequestManager.cpp"
+ >
</File>
<File
- RelativePath="sock.c">
+ RelativePath="sock.c"
+ >
</File>
<File
- RelativePath="sock.h">
+ RelativePath="sock.h"
+ >
</File>
<File
- RelativePath=".\SwiftSynthesisManager.cpp">
+ RelativePath=".\SwiftSynthesisManager.cpp"
+ >
</File>
<File
- RelativePath="ThetaSynthesisManager.cpp">
+ RelativePath="ThetaSynthesisManager.cpp"
+ >
</File>
<File
- RelativePath="Utils.cpp">
+ RelativePath="Utils.cpp"
+ >
</File>
</Filter>
<Filter
Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc">
+ Filter="h;hpp;hxx;hm;inl;inc"
+ >
<File
- RelativePath="FestivalSynthesisManager.h">
+ RelativePath="FestivalSynthesisManager.h"
+ >
</File>
<File
- RelativePath="Kalliope.h">
+ RelativePath="Kalliope.h"
+ >
</File>
<File
- RelativePath="KalliopeInterfaceFunctions.h">
+ RelativePath="KalliopeInterfaceFunctions.h"
+ >
</File>
<File
- RelativePath="PlaybackManager.h">
+ RelativePath="PlaybackManager.h"
+ >
</File>
<File
- RelativePath="prim_type.h">
+ RelativePath="prim_type.h"
+ >
</File>
<File
- RelativePath="RequestManager.h">
+ RelativePath="RequestManager.h"
+ >
</File>
<File
- RelativePath=".\SwiftSynthesisManager.h">
+ RelativePath=".\SwiftSynthesisManager.h"
+ >
</File>
<File
- RelativePath="ThetaSynthesisManager.h">
+ RelativePath="ThetaSynthesisManager.h"
+ >
</File>
<File
- RelativePath="Utils.h">
+ RelativePath="Utils.h"
+ >
</File>
</Filter>
<Filter
Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
<File
- RelativePath="festival.cfg">
+ RelativePath="festival.cfg"
+ >
</File>
<File
- RelativePath=".\swift.cfg">
+ RelativePath=".\swift.cfg"
+ >
</File>
<File
- RelativePath="theta.cfg">
+ RelativePath="theta.cfg"
+ >
</File>
<File
- RelativePath="ToDo.txt">
+ RelativePath="ToDo.txt"
+ >
</File>
</Filter>
</Files>
Modified: Agents/Kalliope/KalliopeInterfaceFunctions.h
===================================================================
--- Agents/Kalliope/KalliopeInterfaceFunctions.h 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Kalliope/KalliopeInterfaceFunctions.h 2007-08-08 21:27:02 UTC (rev 1880)
@@ -26,4 +26,5 @@
GAL_SERVER_OP(speak)
GAL_SERVER_OP(reset)
GAL_SERVER_OP(begin_session)
-GAL_SERVER_OP(end_session)
\ No newline at end of file
+GAL_SERVER_OP(end_session)
+GAL_SERVER_OP(add_voice)
\ No newline at end of file
Modified: Agents/Kalliope/Utils.cpp
===================================================================
--- Agents/Kalliope/Utils.cpp 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Kalliope/Utils.cpp 2007-08-08 21:27:02 UTC (rev 1880)
@@ -47,14 +47,14 @@
// D: make a string uppercase
string ToUpperCase(string sString) {
strcpy(szBuffer, sString.c_str());
- strupr(szBuffer);
+ _strupr(szBuffer);
return (string)szBuffer;
}
// D: makes a string lowercase
string ToLowerCase(string sString) {
strcpy(szBuffer, sString.c_str());
- strlwr(szBuffer);
+ _strlwr(szBuffer);
return (string)szBuffer;
}
Property changes on: Agents/NlgServer2
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
Modified: Agents/NlgServer2/NlgServer2.vcproj
===================================================================
--- Agents/NlgServer2/NlgServer2.vcproj 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/NlgServer2/NlgServer2.vcproj 2007-08-08 21:27:02 UTC (rev 1880)
@@ -1,144 +1,205 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="7.10"
+ Version="8.00"
Name="NlgServer2"
- SccProjectName=""$/CommonAgents/NlgServer2", EQCBAAAA"
- SccAuxPath=""
- SccLocalPath="."
- SccProvider="MSSCCI:Microsoft Visual SourceSafe"
- Keyword="MFCProj">
+ ProjectGUID="{20678B74-4291-4384-B05A-A5EC04DC2BCF}"
+ RootNamespace="NlgServer2"
+ Keyword="MFCProj"
+ >
<Platforms>
<Platform
- Name="Win32"/>
+ Name="Win32"
+ />
</Platforms>
+ <ToolFiles>
+ </ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="2"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/NlgServer2.tlb"
+ HeaderFileName=""
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\Libraries\Galaxy\include;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\sphinx2\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
- UsePrecompiledHeader="2"
+ UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Debug/NlgServer2.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
- SuppressStartupBanner="TRUE"
+ SuppressStartupBanner="true"
DebugInformationFormat="4"
- CompileAs="0"/>
+ CompileAs="0"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy_debug.lib"
OutputFile=".\Debug/NlgServer2.exe"
LinkIncremental="1"
- SuppressStartupBanner="TRUE"
- GenerateDebugInformation="TRUE"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/NlgServer2.pdb"
SubSystem="1"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\Debug/NlgServer2.tlb"
- HeaderFileName=""/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- Description="Copy binary to destination"
- CommandLine="copy "$(TARGETPATH)" ..\..\Bin\x86-nt\"$(TARGETNAME)"-DEBUG.exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy binary to destination"
+ CommandLine="copy "$(TARGETPATH)" ..\..\Bin\x86-nt\"$(TARGETNAME)"-DEBUG.exe"
+ />
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="2"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
<Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/NlgServer2.tlb"
+ HeaderFileName=""
+ />
+ <Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- OptimizeForProcessor="1"
AdditionalIncludeDirectories="..\..\Libraries\Galaxy\include;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\sphinx2\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- StringPooling="TRUE"
+ StringPooling="true"
RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Release/NlgServer2.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
+ SuppressStartupBanner="true"
+ CompileAs="0"
+ />
<Tool
- Name="VCCustomBuildTool"/>
+ Name="VCManagedResourceCompilerTool"
+ />
<Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
Name="VCLinkerTool"
AdditionalDependencies="wsock32.lib ..\..\Libraries\Galaxy\lib\x86-nt\libgalaxy.lib"
OutputFile=".\Release/NlgServer2.exe"
LinkIncremental="1"
- SuppressStartupBanner="TRUE"
+ SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/NlgServer2.pdb"
SubSystem="1"
- TargetMachine="1"/>
+ TargetMachine="1"
+ />
<Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\Release/NlgServer2.tlb"
- HeaderFileName=""/>
+ Name="VCALinkTool"
+ />
<Tool
- Name="VCPostBuildEventTool"
- Description="Copy binary to its destination"
- CommandLine="copy "$(TARGETPATH)" ..\..\bin\x86-nt\"$(TARGETNAME)".exe"/>
+ Name="VCManifestTool"
+ />
<Tool
- Name="VCPreBuildEventTool"/>
+ Name="VCXDCMakeTool"
+ />
<Tool
- Name="VCPreLinkEventTool"/>
+ Name="VCBscMakeTool"
+ />
<Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"/>
+ Name="VCFxCopTool"
+ />
<Tool
- Name="VCWebServiceProxyGeneratorTool"/>
+ Name="VCAppVerifierTool"
+ />
<Tool
- Name="VCXMLDataGeneratorTool"/>
+ Name="VCWebDeploymentTool"
+ />
<Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ Name="VCPostBuildEventTool"
+ Description="Copy binary to its destination"
+ CommandLine="copy "$(TARGETPATH)" ..\..\bin\x86-nt\"$(TARGETNAME)".exe"
+ />
</Configuration>
</Configurations>
<References>
@@ -146,65 +207,77 @@
<Files>
<Filter
Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
<File
- RelativePath="nlg.c">
+ RelativePath="nlg.c"
+ >
<FileConfiguration
- Name="Debug|Win32">
+ Name="Debug|Win32"
+ >
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
+ BasicRuntimeChecks="3"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
+ PreprocessorDefinitions=""
+ />
</FileConfiguration>
</File>
<File
- RelativePath="sockcli.c">
+ RelativePath="sockcli.c"
+ >
<FileConfiguration
- Name="Debug|Win32">
+ Name="Debug|Win32"
+ >
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
+ BasicRuntimeChecks="3"
+ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32">
+ Name="Release|Win32"
+ >
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
+ PreprocessorDefinitions=""
+ />
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
+ Filter="h;hpp;hxx;hm;inl"
+ >
<File
- RelativePath=".\nlg_server.h">
+ RelativePath=".\nlg_server.h"
+ >
</File>
<File
- RelativePath=".\sockcli.h">
+ RelativePath=".\sockcli.h"
+ >
</File>
</Filter>
<Filter
Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
</Filter>
- <File
- RelativePath="E:\Microsoft Visual.NET\VC98\Include\BASETSD.H">
- </File>
</Files>
<Globals>
</Globals>
Modified: Agents/NlgServer2/sockcli.c
===================================================================
--- Agents/NlgServer2/sockcli.c 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/NlgServer2/sockcli.c 2007-08-08 21:27:02 UTC (rev 1880)
@@ -290,7 +290,7 @@
memcpy (&addr.sin_addr, hp->h_addr, hp->h_length);
addr.sin_port = htons((u_short) port);
- if (connect (conn_sd, &addr, sizeof(addr)) == 0)
+ if (connect (conn_sd, (SOCKADDR *)&addr, sizeof(addr)) == 0)
break;
print_errno ("connect");
cli_close (conn_sd);
Property changes on: Agents/Phoenix2
___________________________________________________________________
Name: svn:ignore
+ Debug
Release
Modified: Agents/Phoenix2/dict.c
===================================================================
--- Agents/Phoenix2/dict.c 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Phoenix2/dict.c 2007-08-08 21:27:02 UTC (rev 1880)
@@ -1,4 +1,5 @@
-#include <stdio.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "parse.h"
@@ -57,7 +58,6 @@
{
unsigned short key;
char *c;
- double ratio;
int idx;
Modified: Agents/Phoenix2/functions.h
===================================================================
--- Agents/Phoenix2/functions.h 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Phoenix2/functions.h 2007-08-08 21:27:02 UTC (rev 1880)
@@ -1,3 +1,8 @@
+#ifndef FUNCTIONS_H
+#define FUNCTIONS_H
+
+#include "parse.h"
+
/* function declarations */
extern int match_net ();
extern void reset ();
@@ -12,3 +17,5 @@
extern int read_dict ();
extern void read_forms ();
+
+#endif
\ No newline at end of file
Modified: Agents/Phoenix2/gal_phoenix.c
===================================================================
--- Agents/Phoenix2/gal_phoenix.c 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Phoenix2/gal_phoenix.c 2007-08-08 21:27:02 UTC (rev 1880)
@@ -48,11 +48,6 @@
NULL
};
-static Gram *gram;
-static int num_nets;
-static int num_forms;
-static int max_pri;
-
extern int ALL_PARSES;
Gal_Frame ExtractParseStruct(int lPNum, Gram *pGram);
@@ -175,18 +170,8 @@
strcpy(priority_file, xxx);
}
- /* read grammar */
- gram= read_grammar(dir, dict_file, grammar_file, forms_file, priority_file);
-
- /* if several grammar used, use max values, this mallocs space */
- num_nets= gram->num_nets;
- num_forms= gram->num_forms;
- max_pri=gram->max_pri;
-
ALL_PARSES = 1;
- /* initialize parser, malloc space, etc */
- /* init_parse(num_nets, num_forms, max_pri); old style */
init_parse(dir, dict_file, grammar_file, forms_file, priority_file);
GalUtil_Print(-1, "phoenix initialized\n");
@@ -198,6 +183,13 @@
static char p_out[100000];
+// [2006-07-14] (tk)
+Gal_Frame restart_decoder(Gal_Frame f, void *server_data)
+{
+ GalUtil_Print(-1, "restart_decoder\n");
+ reinit_parse(dir, dict_file, grammar_file, forms_file, priority_file);
+ return f;
+}
Gal_Frame phoenixparse(Gal_Frame f, void *server_data)
{
Modified: Agents/Phoenix2/grammar.c
===================================================================
--- Agents/Phoenix2/grammar.c 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Phoenix2/grammar.c 2007-08-08 21:27:02 UTC (rev 1880)
@@ -3,74 +3,10 @@
#include <stdlib.h>
#include <malloc.h>
-#include "parse.h"
#include "globals_gram.h"
#include "functions.h"
+#include "pconf.h"
-
-
-Gram *read_grammar(dir, dict_file, grammar_file, forms_file, priority_file)
- char *dir, *dict_file, *grammar_file, *forms_file, *priority_file;
-{
- Gram *gram;
- char name[LABEL_LEN];
- char *sym_ptr, *sym_buf_end;
- int i,
- num;
- FILE *fp;
-
- /* malloc structure to hold grammar configuration */
- if( !(gram= (Gram *) calloc(1, sizeof(Gram))) ) {
- fprintf(stderr, "ERROR: malloc for grammar failed\n");
- exit(-1);
- }
-
- /* malloc space for symbol buffer */
- if( !(gram->sym_buf=(char *)malloc(SymBufSize * sizeof(char)))){
- fprintf(stderr, "ERROR: can't allocate space for script buffer\n");
- exit(-1);
- }
- sym_ptr= gram->sym_buf;
- sym_buf_end= gram->sym_buf + SymBufSize;
-
-
- /* read dictionary word strings */
- gram->num_words= read_dict(dir, dict_file, gram, &sym_ptr, sym_buf_end);
-
- /* read RTNs */
- sprintf(name, "%s/%s", dir, grammar_file);
- read_nets(name, gram, &sym_ptr, sym_buf_end);
-
- /* read forms and create active set of nets */
- read_forms(dir, forms_file, gram, &sym_ptr, sym_buf_end);
-
- gram->priorities= (unsigned char *)0;
- gram->max_pri= 0;
-
- sprintf(name, "%s/%s", dir, priority_file);
- if( (fp= fopen(name, "r")) ) {
- if( !(gram->priorities= (unsigned char *) malloc(gram->num_nets)) ) {
- fprintf(stderr, "ERROR: malloc priority failed\n");
- exit(-1);
- }
- for(i=0; i < gram->num_nets; i++) gram->priorities[i]= (unsigned char)0;
- name[0]='[';
- while( fscanf(fp, "%s %d", name+1, &num) == 2 ) {
- strcat(name,"]");
- i= find_net(name, gram);
- if( i < 0 ) {
- fprintf(stderr, "WARNING: Can't find net %s for priority\n",
- name);
- continue;
- }
- gram->priorities[i]= (unsigned char) num;
- if( num > gram->max_pri) gram->max_pri= num;
- }
- fclose(fp);
- }
- return(gram);
-}
-
read_nets(net_file, gram, sb_start, sym_buf_end)
char *net_file, **sb_start, *sym_buf_end;
Gram *gram;
@@ -79,9 +15,7 @@
Gnode *net,
*gnode;
Gsucc *succ;
- char name[LABEL_LEN],
- *sym_ptr,
- *s, *t;
+ char name[LABEL_LEN], *sym_ptr;
int num_nodes,
net_num,
num_nets,
@@ -192,10 +126,82 @@
*sb_start= sym_ptr;
}
+find_net(char *name, Gram *gram)
+{
+ int i;
+ if( !*name ) return(-1);
+ for( i=1; i < gram->num_nets; i++ ) {
+ if(!strcmp(gram->labels[i], name) ) break;
+ }
+ if( i < gram->num_nets ) return(i);
+ return(-1);
+}
+Gram *read_grammar(dir, dict_file, grammar_file, forms_file, priority_file)
+ char *dir, *dict_file, *grammar_file, *forms_file, *priority_file;
+{
+ Gram *gram;
+ char name[LABEL_LEN];
+ char *sym_ptr, *sym_buf_end;
+ int i,
+ num;
+ FILE *fp;
+
+ /* malloc structure to hold grammar configuration */
+ if( !(gram= (Gram *) calloc(1, sizeof(Gram))) ) {
+ fprintf(stderr, "ERROR: malloc for grammar failed\n");
+ exit(-1);
+ }
+
+ /* malloc space for symbol buffer */
+ if( !(gram->sym_buf=(char *)malloc(SymBufSize * sizeof(char)))){
+ fprintf(stderr, "ERROR: can't allocate space for script buffer\n");
+ exit(-1);
+ }
+ sym_ptr= gram->sym_buf;
+ sym_buf_end= gram->sym_buf + SymBufSize;
+
+
+ /* read dictionary word strings */
+ gram->num_words= read_dict(dir, dict_file, gram, &sym_ptr, sym_buf_end);
+
+ /* read RTNs */
+ sprintf(name, "%s/%s", dir, grammar_file);
+ read_nets(name, gram, &sym_ptr, sym_buf_end);
+
+ /* read forms and create active set of nets */
+ read_forms(dir, forms_file, gram, &sym_ptr, sym_buf_end);
+
+ gram->priorities= (unsigned char *)0;
+ gram->max_pri= 0;
+
+ sprintf(name, "%s/%s", dir, priority_file);
+ if( (fp= fopen(name, "r")) ) {
+ if( !(gram->priorities= (unsigned char *) malloc(gram->num_nets)) ) {
+ fprintf(stderr, "ERROR: malloc priority failed\n");
+ exit(-1);
+ }
+ for(i=0; i < gram->num_nets; i++) gram->priorities[i]= (unsigned char)0;
+ name[0]='[';
+ while( fscanf(fp, "%s %d", name+1, &num) == 2 ) {
+ strcat(name,"]");
+ i= find_net(name, gram);
+ if( i < 0 ) {
+ fprintf(stderr, "WARNING: Can't find net %s for priority\n",
+ name);
+ continue;
+ }
+ gram->priorities[i]= (unsigned char) num;
+ if( num > gram->max_pri) gram->max_pri= num;
+ }
+ fclose(fp);
+ }
+ return(gram);
+}
+
void read_forms(dir, forms_file, gram, sb_start, sym_buf_end)
char *dir, *forms_file, **sb_start, *sym_buf_end;
Gram *gram;
@@ -316,17 +322,4 @@
}
-find_net(char *name, Gram *gram)
-{
- int i;
- if( !*name ) return(-1);
- for( i=1; i < gram->num_nets; i++ ) {
- if(!strcmp(gram->labels[i], name) ) break;
- }
-
- if( i < gram->num_nets ) return(i);
- return(-1);
-
-}
-
Modified: Agents/Phoenix2/grammar.h
===================================================================
--- Agents/Phoenix2/grammar.h 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Phoenix2/grammar.h 2007-08-08 21:27:02 UTC (rev 1880)
@@ -1,3 +1,6 @@
+#ifndef GRAMMAR_H
+#define GRAMMAR_H
+
#define MAX_WRDS 0xFFFF /* max words in lexicon */
#define LABEL_LEN 200 /* max length of labels */
#define LINE_LEN 10000 /* max length line buffer */
@@ -38,3 +41,4 @@
char rw; /* has been rewritten flag */
} non_term;
+#endif
\ No newline at end of file
Modified: Agents/Phoenix2/match.c
===================================================================
--- Agents/Phoenix2/match.c 2007-08-08 14:48:53 UTC (rev 1879)
+++ Agents/Phoenix2/match.c 2007-08-08 21:27:02 UTC (rev 1880)
@@ -9,69 +9,123 @@
static int cur_paths; /* number of paths explored for net, debug */
-/* produce all parse trees for given net starting at word position
- add trees found to chart
- Creates an initial path nodes and recursively calls expand_path()
-*/
-int match_net(int net, int word_pos, Gram *gram)
+void clear_chart(int num_nets) {
+ int i;
+
+ /* clear chart */
+ for(i=0; i < num_nets; i++) chart[i]= 0;
+}
+
+/* return 0 if net not tried, 1 if matched, -1 if not matched */
+/* set ptr to edge matched, 0 if not */
+int check_chart(net, word_pos, edge)
+ int net, word_pos;
+ Edge **edge;
{
- EdgeLink *prev, *next;
- Path path;
- int expand_path_ret;
+ EdgeLink *next;
- cur_paths= 0; /* clear path counter used for debugging */
+ for( next= chart[net]; next; next= next->link) {
+ if(word_pos <= next->sw) break;
+ }
+ *edge= 0;
+ if( !next ) return(0);
+ if( word_pos != next->sw ) return(0);
+ if(!next->edge) return(-1);
+ *edge= next->edge;
+ return(1);
+}
- /* create initial path node, with start state of net */
- path.state= gram->Nets[net];
- path.net= net;
- path.sw= word_pos;
- path.ew= 0;
- path.score= 0;
- path.nchld= 0;
- path.word_pos= word_pos;
+/* add matched token to chart */
+static int add_to_chart(path)
+ Path *path;
+{
+ Edge *prev, *next, *e;
+ EdgeLink *eln;
+ int i;
- if( debug > 5 ) {
- printf("match_net: %s %d\n", gram->labels[net], word_pos);
+ if( edge_ptr == edge_buf_end ) {
+ printf("ERROR: edge buffer overflow, EdgeBufSize= %d\n", EdgeBufSize);
+ return(-1);
}
- /* add to chart with edge= 0 in case no parse */
- if( edge_link_ptr == edge_link_end ) {
- printf("ERROR: edge link buffer overflow, ChartBufSize= %d\n",
- ChartBufSize);
+ /* find pointer entry in chart for net, start word */
+ for(eln= chart[path->net]; eln; eln= eln->link) {
+ if( eln->sw == path->sw ) break;
+ }
+ if( !eln ) {
+ printf("ERROR: no entry in chart for net %d sw %d\n",
+ path->net, path->sw);
return(-1);
}
- edge_link_ptr->sw= word_pos;
- edge_link_ptr->edge= 0;
- /* find position in chart list for net */
+ /* find position in list to insert */
prev= 0;
- for( next= chart[net]; next; next= next->link) {
- if(word_pos <= next->sw) break;
- prev= next;
+ if( !eln->edge ) {
}
- if( next && (word_pos == next->sw) ) {
- /* net already matched */
+ else {
+ for(next= eln->edge; next; prev= next, next= next->link) {
+ if(path->sw > next->sw) continue;
+ if( (path->sw == next->sw) &&
+ (path->ew > next->ew) ) continue;
+ break;
+ }
+
+ /* if repeat of existing edge, don't add */
+ for( e=next; e; e= e->link) {
+ if( path->sw != e->sw) break;
+ if( path->ew != e->ew) break;
+ if( path->nchld != e->nchld ) break;
+ for( i=1; i < path->nchld; i++) {
+ if( path->chld[i] != e->chld[i] ) break;
+ }
+ if( i >= path->nchld ) return(0);
+ }
}
- else if( !prev ) {
- /* insert at head of list */
- edge_link_ptr->link= chart[net];
- chart[net]= edge_link_ptr;
- edge_link_ptr++;
+
+ /* copy path to edge */
+ edge_ptr->net= path->net;
+ edge_ptr->sw= path->sw;
+ edge_ptr->ew= path->ew;
+ edge_ptr->score= path->score;
+ edge_ptr->nchld= path->nchld;
+
+ if( (pe_buf_ptr + path->nchld +1) > pe_buf_end ) {
+ printf("ERROR: overflow, PeBufSize= %d\n", PeBufSize);
+ return(-1);
}
+ edge_ptr->nchld= path->nchld;
+ edge_ptr->chld= pe_buf_ptr;
+ for(i=0; i < path->nchld; i++) *(pe_buf_ptr++)= path->chld[i];
+
+ /* insert edge in list for net, sw */
+ if( !prev ) {
+ /* insert at head */
+ edge_ptr->link= eln->edge;
+ eln->edge= edge_ptr;
+ }
else {
- /* insert in list */
- edge_link_ptr->link= prev->link;
- prev->link= edge_link_ptr;
- edge_link_ptr++;
+ edge_ptr->link= next;
+ prev->link= edge_ptr;
}
- /* explore all paths leaving state */
- if( (expand_path_ret=expand_path(&path, gram)) < 0) return(expand_path_ret);
+ edge_ptr++;
return(0);
}
+/* see if path is in final state or can trace through nulls to one */
+static int check_final( path )
+ Path *path;
+{
+ if( !path->state->final ) return(0);
+ /* update end word of phrase */
+ if ( path->word_pos <= 0 ) {
+ printf ( "\nWARNING: null path encountered in net %d.\n", path->net );
+ return (-1);
+ }
+ path->ew= path->word_pos-1;
+ return( add_to_chart( path ) );
+}
-
static int expand_path( path, gram )
Path *path;
Gram *gram;
@@ -160,102 +214,70 @@
}
-/* add matched token to chart */
-static int add_to_chart(path)
- Path *path;
+/* produce all parse trees for given net starting at word position
+ add trees found to chart
+ Creates an initial path nodes and recursively calls expand_path()
+*/
+int match_net(int net, int word_pos, Gram *gram)
{
- Edge *prev, *next, *e;
- EdgeLink *eln;
- int i;
+ EdgeLink *prev, *next;
+ Path path;
+ int expand_path_ret;
- if( edge_ptr == edge_buf_end ) {
- printf("ERROR: edge buffer overflow, EdgeBufSize= %d\n", EdgeBufSize);
- return(-1);
- }
+ cur_paths= 0; /* clear path counter used for debugging */
- /* find pointer entry in chart for net, start word */
- for(eln= chart[path->net]; eln; eln= eln->link) {
- if( eln->sw == path->sw ) break;
+ /* create initial path node, with start state of net */
+ path.state= gram->Nets[net];
+ path.net= net;
+ path.sw= word_pos;
+ path.ew= 0;
+ path.score= 0;
+ path.nchld= 0;
+ path.word_pos= word_pos;
+
+ if( debug > 5 ) {
+ printf("match_net: %s %d\n", gram->labels[net], word_pos);
}
- if( !eln ) {
- printf("ERROR: no entry in chart for net %d sw %d\n",
- path->net, path->sw);
+
+ /* add to chart with edge= 0 in case no parse */
+ if( edge_link_ptr == edge_link_end ) {
+ printf("ERROR: edge link buffer overflow, ChartBufSize= %d\n",
+ ChartBufSize);
return(-1);
}
+ edge_link_ptr->sw= word_pos;
+ edge_link_ptr->edge= 0;
- /* find position in list to insert */
+ /* find position in chart list for net */
prev= 0;
- if( !eln->edge ) {
+ for( next= chart[net]; next; next= next->link) {
+ if(word_pos <= next->sw) break;
+ prev= next;
}
- else {
- for(next= eln->edge; next; prev= next, next= next->link) {
- if(path->sw > next->sw) continue;
- if( (path->sw == next->sw) &&
- (path->ew > next->ew) ) continue;
- break;
- }
-
- /* if repeat of existing edge, don't add */
- for( e=next; e; e= e->link) {
- if( path->sw != e->sw) break;
- if( path->ew != e->ew) break;
- if( path->nchld != e->nchld ) break;
- for( i=1; i < path->nchld; i++) {
- if( path->chld[i] != e->chld[i] ) break;
- }
- if( i >= path->nchld ) return(0);
- }
+ if( next && (word_pos == next->sw) ) {
+ /* net already matched */
}
-
- /* copy path to edge */
- edge_ptr->net= path->net;
- edge_ptr->sw= path->sw;
- edge_ptr->ew= path->ew;
- edge_ptr->score= path->score;
- edge_ptr->nchld= path->nchld;
-
- if( (pe_buf_ptr + path->nchld +1) > pe_buf_end ) {
- printf("ERROR: overflow, PeBufSize= %d\n", PeBufSize);
- return(-1);
+ else if( !prev ) {
+ /* insert at head of list */
+ edge_link_ptr->link= chart[net];
+ chart[net]= edge_link_ptr;
+ edge_link_ptr++;
}
- edge_ptr->nchld= path->nchld;
- edge_ptr->chld= pe_buf_ptr;
- for(i=0; i < path->nchld; i++) *(pe_buf_ptr++)= path->chld[i];
-
- /* insert edge in list for net, sw */
- if( !prev ) {
- /* insert at head */
- edge_ptr->link= eln->edge;
- eln->edge= edge_ptr;
- }
else {
- edge_ptr->link= next;
- prev->link= edge_ptr;
+ /* insert in list */
+ edge_link_ptr->link= prev->link;
+ prev->link= edge_link_ptr;
+ edge_link_ptr++;
}
@@ Diff output truncated at 60000 characters. @@
More information about the Ravenclaw-developers
mailing list