diff options
author | Eva Hasler <ehasler@saxnot.inf.ed.ac.uk> | 2012-03-27 17:24:49 +0400 |
---|---|---|
committer | Eva Hasler <ehasler@saxnot.inf.ed.ac.uk> | 2012-03-27 17:24:49 +0400 |
commit | f5a4d61fd485797e412664f241038fb859457387 (patch) | |
tree | e1dfbbc31d0e198188df4b84c0fa1251492f9ac4 /moses | |
parent | 74b5907ae756a8d7708ef709965e3d2f80d22040 (diff) | |
parent | 5a17ef82b3c7449d9fb3686875a7936193e14a89 (diff) |
resolving conflicts
Diffstat (limited to 'moses')
141 files changed, 1528 insertions, 2403 deletions
diff --git a/moses/moses.vcxproj b/moses/moses.vcxproj deleted file mode 100644 index 1366995f3..000000000 --- a/moses/moses.vcxproj +++ /dev/null @@ -1,328 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{8122157A-0DE5-44FF-8E5B-024ED6ACE7AF}</ProjectGuid>
- <RootNamespace>moses</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files\boost\boost_1_47;$(IncludePath)</IncludePath>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Program Files\boost\boost_1_47;$(IncludePath)</IncludePath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>C:\Program Files\boost\boost_1_47;$(SolutionDir)/moses/src;$(SolutionDir)/kenlm;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Lib>
- <OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>C:\Program Files\boost\boost_1_47;$(SolutionDir)/moses/src;$(SolutionDir)/kenlm;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Lib>
- <OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
- </Lib>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="src\AlignmentInfo.cpp" />
- <ClCompile Include="src\AlignmentInfoCollection.cpp" />
- <ClCompile Include="src\BitmapContainer.cpp" />
- <ClCompile Include="src\ChartCell.cpp" />
- <ClCompile Include="src\ChartCellCollection.cpp" />
- <ClCompile Include="src\ChartHypothesis.cpp" />
- <ClCompile Include="src\ChartHypothesisCollection.cpp" />
- <ClCompile Include="src\ChartManager.cpp" />
- <ClCompile Include="src\ChartRuleLookupManagerMemory.cpp" />
- <ClCompile Include="src\ChartRuleLookupManagerOnDisk.cpp" />
- <ClCompile Include="src\ChartTranslationOption.cpp" />
- <ClCompile Include="src\ChartTranslationOptionCollection.cpp" />
- <ClCompile Include="src\ChartTranslationOptionList.cpp" />
- <ClCompile Include="src\ChartTrellisDetour.cpp" />
- <ClCompile Include="src\ChartTrellisDetourQueue.cpp" />
- <ClCompile Include="src\ChartTrellisNode.cpp" />
- <ClCompile Include="src\ChartTrellisPath.cpp" />
- <ClCompile Include="src\ConfusionNet.cpp" />
- <ClCompile Include="src\DecodeFeature.cpp" />
- <ClCompile Include="src\DecodeGraph.cpp" />
- <ClCompile Include="src\DecodeStep.cpp" />
- <ClCompile Include="src\DecodeStepGeneration.cpp" />
- <ClCompile Include="src\DecodeStepTranslation.cpp" />
- <ClCompile Include="src\Dictionary.cpp" />
- <ClCompile Include="src\DotChart.cpp" />
- <ClCompile Include="src\DotChartInMemory.cpp" />
- <ClCompile Include="src\DotChartOnDisk.cpp" />
- <ClCompile Include="src\DummyScoreProducers.cpp" />
- <ClCompile Include="src\Factor.cpp" />
- <ClCompile Include="src\FactorCollection.cpp" />
- <ClCompile Include="src\FactorTypeSet.cpp" />
- <ClCompile Include="src\FeatureFunction.cpp" />
- <ClCompile Include="src\FFState.cpp" />
- <ClCompile Include="src\File.cpp" />
- <ClCompile Include="src\FloydWarshall.cpp" />
- <ClCompile Include="src\GenerationDictionary.cpp" />
- <ClCompile Include="src\GlobalLexicalModel.cpp" />
- <ClCompile Include="src\hash.cpp" />
- <ClCompile Include="src\Hypothesis.cpp" />
- <ClCompile Include="src\HypothesisStack.cpp" />
- <ClCompile Include="src\HypothesisStackCubePruning.cpp" />
- <ClCompile Include="src\HypothesisStackNormal.cpp" />
- <ClCompile Include="src\InputFileStream.cpp" />
- <ClCompile Include="src\InputType.cpp" />
- <ClCompile Include="src\LexicalReordering.cpp" />
- <ClCompile Include="src\LexicalReorderingState.cpp" />
- <ClCompile Include="src\LexicalReorderingTable.cpp" />
- <ClCompile Include="src\LMList.cpp" />
- <ClCompile Include="src\LM\Base.cpp" />
- <ClCompile Include="src\LM\Factory.cpp" />
- <ClCompile Include="src\LM\Implementation.cpp" />
- <ClCompile Include="src\LM\Joint.cpp" />
- <ClCompile Include="src\LM\MultiFactor.cpp" />
- <ClCompile Include="src\LM\SingleFactor.cpp" />
- <ClCompile Include="src\LVoc.cpp" />
- <ClCompile Include="src\Manager.cpp" />
- <ClCompile Include="src\Parameter.cpp" />
- <ClCompile Include="src\PartialTranslOptColl.cpp" />
- <ClCompile Include="src\PCNTools.cpp" />
- <ClCompile Include="src\Phrase.cpp" />
- <ClCompile Include="src\PhraseDictionary.cpp" />
- <ClCompile Include="src\PhraseDictionaryMemory.cpp" />
- <ClCompile Include="src\PhraseDictionaryNode.cpp">
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
- <XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
- <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
- <XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
- </ClCompile>
- <ClCompile Include="src\PhraseDictionaryNodeSCFG.cpp" />
- <ClCompile Include="src\PhraseDictionaryOnDisk.cpp" />
- <ClCompile Include="src\PhraseDictionarySCFG.cpp" />
- <ClCompile Include="src\PhraseDictionaryTree.cpp" />
- <ClCompile Include="src\PhraseDictionaryTreeAdaptor.cpp" />
- <ClCompile Include="src\PrefixTreeMap.cpp" />
- <ClCompile Include="src\ReorderingConstraint.cpp" />
- <ClCompile Include="src\ReorderingStack.cpp" />
- <ClCompile Include="src\RuleCube.cpp" />
- <ClCompile Include="src\RuleCubeItem.cpp" />
- <ClCompile Include="src\RuleCubeQueue.cpp" />
- <ClCompile Include="src\RuleTableLoaderCompact.cpp" />
- <ClCompile Include="src\RuleTableLoaderFactory.cpp" />
- <ClCompile Include="src\RuleTableLoaderStandard.cpp" />
- <ClCompile Include="src\ScoreComponentCollection.cpp" />
- <ClCompile Include="src\ScoreIndexManager.cpp" />
- <ClCompile Include="src\ScoreProducer.cpp" />
- <ClCompile Include="src\Search.cpp" />
- <ClCompile Include="src\SearchCubePruning.cpp" />
- <ClCompile Include="src\SearchNormal.cpp" />
- <ClCompile Include="src\Sentence.cpp" />
- <ClCompile Include="src\SentenceStats.cpp" />
- <ClCompile Include="src\SquareMatrix.cpp" />
- <ClCompile Include="src\StaticData.cpp" />
- <ClCompile Include="src\TargetPhrase.cpp" />
- <ClCompile Include="src\TargetPhraseCollection.cpp" />
- <ClCompile Include="src\ThreadPool.cpp" />
- <ClCompile Include="src\Timer.cpp" />
- <ClCompile Include="src\TranslationOption.cpp" />
- <ClCompile Include="src\TranslationOptionCollection.cpp" />
- <ClCompile Include="src\TranslationOptionCollectionConfusionNet.cpp" />
- <ClCompile Include="src\TranslationOptionCollectionText.cpp" />
- <ClCompile Include="src\TranslationOptionList.cpp" />
- <ClCompile Include="src\TranslationSystem.cpp" />
- <ClCompile Include="src\TreeInput.cpp" />
- <ClCompile Include="src\TrellisPath.cpp" />
- <ClCompile Include="src\TrellisPathCollection.cpp" />
- <ClCompile Include="src\UserMessage.cpp" />
- <ClCompile Include="src\Util.cpp" />
- <ClCompile Include="src\Word.cpp" />
- <ClCompile Include="src\WordLattice.cpp" />
- <ClCompile Include="src\WordsBitmap.cpp" />
- <ClCompile Include="src\WordsRange.cpp" />
- <ClCompile Include="src\XmlOption.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\AlignmentInfo.h" />
- <ClInclude Include="src\AlignmentInfoCollection.h" />
- <ClInclude Include="src\BilingualDynSuffixArray.h" />
- <ClInclude Include="src\BitmapContainer.h" />
- <ClInclude Include="src\CellCollection.h" />
- <ClInclude Include="src\ChartCell.h" />
- <ClInclude Include="src\ChartCellCollection.h" />
- <ClInclude Include="src\ChartHypothesis.h" />
- <ClInclude Include="src\ChartHypothesisCollection.h" />
- <ClInclude Include="src\ChartManager.h" />
- <ClInclude Include="src\ChartRuleLookupManager.h" />
- <ClInclude Include="src\ChartRuleLookupManagerMemory.h" />
- <ClInclude Include="src\ChartRuleLookupManagerOnDisk.h" />
- <ClInclude Include="src\ChartTranslationOption.h" />
- <ClInclude Include="src\ChartTranslationOptionCollection.h" />
- <ClInclude Include="src\ChartTranslationOptionList.h" />
- <ClInclude Include="src\ChartTrellisDetour.h" />
- <ClInclude Include="src\ChartTrellisDetourQueue.h" />
- <ClInclude Include="src\ChartTrellisNode.h" />
- <ClInclude Include="src\ChartTrellisPath.h" />
- <ClInclude Include="src\ChartTrellisPathCollection.h" />
- <ClInclude Include="src\ChartTrellisPathList.h" />
- <ClInclude Include="src\ConfusionNet.h" />
- <ClInclude Include="src\DecodeFeature.h" />
- <ClInclude Include="src\DecodeGraph.h" />
- <ClInclude Include="src\DecodeStep.h" />
- <ClInclude Include="src\DecodeStepGeneration.h" />
- <ClInclude Include="src\DecodeStepTranslation.h" />
- <ClInclude Include="src\Dictionary.h" />
- <ClInclude Include="src\DotChart.h" />
- <ClInclude Include="src\DotChartInMemory.h" />
- <ClInclude Include="src\DotChartOnDisk.h" />
- <ClInclude Include="src\DummyScoreProducers.h" />
- <ClInclude Include="src\DynSuffixArray.h" />
- <ClInclude Include="src\Factor.h" />
- <ClInclude Include="src\FactorCollection.h" />
- <ClInclude Include="src\FactorTypeSet.h" />
- <ClInclude Include="src\FeatureFunction.h" />
- <ClInclude Include="src\FFState.h" />
- <ClInclude Include="src\File.h" />
- <ClInclude Include="src\FilePtr.h" />
- <ClInclude Include="src\FloydWarshall.h" />
- <ClInclude Include="src\GenerationDictionary.h" />
- <ClInclude Include="src\GlobalLexicalModel.h" />
- <ClInclude Include="src\gzfilebuf.h" />
- <ClInclude Include="src\hash.h" />
- <ClInclude Include="src\Hypothesis.h" />
- <ClInclude Include="src\HypothesisStack.h" />
- <ClInclude Include="src\HypothesisStackCubePruning.h" />
- <ClInclude Include="src\HypothesisStackNormal.h" />
- <ClInclude Include="src\InputFileStream.h" />
- <ClInclude Include="src\InputType.h" />
- <ClInclude Include="src\LexicalReordering.h" />
- <ClInclude Include="src\LexicalReorderingState.h" />
- <ClInclude Include="src\LexicalReorderingTable.h" />
- <ClInclude Include="src\LMList.h" />
- <ClInclude Include="src\LM\Base.h" />
- <ClInclude Include="src\LM\Factory.h" />
- <ClInclude Include="src\LM\Implementation.h" />
- <ClInclude Include="src\LM\Joint.h" />
- <ClInclude Include="src\LM\MultiFactor.h" />
- <ClInclude Include="src\LM\SingleFactor.h" />
- <ClInclude Include="src\LVoc.h" />
- <ClInclude Include="src\Manager.h" />
- <ClInclude Include="src\NGramCollection.h" />
- <ClInclude Include="src\NGramNode.h" />
- <ClInclude Include="src\NonTerminal.h" />
- <ClInclude Include="src\ObjectPool.h" />
- <ClInclude Include="src\OutputCollector.h" />
- <ClInclude Include="src\Parameter.h" />
- <ClInclude Include="src\PartialTranslOptColl.h" />
- <ClInclude Include="src\PCNTools.h" />
- <ClInclude Include="src\PDTAimp.h" />
- <ClInclude Include="src\Phrase.h" />
- <ClInclude Include="src\PhraseDictionary.h" />
- <ClInclude Include="src\PhraseDictionaryDynSuffixArray.h" />
- <ClInclude Include="src\PhraseDictionaryMemory.h" />
- <ClInclude Include="src\PhraseDictionaryNode.h" />
- <ClInclude Include="src\PhraseDictionaryNodeSCFG.h" />
- <ClInclude Include="src\PhraseDictionaryOnDisk.h" />
- <ClInclude Include="src\PhraseDictionarySCFG.h" />
- <ClInclude Include="src\PhraseDictionaryTree.h" />
- <ClInclude Include="src\PhraseDictionaryTreeAdaptor.h" />
- <ClInclude Include="src\PrefixTree.h" />
- <ClInclude Include="src\PrefixTreeMap.h" />
- <ClInclude Include="src\ReorderingConstraint.h" />
- <ClInclude Include="src\ReorderingStack.h" />
- <ClInclude Include="src\RuleCube.h" />
- <ClInclude Include="src\RuleCubeItem.h" />
- <ClInclude Include="src\RuleCubeQueue.h" />
- <ClInclude Include="src\RuleTableLoader.h" />
- <ClInclude Include="src\RuleTableLoaderCompact.h" />
- <ClInclude Include="src\RuleTableLoaderFactory.h" />
- <ClInclude Include="src\RuleTableLoaderStandard.h" />
- <ClInclude Include="src\ScoreComponentCollection.h" />
- <ClInclude Include="src\ScoreIndexManager.h" />
- <ClInclude Include="src\ScoreProducer.h" />
- <ClInclude Include="src\Search.h" />
- <ClInclude Include="src\SearchCubePruning.h" />
- <ClInclude Include="src\SearchNormal.h" />
- <ClInclude Include="src\Sentence.h" />
- <ClInclude Include="src\SentenceStats.h" />
- <ClInclude Include="src\SquareMatrix.h" />
- <ClInclude Include="src\StaticData.h" />
- <ClInclude Include="src\TargetPhrase.h" />
- <ClInclude Include="src\TargetPhraseCollection.h" />
- <ClInclude Include="src\ThreadPool.h" />
- <ClInclude Include="src\Timer.h" />
- <ClInclude Include="src\TranslationOption.h" />
- <ClInclude Include="src\TranslationOptionCollection.h" />
- <ClInclude Include="src\TranslationOptionCollectionConfusionNet.h" />
- <ClInclude Include="src\TranslationOptionCollectionText.h" />
- <ClInclude Include="src\TranslationOptionList.h" />
- <ClInclude Include="src\TranslationSystem.h" />
- <ClInclude Include="src\TreeInput.h" />
- <ClInclude Include="src\TrellisPath.h" />
- <ClInclude Include="src\TrellisPathCollection.h" />
- <ClInclude Include="src\TrellisPathList.h" />
- <ClInclude Include="src\TypeDef.h" />
- <ClInclude Include="src\UniqueObject.h" />
- <ClInclude Include="src\UserMessage.h" />
- <ClInclude Include="src\Util.h" />
- <ClInclude Include="src\Word.h" />
- <ClInclude Include="src\WordConsumed.h" />
- <ClInclude Include="src\WordLattice.h" />
- <ClInclude Include="src\WordsBitmap.h" />
- <ClInclude Include="src\WordsRange.h" />
- <ClInclude Include="src\XmlOption.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/moses/moses.xcodeproj/project.pbxproj b/moses/moses.xcodeproj/project.pbxproj deleted file mode 100644 index db743b782..000000000 --- a/moses/moses.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1363 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E07291F13B3854D004454FD /* AlignmentInfoCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E07291D13B3854D004454FD /* AlignmentInfoCollection.cpp */; }; - 1E07292013B3854D004454FD /* AlignmentInfoCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E07291E13B3854D004454FD /* AlignmentInfoCollection.h */; }; - 1E078C1C14643AED00A707F4 /* PhraseDictionaryHiero.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E078C1B14643AED00A707F4 /* PhraseDictionaryHiero.h */; }; - 1E078C1F14643C2000A707F4 /* PhraseDictionaryHiero.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E078C1E14643C2000A707F4 /* PhraseDictionaryHiero.cpp */; }; - 1E078C21146440A900A707F4 /* RuleTableLoaderHiero.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E078C20146440A900A707F4 /* RuleTableLoaderHiero.h */; }; - 1E078C23146440F700A707F4 /* RuleTableLoaderHiero.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E078C22146440F700A707F4 /* RuleTableLoaderHiero.cpp */; }; - 1E16D0A3144DAA6C00B60B4F /* Base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D087144DAA6C00B60B4F /* Base.cpp */; }; - 1E16D0A4144DAA6C00B60B4F /* Base.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D088144DAA6C00B60B4F /* Base.h */; }; - 1E16D0A7144DAA6C00B60B4F /* Factory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D08B144DAA6C00B60B4F /* Factory.cpp */; }; - 1E16D0A8144DAA6C00B60B4F /* Factory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D08C144DAA6C00B60B4F /* Factory.h */; }; - 1E16D0A9144DAA6C00B60B4F /* Implementation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D08D144DAA6C00B60B4F /* Implementation.cpp */; }; - 1E16D0AA144DAA6C00B60B4F /* Implementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D08E144DAA6C00B60B4F /* Implementation.h */; }; - 1E16D0AB144DAA6C00B60B4F /* IRST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D08F144DAA6C00B60B4F /* IRST.cpp */; }; - 1E16D0AC144DAA6C00B60B4F /* IRST.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D090144DAA6C00B60B4F /* IRST.h */; }; - 1E16D0AD144DAA6C00B60B4F /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D091144DAA6C00B60B4F /* Joint.cpp */; }; - 1E16D0AE144DAA6C00B60B4F /* Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D092144DAA6C00B60B4F /* Joint.h */; }; - 1E16D0AF144DAA6C00B60B4F /* Ken.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D093144DAA6C00B60B4F /* Ken.cpp */; }; - 1E16D0B0144DAA6C00B60B4F /* Ken.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D094144DAA6C00B60B4F /* Ken.h */; }; - 1E16D0B1144DAA6C00B60B4F /* MultiFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D095144DAA6C00B60B4F /* MultiFactor.cpp */; }; - 1E16D0B2144DAA6C00B60B4F /* MultiFactor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D096144DAA6C00B60B4F /* MultiFactor.h */; }; - 1E16D0B5144DAA6C00B60B4F /* ParallelBackoff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D099144DAA6C00B60B4F /* ParallelBackoff.cpp */; }; - 1E16D0B6144DAA6C00B60B4F /* ParallelBackoff.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D09A144DAA6C00B60B4F /* ParallelBackoff.h */; }; - 1E16D0BB144DAA6C00B60B4F /* SingleFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D09F144DAA6C00B60B4F /* SingleFactor.cpp */; }; - 1E16D0BC144DAA6C00B60B4F /* SingleFactor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D0A0144DAA6C00B60B4F /* SingleFactor.h */; }; - 1E16D0BD144DAA6C00B60B4F /* SRI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E16D0A1144DAA6C00B60B4F /* SRI.cpp */; }; - 1E16D0BE144DAA6C00B60B4F /* SRI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E16D0A2144DAA6C00B60B4F /* SRI.h */; }; - 1E1C589512F310A70067DEB7 /* ChartRuleLookupManagerMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E1C589012F310A70067DEB7 /* ChartRuleLookupManagerMemory.cpp */; }; - 1E1C589612F310A70067DEB7 /* ChartRuleLookupManagerMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E1C589112F310A70067DEB7 /* ChartRuleLookupManagerMemory.h */; }; - 1E1C589712F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E1C589212F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.cpp */; }; - 1E1C589812F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E1C589312F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.h */; }; - 1E2755B314667CA4009D1DF9 /* PhraseDictionaryALSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2755B214667CA3009D1DF9 /* PhraseDictionaryALSuffixArray.cpp */; }; - 1E2755B614667CC3009D1DF9 /* PhraseDictionaryALSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2755B514667CC2009D1DF9 /* PhraseDictionaryALSuffixArray.h */; }; - 1E2E161A132A890D00ED4085 /* ChartCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1604132A890D00ED4085 /* ChartCell.cpp */; }; - 1E2E161B132A890D00ED4085 /* ChartCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1605132A890D00ED4085 /* ChartCell.h */; }; - 1E2E161C132A890D00ED4085 /* ChartCellCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1606132A890D00ED4085 /* ChartCellCollection.cpp */; }; - 1E2E161D132A890D00ED4085 /* ChartCellCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1607132A890D00ED4085 /* ChartCellCollection.h */; }; - 1E2E161E132A890D00ED4085 /* ChartHypothesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1608132A890D00ED4085 /* ChartHypothesis.cpp */; }; - 1E2E161F132A890D00ED4085 /* ChartHypothesis.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1609132A890D00ED4085 /* ChartHypothesis.h */; }; - 1E2E1620132A890D00ED4085 /* ChartHypothesisCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E160A132A890D00ED4085 /* ChartHypothesisCollection.cpp */; }; - 1E2E1621132A890D00ED4085 /* ChartHypothesisCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E160B132A890D00ED4085 /* ChartHypothesisCollection.h */; }; - 1E2E1622132A890D00ED4085 /* ChartManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E160C132A890D00ED4085 /* ChartManager.cpp */; }; - 1E2E1623132A890D00ED4085 /* ChartManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E160D132A890D00ED4085 /* ChartManager.h */; }; - 1E2E1624132A890D00ED4085 /* ChartTranslationOptionCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E160E132A890D00ED4085 /* ChartTranslationOptionCollection.cpp */; }; - 1E2E1625132A890D00ED4085 /* ChartTranslationOptionCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E160F132A890D00ED4085 /* ChartTranslationOptionCollection.h */; }; - 1E2E1626132A890D00ED4085 /* ChartTrellisNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1610132A890D00ED4085 /* ChartTrellisNode.cpp */; }; - 1E2E1627132A890D00ED4085 /* ChartTrellisNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1611132A890D00ED4085 /* ChartTrellisNode.h */; }; - 1E2E1628132A890D00ED4085 /* ChartTrellisPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1612132A890D00ED4085 /* ChartTrellisPath.cpp */; }; - 1E2E1629132A890D00ED4085 /* ChartTrellisPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1613132A890D00ED4085 /* ChartTrellisPath.h */; }; - 1E2E162D132A890D00ED4085 /* ChartTrellisPathList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1617132A890D00ED4085 /* ChartTrellisPathList.h */; }; - 1E2E1639132A892800ED4085 /* OutputCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1632132A892800ED4085 /* OutputCollector.h */; }; - 1E2E163A132A892800ED4085 /* RuleCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1633132A892800ED4085 /* RuleCube.cpp */; }; - 1E2E163B132A892800ED4085 /* RuleCube.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1634132A892800ED4085 /* RuleCube.h */; }; - 1E2E163C132A892800ED4085 /* RuleCubeQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1635132A892800ED4085 /* RuleCubeQueue.cpp */; }; - 1E2E163D132A892800ED4085 /* RuleCubeQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1636132A892800ED4085 /* RuleCubeQueue.h */; }; - 1E2E163E132A892800ED4085 /* ThreadPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2E1637132A892800ED4085 /* ThreadPool.cpp */; }; - 1E2E163F132A892800ED4085 /* ThreadPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2E1638132A892800ED4085 /* ThreadPool.h */; }; - 1E46B5A613BA5C7F0084F898 /* RuleCubeItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E46B5A413BA5C7F0084F898 /* RuleCubeItem.cpp */; }; - 1E46B5A713BA5C7F0084F898 /* RuleCubeItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E46B5A513BA5C7F0084F898 /* RuleCubeItem.h */; }; - 1E474E12145575CA00178AD5 /* RuleTableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E474E11145575CA00178AD5 /* RuleTableLoader.h */; }; - 1E528B9D13A12B2D00E9A67E /* params.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E528B9B13A12B2D00E9A67E /* params.cpp */; }; - 1E528B9E13A12B2D00E9A67E /* SyntacticLanguageModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E528B9C13A12B2D00E9A67E /* SyntacticLanguageModel.cpp */; }; - 1EA6AB4A13BCC838004465AF /* ChartRuleLookupManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EA6AB4813BCC838004465AF /* ChartRuleLookupManager.cpp */; }; - 1EA6AB4B13BCC838004465AF /* ChartRuleLookupManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EA6AB4913BCC838004465AF /* ChartRuleLookupManager.h */; }; - 1EBB262913A12DB500B51840 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBB262213A12DB500B51840 /* hash.h */; }; - 1EBB262A13A12DB500B51840 /* onlineRLM.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBB262313A12DB500B51840 /* onlineRLM.h */; }; - 1EBB262B13A12DB500B51840 /* params.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBB262413A12DB500B51840 /* params.h */; }; - 1EBB262C13A12DB500B51840 /* perfectHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBB262513A12DB500B51840 /* perfectHash.h */; }; - 1EBB262D13A12DB500B51840 /* quantizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBB262613A12DB500B51840 /* quantizer.h */; }; - 1EBB262E13A12DB500B51840 /* RandLMCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBB262713A12DB500B51840 /* RandLMCache.h */; }; - 1EBB262F13A12DB500B51840 /* RandLMFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBB262813A12DB500B51840 /* RandLMFilter.h */; }; - 1ECA43AF146D585900209CEF /* ChartCellLabelSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ECA43AD146D585900209CEF /* ChartCellLabelSet.h */; }; - 1ECA43B0146D585900209CEF /* ChartTrellisDetour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ECA43AE146D585900209CEF /* ChartTrellisDetour.cpp */; }; - 1ECA43B4146D586D00209CEF /* ChartTrellisDetour.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ECA43B1146D586D00209CEF /* ChartTrellisDetour.h */; }; - 1ECA43B5146D586D00209CEF /* ChartTrellisDetourQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ECA43B2146D586D00209CEF /* ChartTrellisDetourQueue.cpp */; }; - 1ECA43B6146D586D00209CEF /* ChartTrellisDetourQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ECA43B3146D586D00209CEF /* ChartTrellisDetourQueue.h */; }; - 1ED00036124BC2690029177F /* ChartTranslationOption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED00034124BC2690029177F /* ChartTranslationOption.cpp */; }; - 1ED00037124BC2690029177F /* ChartTranslationOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED00035124BC2690029177F /* ChartTranslationOption.h */; }; - 1ED0DE291432A0D200C20FBE /* RuleTableLoaderCompact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0DE1D1432A0D100C20FBE /* RuleTableLoaderCompact.cpp */; }; - 1ED0DE2A1432A0D200C20FBE /* RuleTableLoaderCompact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0DE1E1432A0D100C20FBE /* RuleTableLoaderCompact.h */; }; - 1ED0DE2C1432A0D200C20FBE /* RuleTableLoaderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0DE211432A0D100C20FBE /* RuleTableLoaderFactory.cpp */; }; - 1ED0DE2D1432A0D200C20FBE /* RuleTableLoaderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0DE221432A0D100C20FBE /* RuleTableLoaderFactory.h */; }; - 1ED0DE2F1432A0D200C20FBE /* RuleTableLoaderStandard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0DE251432A0D100C20FBE /* RuleTableLoaderStandard.cpp */; }; - 1ED0DE301432A0D200C20FBE /* RuleTableLoaderStandard.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0DE261432A0D100C20FBE /* RuleTableLoaderStandard.h */; }; - 1ED0FE2A124BB9380029177F /* AlignmentInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD4C124BB9380029177F /* AlignmentInfo.cpp */; }; - 1ED0FE2B124BB9380029177F /* AlignmentInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD4D124BB9380029177F /* AlignmentInfo.h */; }; - 1ED0FE2C124BB9380029177F /* BilingualDynSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD4E124BB9380029177F /* BilingualDynSuffixArray.cpp */; }; - 1ED0FE2D124BB9380029177F /* BilingualDynSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD4F124BB9380029177F /* BilingualDynSuffixArray.h */; }; - 1ED0FE2E124BB9380029177F /* BitmapContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD50124BB9380029177F /* BitmapContainer.cpp */; }; - 1ED0FE2F124BB9380029177F /* BitmapContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD51124BB9380029177F /* BitmapContainer.h */; }; - 1ED0FE30124BB9380029177F /* CellCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD52124BB9380029177F /* CellCollection.h */; }; - 1ED0FE35124BB9380029177F /* ConfusionNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD57124BB9380029177F /* ConfusionNet.cpp */; }; - 1ED0FE36124BB9380029177F /* ConfusionNet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD58124BB9380029177F /* ConfusionNet.h */; }; - 1ED0FE37124BB9380029177F /* DecodeFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD59124BB9380029177F /* DecodeFeature.cpp */; }; - 1ED0FE38124BB9380029177F /* DecodeFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD5A124BB9380029177F /* DecodeFeature.h */; }; - 1ED0FE39124BB9380029177F /* DecodeGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD5B124BB9380029177F /* DecodeGraph.cpp */; }; - 1ED0FE3A124BB9380029177F /* DecodeGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD5C124BB9380029177F /* DecodeGraph.h */; }; - 1ED0FE3B124BB9380029177F /* DecodeStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD5D124BB9380029177F /* DecodeStep.cpp */; }; - 1ED0FE3C124BB9380029177F /* DecodeStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD5E124BB9380029177F /* DecodeStep.h */; }; - 1ED0FE3D124BB9380029177F /* DecodeStepGeneration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD5F124BB9380029177F /* DecodeStepGeneration.cpp */; }; - 1ED0FE3E124BB9380029177F /* DecodeStepGeneration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD60124BB9380029177F /* DecodeStepGeneration.h */; }; - 1ED0FE3F124BB9380029177F /* DecodeStepTranslation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD61124BB9380029177F /* DecodeStepTranslation.cpp */; }; - 1ED0FE40124BB9380029177F /* DecodeStepTranslation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD62124BB9380029177F /* DecodeStepTranslation.h */; }; - 1ED0FE41124BB9380029177F /* Dictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD63124BB9380029177F /* Dictionary.cpp */; }; - 1ED0FE42124BB9380029177F /* Dictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD64124BB9380029177F /* Dictionary.h */; }; - 1ED0FE43124BB9380029177F /* DotChart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD65124BB9380029177F /* DotChart.cpp */; }; - 1ED0FE44124BB9380029177F /* DotChart.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD66124BB9380029177F /* DotChart.h */; }; - 1ED0FE45124BB9380029177F /* DotChartOnDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD67124BB9380029177F /* DotChartOnDisk.cpp */; }; - 1ED0FE46124BB9380029177F /* DotChartOnDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD68124BB9380029177F /* DotChartOnDisk.h */; }; - 1ED0FE47124BB9380029177F /* DummyScoreProducers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD69124BB9380029177F /* DummyScoreProducers.cpp */; }; - 1ED0FE48124BB9380029177F /* DummyScoreProducers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD6A124BB9380029177F /* DummyScoreProducers.h */; }; - 1ED0FE49124BB9380029177F /* fdstream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD6C124BB9380029177F /* fdstream.h */; }; - 1ED0FE4A124BB9380029177F /* file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD6D124BB9380029177F /* file.cpp */; }; - 1ED0FE4B124BB9380029177F /* file.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD6E124BB9380029177F /* file.h */; }; - 1ED0FE4C124BB9380029177F /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD6F124BB9380029177F /* types.h */; }; - 1ED0FE4D124BB9380029177F /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD70124BB9380029177F /* utils.h */; }; - 1ED0FE4E124BB9380029177F /* vocab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD71124BB9380029177F /* vocab.cpp */; }; - 1ED0FE4F124BB9380029177F /* vocab.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD72124BB9380029177F /* vocab.h */; }; - 1ED0FE50124BB9380029177F /* DynSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD73124BB9380029177F /* DynSuffixArray.cpp */; }; - 1ED0FE51124BB9380029177F /* DynSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD74124BB9380029177F /* DynSuffixArray.h */; }; - 1ED0FE52124BB9380029177F /* Factor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD75124BB9380029177F /* Factor.cpp */; }; - 1ED0FE53124BB9380029177F /* Factor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD76124BB9380029177F /* Factor.h */; }; - 1ED0FE54124BB9380029177F /* FactorCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD77124BB9380029177F /* FactorCollection.cpp */; }; - 1ED0FE55124BB9380029177F /* FactorCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD78124BB9380029177F /* FactorCollection.h */; }; - 1ED0FE56124BB9380029177F /* FactorTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD79124BB9380029177F /* FactorTypeSet.cpp */; }; - 1ED0FE57124BB9380029177F /* FactorTypeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD7A124BB9380029177F /* FactorTypeSet.h */; }; - 1ED0FE58124BB9380029177F /* FeatureFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD7B124BB9380029177F /* FeatureFunction.cpp */; }; - 1ED0FE59124BB9380029177F /* FeatureFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD7C124BB9380029177F /* FeatureFunction.h */; }; - 1ED0FE5A124BB9380029177F /* FFState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD7D124BB9380029177F /* FFState.cpp */; }; - 1ED0FE5B124BB9380029177F /* FFState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD7E124BB9380029177F /* FFState.h */; }; - 1ED0FE5C124BB9380029177F /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD7F124BB9380029177F /* File.cpp */; }; - 1ED0FE5D124BB9380029177F /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD80124BB9380029177F /* File.h */; }; - 1ED0FE5E124BB9380029177F /* FilePtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD81124BB9380029177F /* FilePtr.h */; }; - 1ED0FE5F124BB9380029177F /* FloydWarshall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD82124BB9380029177F /* FloydWarshall.cpp */; }; - 1ED0FE60124BB9380029177F /* FloydWarshall.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD83124BB9380029177F /* FloydWarshall.h */; }; - 1ED0FE61124BB9380029177F /* GenerationDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD84124BB9380029177F /* GenerationDictionary.cpp */; }; - 1ED0FE62124BB9380029177F /* GenerationDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD85124BB9380029177F /* GenerationDictionary.h */; }; - 1ED0FE63124BB9380029177F /* GlobalLexicalModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD86124BB9380029177F /* GlobalLexicalModel.cpp */; }; - 1ED0FE64124BB9380029177F /* GlobalLexicalModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD87124BB9380029177F /* GlobalLexicalModel.h */; }; - 1ED0FE65124BB9380029177F /* gzfilebuf.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD88124BB9380029177F /* gzfilebuf.h */; }; - 1ED0FE66124BB9380029177F /* hash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD89124BB9380029177F /* hash.cpp */; }; - 1ED0FE67124BB9380029177F /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD8A124BB9380029177F /* hash.h */; }; - 1ED0FE68124BB9380029177F /* Hypothesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD8C124BB9380029177F /* Hypothesis.cpp */; }; - 1ED0FE69124BB9380029177F /* Hypothesis.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD8D124BB9380029177F /* Hypothesis.h */; }; - 1ED0FE6A124BB9380029177F /* HypothesisStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD8E124BB9380029177F /* HypothesisStack.cpp */; }; - 1ED0FE6B124BB9380029177F /* HypothesisStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD8F124BB9380029177F /* HypothesisStack.h */; }; - 1ED0FE6C124BB9380029177F /* HypothesisStackCubePruning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD90124BB9380029177F /* HypothesisStackCubePruning.cpp */; }; - 1ED0FE6D124BB9380029177F /* HypothesisStackCubePruning.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD91124BB9380029177F /* HypothesisStackCubePruning.h */; }; - 1ED0FE6E124BB9380029177F /* HypothesisStackNormal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD92124BB9380029177F /* HypothesisStackNormal.cpp */; }; - 1ED0FE6F124BB9380029177F /* HypothesisStackNormal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD93124BB9380029177F /* HypothesisStackNormal.h */; }; - 1ED0FE70124BB9380029177F /* InputFileStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD94124BB9380029177F /* InputFileStream.cpp */; }; - 1ED0FE71124BB9380029177F /* InputFileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD95124BB9380029177F /* InputFileStream.h */; }; - 1ED0FE72124BB9380029177F /* InputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FD96124BB9380029177F /* InputType.cpp */; }; - 1ED0FE73124BB9380029177F /* InputType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FD97124BB9380029177F /* InputType.h */; }; - 1ED0FE8F124BB9380029177F /* LexicalReordering.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDB3124BB9380029177F /* LexicalReordering.cpp */; }; - 1ED0FE90124BB9380029177F /* LexicalReordering.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDB4124BB9380029177F /* LexicalReordering.h */; }; - 1ED0FE91124BB9380029177F /* LexicalReorderingState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDB5124BB9380029177F /* LexicalReorderingState.cpp */; }; - 1ED0FE92124BB9380029177F /* LexicalReorderingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDB6124BB9380029177F /* LexicalReorderingState.h */; }; - 1ED0FE93124BB9380029177F /* LexicalReorderingTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDB7124BB9380029177F /* LexicalReorderingTable.cpp */; }; - 1ED0FE94124BB9380029177F /* LexicalReorderingTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDB8124BB9380029177F /* LexicalReorderingTable.h */; }; - 1ED0FE95124BB9380029177F /* LMList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDB9124BB9380029177F /* LMList.cpp */; }; - 1ED0FE96124BB9380029177F /* LMList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDBA124BB9380029177F /* LMList.h */; }; - 1ED0FE97124BB9380029177F /* LVoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDBB124BB9380029177F /* LVoc.cpp */; }; - 1ED0FE98124BB9380029177F /* LVoc.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDBC124BB9380029177F /* LVoc.h */; }; - 1ED0FE9A124BB9380029177F /* Manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDC0124BB9380029177F /* Manager.cpp */; }; - 1ED0FE9B124BB9380029177F /* Manager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDC1124BB9380029177F /* Manager.h */; }; - 1ED0FEA0124BB9380029177F /* ObjectPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDC6124BB9380029177F /* ObjectPool.h */; }; - 1ED0FEA1124BB9380029177F /* Parameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDC7124BB9380029177F /* Parameter.cpp */; }; - 1ED0FEA2124BB9380029177F /* Parameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDC8124BB9380029177F /* Parameter.h */; }; - 1ED0FEA3124BB9380029177F /* PartialTranslOptColl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDC9124BB9380029177F /* PartialTranslOptColl.cpp */; }; - 1ED0FEA4124BB9380029177F /* PartialTranslOptColl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDCA124BB9380029177F /* PartialTranslOptColl.h */; }; - 1ED0FEA5124BB9380029177F /* PCNTools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDCB124BB9380029177F /* PCNTools.cpp */; }; - 1ED0FEA6124BB9380029177F /* PCNTools.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDCC124BB9380029177F /* PCNTools.h */; }; - 1ED0FEA7124BB9380029177F /* PDTAimp.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDCD124BB9380029177F /* PDTAimp.h */; }; - 1ED0FEA8124BB9380029177F /* Phrase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDCE124BB9380029177F /* Phrase.cpp */; }; - 1ED0FEA9124BB9380029177F /* Phrase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDCF124BB9380029177F /* Phrase.h */; }; - 1ED0FEAA124BB9380029177F /* PhraseDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDD0124BB9380029177F /* PhraseDictionary.cpp */; }; - 1ED0FEAB124BB9380029177F /* PhraseDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDD1124BB9380029177F /* PhraseDictionary.h */; }; - 1ED0FEAC124BB9380029177F /* PhraseDictionaryDynSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDD2124BB9380029177F /* PhraseDictionaryDynSuffixArray.cpp */; }; - 1ED0FEAD124BB9380029177F /* PhraseDictionaryDynSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDD3124BB9380029177F /* PhraseDictionaryDynSuffixArray.h */; }; - 1ED0FEAE124BB9380029177F /* PhraseDictionaryMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDD4124BB9380029177F /* PhraseDictionaryMemory.cpp */; }; - 1ED0FEAF124BB9380029177F /* PhraseDictionaryMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDD5124BB9380029177F /* PhraseDictionaryMemory.h */; }; - 1ED0FEB0124BB9380029177F /* PhraseDictionaryNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDD6124BB9380029177F /* PhraseDictionaryNode.cpp */; }; - 1ED0FEB1124BB9380029177F /* PhraseDictionaryNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDD7124BB9380029177F /* PhraseDictionaryNode.h */; }; - 1ED0FEB2124BB9380029177F /* PhraseDictionaryNodeSCFG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDD8124BB9380029177F /* PhraseDictionaryNodeSCFG.cpp */; }; - 1ED0FEB3124BB9380029177F /* PhraseDictionaryNodeSCFG.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDD9124BB9380029177F /* PhraseDictionaryNodeSCFG.h */; }; - 1ED0FEB4124BB9380029177F /* PhraseDictionaryOnDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDDA124BB9380029177F /* PhraseDictionaryOnDisk.cpp */; }; - 1ED0FEB5124BB9380029177F /* PhraseDictionaryOnDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDDB124BB9380029177F /* PhraseDictionaryOnDisk.h */; }; - 1ED0FEB7124BB9380029177F /* PhraseDictionarySCFG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDDD124BB9380029177F /* PhraseDictionarySCFG.cpp */; }; - 1ED0FEB9124BB9380029177F /* PhraseDictionaryTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDDF124BB9380029177F /* PhraseDictionaryTree.cpp */; }; - 1ED0FEBA124BB9380029177F /* PhraseDictionaryTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDE0124BB9380029177F /* PhraseDictionaryTree.h */; }; - 1ED0FEBB124BB9380029177F /* PhraseDictionaryTreeAdaptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDE1124BB9380029177F /* PhraseDictionaryTreeAdaptor.cpp */; }; - 1ED0FEBC124BB9380029177F /* PhraseDictionaryTreeAdaptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDE2124BB9380029177F /* PhraseDictionaryTreeAdaptor.h */; }; - 1ED0FEBD124BB9380029177F /* PrefixTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDE3124BB9380029177F /* PrefixTree.h */; }; - 1ED0FEBE124BB9380029177F /* PrefixTreeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDE4124BB9380029177F /* PrefixTreeMap.cpp */; }; - 1ED0FEBF124BB9380029177F /* PrefixTreeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDE5124BB9380029177F /* PrefixTreeMap.h */; }; - 1ED0FEC0124BB9380029177F /* ReorderingConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDE6124BB9380029177F /* ReorderingConstraint.cpp */; }; - 1ED0FEC1124BB9380029177F /* ReorderingConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDE7124BB9380029177F /* ReorderingConstraint.h */; }; - 1ED0FEC2124BB9380029177F /* ReorderingStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDE8124BB9380029177F /* ReorderingStack.cpp */; }; - 1ED0FEC3124BB9380029177F /* ReorderingStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDE9124BB9380029177F /* ReorderingStack.h */; }; - 1ED0FEC4124BB9380029177F /* ScoreComponentCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDEB124BB9380029177F /* ScoreComponentCollection.cpp */; }; - 1ED0FEC5124BB9380029177F /* ScoreComponentCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDEC124BB9380029177F /* ScoreComponentCollection.h */; }; - 1ED0FEC6124BB9380029177F /* ScoreIndexManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDED124BB9380029177F /* ScoreIndexManager.cpp */; }; - 1ED0FEC7124BB9380029177F /* ScoreIndexManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDEE124BB9380029177F /* ScoreIndexManager.h */; }; - 1ED0FEC8124BB9380029177F /* ScoreProducer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDEF124BB9380029177F /* ScoreProducer.cpp */; }; - 1ED0FEC9124BB9380029177F /* ScoreProducer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDF0124BB9380029177F /* ScoreProducer.h */; }; - 1ED0FECA124BB9380029177F /* Search.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDF1124BB9380029177F /* Search.cpp */; }; - 1ED0FECB124BB9380029177F /* Search.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDF2124BB9380029177F /* Search.h */; }; - 1ED0FECC124BB9380029177F /* SearchCubePruning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDF3124BB9380029177F /* SearchCubePruning.cpp */; }; - 1ED0FECD124BB9380029177F /* SearchCubePruning.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDF4124BB9380029177F /* SearchCubePruning.h */; }; - 1ED0FECE124BB9380029177F /* SearchNormal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDF5124BB9380029177F /* SearchNormal.cpp */; }; - 1ED0FECF124BB9380029177F /* SearchNormal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDF6124BB9380029177F /* SearchNormal.h */; }; - 1ED0FED0124BB9380029177F /* Sentence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDF7124BB9380029177F /* Sentence.cpp */; }; - 1ED0FED1124BB9380029177F /* Sentence.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDF8124BB9380029177F /* Sentence.h */; }; - 1ED0FED2124BB9380029177F /* SentenceStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDF9124BB9380029177F /* SentenceStats.cpp */; }; - 1ED0FED3124BB9380029177F /* SentenceStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDFA124BB9380029177F /* SentenceStats.h */; }; - 1ED0FED4124BB9380029177F /* SquareMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDFB124BB9380029177F /* SquareMatrix.cpp */; }; - 1ED0FED5124BB9380029177F /* SquareMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDFC124BB9380029177F /* SquareMatrix.h */; }; - 1ED0FED6124BB9380029177F /* StaticData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDFD124BB9380029177F /* StaticData.cpp */; }; - 1ED0FED7124BB9380029177F /* StaticData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FDFE124BB9380029177F /* StaticData.h */; }; - 1ED0FED8124BB9380029177F /* TargetPhrase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FDFF124BB9380029177F /* TargetPhrase.cpp */; }; - 1ED0FED9124BB9380029177F /* TargetPhrase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE00124BB9380029177F /* TargetPhrase.h */; }; - 1ED0FEDA124BB9380029177F /* TargetPhraseCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE01124BB9380029177F /* TargetPhraseCollection.cpp */; }; - 1ED0FEDB124BB9380029177F /* TargetPhraseCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE02124BB9380029177F /* TargetPhraseCollection.h */; }; - 1ED0FEDC124BB9380029177F /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE03124BB9380029177F /* Timer.cpp */; }; - 1ED0FEDD124BB9380029177F /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE04124BB9380029177F /* Timer.h */; }; - 1ED0FEDE124BB9380029177F /* TranslationOption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE05124BB9380029177F /* TranslationOption.cpp */; }; - 1ED0FEDF124BB9380029177F /* TranslationOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE06124BB9380029177F /* TranslationOption.h */; }; - 1ED0FEE0124BB9380029177F /* TranslationOptionCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE07124BB9380029177F /* TranslationOptionCollection.cpp */; }; - 1ED0FEE1124BB9380029177F /* TranslationOptionCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE08124BB9380029177F /* TranslationOptionCollection.h */; }; - 1ED0FEE2124BB9380029177F /* TranslationOptionCollectionConfusionNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE09124BB9380029177F /* TranslationOptionCollectionConfusionNet.cpp */; }; - 1ED0FEE3124BB9380029177F /* TranslationOptionCollectionConfusionNet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE0A124BB9380029177F /* TranslationOptionCollectionConfusionNet.h */; }; - 1ED0FEE4124BB9380029177F /* TranslationOptionCollectionText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE0B124BB9380029177F /* TranslationOptionCollectionText.cpp */; }; - 1ED0FEE5124BB9380029177F /* TranslationOptionCollectionText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE0C124BB9380029177F /* TranslationOptionCollectionText.h */; }; - 1ED0FEE6124BB9380029177F /* TranslationOptionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE0D124BB9380029177F /* TranslationOptionList.cpp */; }; - 1ED0FEE7124BB9380029177F /* TranslationOptionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE0E124BB9380029177F /* TranslationOptionList.h */; }; - 1ED0FEE8124BB9380029177F /* TranslationSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE0F124BB9380029177F /* TranslationSystem.cpp */; }; - 1ED0FEE9124BB9380029177F /* TranslationSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE10124BB9380029177F /* TranslationSystem.h */; }; - 1ED0FEEA124BB9380029177F /* TreeInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE11124BB9380029177F /* TreeInput.cpp */; }; - 1ED0FEEB124BB9380029177F /* TreeInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE12124BB9380029177F /* TreeInput.h */; }; - 1ED0FEEC124BB9380029177F /* TrellisPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE13124BB9380029177F /* TrellisPath.cpp */; }; - 1ED0FEED124BB9380029177F /* TrellisPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE14124BB9380029177F /* TrellisPath.h */; }; - 1ED0FEEE124BB9380029177F /* TrellisPathCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE15124BB9380029177F /* TrellisPathCollection.cpp */; }; - 1ED0FEEF124BB9380029177F /* TrellisPathCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE16124BB9380029177F /* TrellisPathCollection.h */; }; - 1ED0FEF0124BB9380029177F /* TrellisPathList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE17124BB9380029177F /* TrellisPathList.h */; }; - 1ED0FEF1124BB9380029177F /* TypeDef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE18124BB9380029177F /* TypeDef.h */; }; - 1ED0FEF2124BB9380029177F /* UniqueObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE19124BB9380029177F /* UniqueObject.h */; }; - 1ED0FEF3124BB9380029177F /* UserMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE1A124BB9380029177F /* UserMessage.cpp */; }; - 1ED0FEF4124BB9380029177F /* UserMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE1B124BB9380029177F /* UserMessage.h */; }; - 1ED0FEF5124BB9380029177F /* Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE1C124BB9380029177F /* Util.cpp */; }; - 1ED0FEF6124BB9380029177F /* Util.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE1D124BB9380029177F /* Util.h */; }; - 1ED0FEF7124BB9380029177F /* Word.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE1E124BB9380029177F /* Word.cpp */; }; - 1ED0FEF8124BB9380029177F /* Word.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE1F124BB9380029177F /* Word.h */; }; - 1ED0FEFB124BB9380029177F /* WordLattice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE22124BB9380029177F /* WordLattice.cpp */; }; - 1ED0FEFC124BB9380029177F /* WordLattice.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE23124BB9380029177F /* WordLattice.h */; }; - 1ED0FEFD124BB9380029177F /* WordsBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE24124BB9380029177F /* WordsBitmap.cpp */; }; - 1ED0FEFE124BB9380029177F /* WordsBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE25124BB9380029177F /* WordsBitmap.h */; }; - 1ED0FEFF124BB9380029177F /* WordsRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE26124BB9380029177F /* WordsRange.cpp */; }; - 1ED0FF00124BB9380029177F /* WordsRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE27124BB9380029177F /* WordsRange.h */; }; - 1ED0FF01124BB9380029177F /* XmlOption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FE28124BB9380029177F /* XmlOption.cpp */; }; - 1ED0FF02124BB9380029177F /* XmlOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FE29124BB9380029177F /* XmlOption.h */; }; - 1ED0FFD3124BC0BF0029177F /* ChartTranslationOptionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED0FFD1124BC0BF0029177F /* ChartTranslationOptionList.cpp */; }; - 1ED0FFD4124BC0BF0029177F /* ChartTranslationOptionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED0FFD2124BC0BF0029177F /* ChartTranslationOptionList.h */; }; - 1ED22EE513DD96B0000DE8C9 /* DotChartInMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ED22EE313DD96B0000DE8C9 /* DotChartInMemory.cpp */; }; - 1ED22EE613DD96B0000DE8C9 /* DotChartInMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED22EE413DD96B0000DE8C9 /* DotChartInMemory.h */; }; - 1EE58D9F133726C700D93158 /* NonTerminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EE58D9D133726C700D93158 /* NonTerminal.cpp */; }; - 1EE58DA0133726C700D93158 /* NonTerminal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EE58D9E133726C700D93158 /* NonTerminal.h */; }; - 1EEB43EE1264A6F200739BA5 /* PhraseDictionarySCFG.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEB43ED1264A6F200739BA5 /* PhraseDictionarySCFG.h */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1E07291D13B3854D004454FD /* AlignmentInfoCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AlignmentInfoCollection.cpp; path = src/AlignmentInfoCollection.cpp; sourceTree = "<group>"; }; - 1E07291E13B3854D004454FD /* AlignmentInfoCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlignmentInfoCollection.h; path = src/AlignmentInfoCollection.h; sourceTree = "<group>"; }; - 1E078C1B14643AED00A707F4 /* PhraseDictionaryHiero.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryHiero.h; path = src/PhraseDictionaryHiero.h; sourceTree = "<group>"; }; - 1E078C1E14643C2000A707F4 /* PhraseDictionaryHiero.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryHiero.cpp; path = src/PhraseDictionaryHiero.cpp; sourceTree = "<group>"; }; - 1E078C20146440A900A707F4 /* RuleTableLoaderHiero.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleTableLoaderHiero.h; path = src/RuleTableLoaderHiero.h; sourceTree = "<group>"; }; - 1E078C22146440F700A707F4 /* RuleTableLoaderHiero.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleTableLoaderHiero.cpp; path = src/RuleTableLoaderHiero.cpp; sourceTree = "<group>"; }; - 1E16D087144DAA6C00B60B4F /* Base.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Base.cpp; path = src/LM/Base.cpp; sourceTree = "<group>"; }; - 1E16D088144DAA6C00B60B4F /* Base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Base.h; path = src/LM/Base.h; sourceTree = "<group>"; }; - 1E16D08B144DAA6C00B60B4F /* Factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Factory.cpp; path = src/LM/Factory.cpp; sourceTree = "<group>"; }; - 1E16D08C144DAA6C00B60B4F /* Factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Factory.h; path = src/LM/Factory.h; sourceTree = "<group>"; }; - 1E16D08D144DAA6C00B60B4F /* Implementation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Implementation.cpp; path = src/LM/Implementation.cpp; sourceTree = "<group>"; }; - 1E16D08E144DAA6C00B60B4F /* Implementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Implementation.h; path = src/LM/Implementation.h; sourceTree = "<group>"; }; - 1E16D08F144DAA6C00B60B4F /* IRST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRST.cpp; path = src/LM/IRST.cpp; sourceTree = "<group>"; }; - 1E16D090144DAA6C00B60B4F /* IRST.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRST.h; path = src/LM/IRST.h; sourceTree = "<group>"; }; - 1E16D091144DAA6C00B60B4F /* Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joint.cpp; path = src/LM/Joint.cpp; sourceTree = "<group>"; }; - 1E16D092144DAA6C00B60B4F /* Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joint.h; path = src/LM/Joint.h; sourceTree = "<group>"; }; - 1E16D093144DAA6C00B60B4F /* Ken.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Ken.cpp; path = src/LM/Ken.cpp; sourceTree = "<group>"; }; - 1E16D094144DAA6C00B60B4F /* Ken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ken.h; path = src/LM/Ken.h; sourceTree = "<group>"; }; - 1E16D095144DAA6C00B60B4F /* MultiFactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MultiFactor.cpp; path = src/LM/MultiFactor.cpp; sourceTree = "<group>"; }; - 1E16D096144DAA6C00B60B4F /* MultiFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MultiFactor.h; path = src/LM/MultiFactor.h; sourceTree = "<group>"; }; - 1E16D099144DAA6C00B60B4F /* ParallelBackoff.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParallelBackoff.cpp; path = src/LM/ParallelBackoff.cpp; sourceTree = "<group>"; }; - 1E16D09A144DAA6C00B60B4F /* ParallelBackoff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParallelBackoff.h; path = src/LM/ParallelBackoff.h; sourceTree = "<group>"; }; - 1E16D09F144DAA6C00B60B4F /* SingleFactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SingleFactor.cpp; path = src/LM/SingleFactor.cpp; sourceTree = "<group>"; }; - 1E16D0A0144DAA6C00B60B4F /* SingleFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SingleFactor.h; path = src/LM/SingleFactor.h; sourceTree = "<group>"; }; - 1E16D0A1144DAA6C00B60B4F /* SRI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SRI.cpp; path = src/LM/SRI.cpp; sourceTree = "<group>"; }; - 1E16D0A2144DAA6C00B60B4F /* SRI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SRI.h; path = src/LM/SRI.h; sourceTree = "<group>"; }; - 1E1C589012F310A70067DEB7 /* ChartRuleLookupManagerMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartRuleLookupManagerMemory.cpp; path = src/ChartRuleLookupManagerMemory.cpp; sourceTree = "<group>"; }; - 1E1C589112F310A70067DEB7 /* ChartRuleLookupManagerMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManagerMemory.h; path = src/ChartRuleLookupManagerMemory.h; sourceTree = "<group>"; }; - 1E1C589212F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartRuleLookupManagerOnDisk.cpp; path = src/ChartRuleLookupManagerOnDisk.cpp; sourceTree = "<group>"; }; - 1E1C589312F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManagerOnDisk.h; path = src/ChartRuleLookupManagerOnDisk.h; sourceTree = "<group>"; }; - 1E2755B214667CA3009D1DF9 /* PhraseDictionaryALSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryALSuffixArray.cpp; path = src/PhraseDictionaryALSuffixArray.cpp; sourceTree = "<group>"; }; - 1E2755B514667CC2009D1DF9 /* PhraseDictionaryALSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryALSuffixArray.h; path = src/PhraseDictionaryALSuffixArray.h; sourceTree = "<group>"; }; - 1E2E1604132A890D00ED4085 /* ChartCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartCell.cpp; path = src/ChartCell.cpp; sourceTree = "<group>"; }; - 1E2E1605132A890D00ED4085 /* ChartCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartCell.h; path = src/ChartCell.h; sourceTree = "<group>"; }; - 1E2E1606132A890D00ED4085 /* ChartCellCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartCellCollection.cpp; path = src/ChartCellCollection.cpp; sourceTree = "<group>"; }; - 1E2E1607132A890D00ED4085 /* ChartCellCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartCellCollection.h; path = src/ChartCellCollection.h; sourceTree = "<group>"; }; - 1E2E1608132A890D00ED4085 /* ChartHypothesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartHypothesis.cpp; path = src/ChartHypothesis.cpp; sourceTree = "<group>"; }; - 1E2E1609132A890D00ED4085 /* ChartHypothesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartHypothesis.h; path = src/ChartHypothesis.h; sourceTree = "<group>"; }; - 1E2E160A132A890D00ED4085 /* ChartHypothesisCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartHypothesisCollection.cpp; path = src/ChartHypothesisCollection.cpp; sourceTree = "<group>"; }; - 1E2E160B132A890D00ED4085 /* ChartHypothesisCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartHypothesisCollection.h; path = src/ChartHypothesisCollection.h; sourceTree = "<group>"; }; - 1E2E160C132A890D00ED4085 /* ChartManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartManager.cpp; path = src/ChartManager.cpp; sourceTree = "<group>"; }; - 1E2E160D132A890D00ED4085 /* ChartManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartManager.h; path = src/ChartManager.h; sourceTree = "<group>"; }; - 1E2E160E132A890D00ED4085 /* ChartTranslationOptionCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTranslationOptionCollection.cpp; path = src/ChartTranslationOptionCollection.cpp; sourceTree = "<group>"; }; - 1E2E160F132A890D00ED4085 /* ChartTranslationOptionCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTranslationOptionCollection.h; path = src/ChartTranslationOptionCollection.h; sourceTree = "<group>"; }; - 1E2E1610132A890D00ED4085 /* ChartTrellisNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisNode.cpp; path = src/ChartTrellisNode.cpp; sourceTree = "<group>"; }; - 1E2E1611132A890D00ED4085 /* ChartTrellisNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisNode.h; path = src/ChartTrellisNode.h; sourceTree = "<group>"; }; - 1E2E1612132A890D00ED4085 /* ChartTrellisPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisPath.cpp; path = src/ChartTrellisPath.cpp; sourceTree = "<group>"; }; - 1E2E1613132A890D00ED4085 /* ChartTrellisPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisPath.h; path = src/ChartTrellisPath.h; sourceTree = "<group>"; }; - 1E2E1617132A890D00ED4085 /* ChartTrellisPathList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisPathList.h; path = src/ChartTrellisPathList.h; sourceTree = "<group>"; }; - 1E2E1632132A892800ED4085 /* OutputCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OutputCollector.h; path = src/OutputCollector.h; sourceTree = "<group>"; }; - 1E2E1633132A892800ED4085 /* RuleCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleCube.cpp; path = src/RuleCube.cpp; sourceTree = "<group>"; }; - 1E2E1634132A892800ED4085 /* RuleCube.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCube.h; path = src/RuleCube.h; sourceTree = "<group>"; }; - 1E2E1635132A892800ED4085 /* RuleCubeQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleCubeQueue.cpp; path = src/RuleCubeQueue.cpp; sourceTree = "<group>"; }; - 1E2E1636132A892800ED4085 /* RuleCubeQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCubeQueue.h; path = src/RuleCubeQueue.h; sourceTree = "<group>"; }; - 1E2E1637132A892800ED4085 /* ThreadPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPool.cpp; path = src/ThreadPool.cpp; sourceTree = "<group>"; }; - 1E2E1638132A892800ED4085 /* ThreadPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPool.h; path = src/ThreadPool.h; sourceTree = "<group>"; }; - 1E46B5A413BA5C7F0084F898 /* RuleCubeItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleCubeItem.cpp; path = src/RuleCubeItem.cpp; sourceTree = "<group>"; }; - 1E46B5A513BA5C7F0084F898 /* RuleCubeItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCubeItem.h; path = src/RuleCubeItem.h; sourceTree = "<group>"; }; - 1E474E11145575CA00178AD5 /* RuleTableLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleTableLoader.h; path = src/RuleTableLoader.h; sourceTree = "<group>"; }; - 1E528B9B13A12B2D00E9A67E /* params.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = params.cpp; path = src/DynSAInclude/params.cpp; sourceTree = "<group>"; }; - 1E528B9C13A12B2D00E9A67E /* SyntacticLanguageModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SyntacticLanguageModel.cpp; path = src/SyntacticLanguageModel.cpp; sourceTree = "<group>"; }; - 1EA6AB4813BCC838004465AF /* ChartRuleLookupManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartRuleLookupManager.cpp; path = src/ChartRuleLookupManager.cpp; sourceTree = "<group>"; }; - 1EA6AB4913BCC838004465AF /* ChartRuleLookupManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManager.h; path = src/ChartRuleLookupManager.h; sourceTree = "<group>"; }; - 1EBB262213A12DB500B51840 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hash.h; path = src/DynSAInclude/hash.h; sourceTree = "<group>"; }; - 1EBB262313A12DB500B51840 /* onlineRLM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = onlineRLM.h; path = src/DynSAInclude/onlineRLM.h; sourceTree = "<group>"; }; - 1EBB262413A12DB500B51840 /* params.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = params.h; path = src/DynSAInclude/params.h; sourceTree = "<group>"; }; - 1EBB262513A12DB500B51840 /* perfectHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = perfectHash.h; path = src/DynSAInclude/perfectHash.h; sourceTree = "<group>"; }; - 1EBB262613A12DB500B51840 /* quantizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quantizer.h; path = src/DynSAInclude/quantizer.h; sourceTree = "<group>"; }; - 1EBB262713A12DB500B51840 /* RandLMCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RandLMCache.h; path = src/DynSAInclude/RandLMCache.h; sourceTree = "<group>"; }; - 1EBB262813A12DB500B51840 /* RandLMFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RandLMFilter.h; path = src/DynSAInclude/RandLMFilter.h; sourceTree = "<group>"; }; - 1ECA43AD146D585900209CEF /* ChartCellLabelSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartCellLabelSet.h; path = src/ChartCellLabelSet.h; sourceTree = "<group>"; }; - 1ECA43AE146D585900209CEF /* ChartTrellisDetour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisDetour.cpp; path = src/ChartTrellisDetour.cpp; sourceTree = "<group>"; }; - 1ECA43B1146D586D00209CEF /* ChartTrellisDetour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisDetour.h; path = src/ChartTrellisDetour.h; sourceTree = "<group>"; }; - 1ECA43B2146D586D00209CEF /* ChartTrellisDetourQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisDetourQueue.cpp; path = src/ChartTrellisDetourQueue.cpp; sourceTree = "<group>"; }; - 1ECA43B3146D586D00209CEF /* ChartTrellisDetourQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisDetourQueue.h; path = src/ChartTrellisDetourQueue.h; sourceTree = "<group>"; }; - 1ED00034124BC2690029177F /* ChartTranslationOption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTranslationOption.cpp; path = src/ChartTranslationOption.cpp; sourceTree = "<group>"; }; - 1ED00035124BC2690029177F /* ChartTranslationOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTranslationOption.h; path = src/ChartTranslationOption.h; sourceTree = "<group>"; }; - 1ED0DE1D1432A0D100C20FBE /* RuleTableLoaderCompact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleTableLoaderCompact.cpp; path = src/RuleTableLoaderCompact.cpp; sourceTree = "<group>"; }; - 1ED0DE1E1432A0D100C20FBE /* RuleTableLoaderCompact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleTableLoaderCompact.h; path = src/RuleTableLoaderCompact.h; sourceTree = "<group>"; }; - 1ED0DE211432A0D100C20FBE /* RuleTableLoaderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleTableLoaderFactory.cpp; path = src/RuleTableLoaderFactory.cpp; sourceTree = "<group>"; }; - 1ED0DE221432A0D100C20FBE /* RuleTableLoaderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleTableLoaderFactory.h; path = src/RuleTableLoaderFactory.h; sourceTree = "<group>"; }; - 1ED0DE251432A0D100C20FBE /* RuleTableLoaderStandard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleTableLoaderStandard.cpp; path = src/RuleTableLoaderStandard.cpp; sourceTree = "<group>"; }; - 1ED0DE261432A0D100C20FBE /* RuleTableLoaderStandard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleTableLoaderStandard.h; path = src/RuleTableLoaderStandard.h; sourceTree = "<group>"; }; - 1ED0FD4C124BB9380029177F /* AlignmentInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AlignmentInfo.cpp; path = src/AlignmentInfo.cpp; sourceTree = "<group>"; }; - 1ED0FD4D124BB9380029177F /* AlignmentInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlignmentInfo.h; path = src/AlignmentInfo.h; sourceTree = "<group>"; }; - 1ED0FD4E124BB9380029177F /* BilingualDynSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BilingualDynSuffixArray.cpp; path = src/BilingualDynSuffixArray.cpp; sourceTree = "<group>"; }; - 1ED0FD4F124BB9380029177F /* BilingualDynSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BilingualDynSuffixArray.h; path = src/BilingualDynSuffixArray.h; sourceTree = "<group>"; }; - 1ED0FD50124BB9380029177F /* BitmapContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BitmapContainer.cpp; path = src/BitmapContainer.cpp; sourceTree = "<group>"; }; - 1ED0FD51124BB9380029177F /* BitmapContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitmapContainer.h; path = src/BitmapContainer.h; sourceTree = "<group>"; }; - 1ED0FD52124BB9380029177F /* CellCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CellCollection.h; path = src/CellCollection.h; sourceTree = "<group>"; }; - 1ED0FD57124BB9380029177F /* ConfusionNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConfusionNet.cpp; path = src/ConfusionNet.cpp; sourceTree = "<group>"; }; - 1ED0FD58124BB9380029177F /* ConfusionNet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConfusionNet.h; path = src/ConfusionNet.h; sourceTree = "<group>"; }; - 1ED0FD59124BB9380029177F /* DecodeFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeFeature.cpp; path = src/DecodeFeature.cpp; sourceTree = "<group>"; }; - 1ED0FD5A124BB9380029177F /* DecodeFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeFeature.h; path = src/DecodeFeature.h; sourceTree = "<group>"; }; - 1ED0FD5B124BB9380029177F /* DecodeGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeGraph.cpp; path = src/DecodeGraph.cpp; sourceTree = "<group>"; }; - 1ED0FD5C124BB9380029177F /* DecodeGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeGraph.h; path = src/DecodeGraph.h; sourceTree = "<group>"; }; - 1ED0FD5D124BB9380029177F /* DecodeStep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeStep.cpp; path = src/DecodeStep.cpp; sourceTree = "<group>"; }; - 1ED0FD5E124BB9380029177F /* DecodeStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeStep.h; path = src/DecodeStep.h; sourceTree = "<group>"; }; - 1ED0FD5F124BB9380029177F /* DecodeStepGeneration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeStepGeneration.cpp; path = src/DecodeStepGeneration.cpp; sourceTree = "<group>"; }; - 1ED0FD60124BB9380029177F /* DecodeStepGeneration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeStepGeneration.h; path = src/DecodeStepGeneration.h; sourceTree = "<group>"; }; - 1ED0FD61124BB9380029177F /* DecodeStepTranslation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeStepTranslation.cpp; path = src/DecodeStepTranslation.cpp; sourceTree = "<group>"; }; - 1ED0FD62124BB9380029177F /* DecodeStepTranslation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeStepTranslation.h; path = src/DecodeStepTranslation.h; sourceTree = "<group>"; }; - 1ED0FD63124BB9380029177F /* Dictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Dictionary.cpp; path = src/Dictionary.cpp; sourceTree = "<group>"; }; - 1ED0FD64124BB9380029177F /* Dictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Dictionary.h; path = src/Dictionary.h; sourceTree = "<group>"; }; - 1ED0FD65124BB9380029177F /* DotChart.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DotChart.cpp; path = src/DotChart.cpp; sourceTree = "<group>"; }; - 1ED0FD66124BB9380029177F /* DotChart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DotChart.h; path = src/DotChart.h; sourceTree = "<group>"; }; - 1ED0FD67124BB9380029177F /* DotChartOnDisk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DotChartOnDisk.cpp; path = src/DotChartOnDisk.cpp; sourceTree = "<group>"; }; - 1ED0FD68124BB9380029177F /* DotChartOnDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DotChartOnDisk.h; path = src/DotChartOnDisk.h; sourceTree = "<group>"; }; - 1ED0FD69124BB9380029177F /* DummyScoreProducers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DummyScoreProducers.cpp; path = src/DummyScoreProducers.cpp; sourceTree = "<group>"; }; - 1ED0FD6A124BB9380029177F /* DummyScoreProducers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DummyScoreProducers.h; path = src/DummyScoreProducers.h; sourceTree = "<group>"; }; - 1ED0FD6C124BB9380029177F /* fdstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fdstream.h; sourceTree = "<group>"; }; - 1ED0FD6D124BB9380029177F /* file.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = file.cpp; sourceTree = "<group>"; }; - 1ED0FD6E124BB9380029177F /* file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; }; - 1ED0FD6F124BB9380029177F /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = "<group>"; }; - 1ED0FD70124BB9380029177F /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = "<group>"; }; - 1ED0FD71124BB9380029177F /* vocab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vocab.cpp; sourceTree = "<group>"; }; - 1ED0FD72124BB9380029177F /* vocab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vocab.h; sourceTree = "<group>"; }; - 1ED0FD73124BB9380029177F /* DynSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DynSuffixArray.cpp; path = src/DynSuffixArray.cpp; sourceTree = "<group>"; }; - 1ED0FD74124BB9380029177F /* DynSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DynSuffixArray.h; path = src/DynSuffixArray.h; sourceTree = "<group>"; }; - 1ED0FD75124BB9380029177F /* Factor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Factor.cpp; path = src/Factor.cpp; sourceTree = "<group>"; }; - 1ED0FD76124BB9380029177F /* Factor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Factor.h; path = src/Factor.h; sourceTree = "<group>"; }; - 1ED0FD77124BB9380029177F /* FactorCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FactorCollection.cpp; path = src/FactorCollection.cpp; sourceTree = "<group>"; }; - 1ED0FD78124BB9380029177F /* FactorCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FactorCollection.h; path = src/FactorCollection.h; sourceTree = "<group>"; }; - 1ED0FD79124BB9380029177F /* FactorTypeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FactorTypeSet.cpp; path = src/FactorTypeSet.cpp; sourceTree = "<group>"; }; - 1ED0FD7A124BB9380029177F /* FactorTypeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FactorTypeSet.h; path = src/FactorTypeSet.h; sourceTree = "<group>"; }; - 1ED0FD7B124BB9380029177F /* FeatureFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureFunction.cpp; path = src/FeatureFunction.cpp; sourceTree = "<group>"; }; - 1ED0FD7C124BB9380029177F /* FeatureFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeatureFunction.h; path = src/FeatureFunction.h; sourceTree = "<group>"; }; - 1ED0FD7D124BB9380029177F /* FFState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FFState.cpp; path = src/FFState.cpp; sourceTree = "<group>"; }; - 1ED0FD7E124BB9380029177F /* FFState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FFState.h; path = src/FFState.h; sourceTree = "<group>"; }; - 1ED0FD7F124BB9380029177F /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = File.cpp; path = src/File.cpp; sourceTree = "<group>"; }; - 1ED0FD80124BB9380029177F /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = File.h; path = src/File.h; sourceTree = "<group>"; }; - 1ED0FD81124BB9380029177F /* FilePtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilePtr.h; path = src/FilePtr.h; sourceTree = "<group>"; }; - 1ED0FD82124BB9380029177F /* FloydWarshall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FloydWarshall.cpp; path = src/FloydWarshall.cpp; sourceTree = "<group>"; }; - 1ED0FD83124BB9380029177F /* FloydWarshall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FloydWarshall.h; path = src/FloydWarshall.h; sourceTree = "<group>"; }; - 1ED0FD84124BB9380029177F /* GenerationDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GenerationDictionary.cpp; path = src/GenerationDictionary.cpp; sourceTree = "<group>"; }; - 1ED0FD85124BB9380029177F /* GenerationDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GenerationDictionary.h; path = src/GenerationDictionary.h; sourceTree = "<group>"; }; - 1ED0FD86124BB9380029177F /* GlobalLexicalModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GlobalLexicalModel.cpp; path = src/GlobalLexicalModel.cpp; sourceTree = "<group>"; }; - 1ED0FD87124BB9380029177F /* GlobalLexicalModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GlobalLexicalModel.h; path = src/GlobalLexicalModel.h; sourceTree = "<group>"; }; - 1ED0FD88124BB9380029177F /* gzfilebuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gzfilebuf.h; path = src/gzfilebuf.h; sourceTree = "<group>"; }; - 1ED0FD89124BB9380029177F /* hash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = hash.cpp; path = src/hash.cpp; sourceTree = "<group>"; }; - 1ED0FD8A124BB9380029177F /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hash.h; path = src/hash.h; sourceTree = "<group>"; }; - 1ED0FD8B124BB9380029177F /* hypergraph.proto */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hypergraph.proto; path = src/hypergraph.proto; sourceTree = "<group>"; }; - 1ED0FD8C124BB9380029177F /* Hypothesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Hypothesis.cpp; path = src/Hypothesis.cpp; sourceTree = "<group>"; }; - 1ED0FD8D124BB9380029177F /* Hypothesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Hypothesis.h; path = src/Hypothesis.h; sourceTree = "<group>"; }; - 1ED0FD8E124BB9380029177F /* HypothesisStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HypothesisStack.cpp; path = src/HypothesisStack.cpp; sourceTree = "<group>"; }; - 1ED0FD8F124BB9380029177F /* HypothesisStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypothesisStack.h; path = src/HypothesisStack.h; sourceTree = "<group>"; }; - 1ED0FD90124BB9380029177F /* HypothesisStackCubePruning.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HypothesisStackCubePruning.cpp; path = src/HypothesisStackCubePruning.cpp; sourceTree = "<group>"; }; - 1ED0FD91124BB9380029177F /* HypothesisStackCubePruning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypothesisStackCubePruning.h; path = src/HypothesisStackCubePruning.h; sourceTree = "<group>"; }; - 1ED0FD92124BB9380029177F /* HypothesisStackNormal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HypothesisStackNormal.cpp; path = src/HypothesisStackNormal.cpp; sourceTree = "<group>"; }; - 1ED0FD93124BB9380029177F /* HypothesisStackNormal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypothesisStackNormal.h; path = src/HypothesisStackNormal.h; sourceTree = "<group>"; }; - 1ED0FD94124BB9380029177F /* InputFileStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputFileStream.cpp; path = src/InputFileStream.cpp; sourceTree = "<group>"; }; - 1ED0FD95124BB9380029177F /* InputFileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputFileStream.h; path = src/InputFileStream.h; sourceTree = "<group>"; }; - 1ED0FD96124BB9380029177F /* InputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputType.cpp; path = src/InputType.cpp; sourceTree = "<group>"; }; - 1ED0FD97124BB9380029177F /* InputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputType.h; path = src/InputType.h; sourceTree = "<group>"; }; - 1ED0FDB3124BB9380029177F /* LexicalReordering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReordering.cpp; path = src/LexicalReordering.cpp; sourceTree = "<group>"; }; - 1ED0FDB4124BB9380029177F /* LexicalReordering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReordering.h; path = src/LexicalReordering.h; sourceTree = "<group>"; }; - 1ED0FDB5124BB9380029177F /* LexicalReorderingState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReorderingState.cpp; path = src/LexicalReorderingState.cpp; sourceTree = "<group>"; }; - 1ED0FDB6124BB9380029177F /* LexicalReorderingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReorderingState.h; path = src/LexicalReorderingState.h; sourceTree = "<group>"; }; - 1ED0FDB7124BB9380029177F /* LexicalReorderingTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReorderingTable.cpp; path = src/LexicalReorderingTable.cpp; sourceTree = "<group>"; }; - 1ED0FDB8124BB9380029177F /* LexicalReorderingTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReorderingTable.h; path = src/LexicalReorderingTable.h; sourceTree = "<group>"; }; - 1ED0FDB9124BB9380029177F /* LMList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LMList.cpp; path = src/LMList.cpp; sourceTree = "<group>"; }; - 1ED0FDBA124BB9380029177F /* LMList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LMList.h; path = src/LMList.h; sourceTree = "<group>"; }; - 1ED0FDBB124BB9380029177F /* LVoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LVoc.cpp; path = src/LVoc.cpp; sourceTree = "<group>"; }; - 1ED0FDBC124BB9380029177F /* LVoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVoc.h; path = src/LVoc.h; sourceTree = "<group>"; }; - 1ED0FDC0124BB9380029177F /* Manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Manager.cpp; path = src/Manager.cpp; sourceTree = "<group>"; }; - 1ED0FDC1124BB9380029177F /* Manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Manager.h; path = src/Manager.h; sourceTree = "<group>"; }; - 1ED0FDC6124BB9380029177F /* ObjectPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectPool.h; path = src/ObjectPool.h; sourceTree = "<group>"; }; - 1ED0FDC7124BB9380029177F /* Parameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Parameter.cpp; path = src/Parameter.cpp; sourceTree = "<group>"; }; - 1ED0FDC8124BB9380029177F /* Parameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Parameter.h; path = src/Parameter.h; sourceTree = "<group>"; }; - 1ED0FDC9124BB9380029177F /* PartialTranslOptColl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartialTranslOptColl.cpp; path = src/PartialTranslOptColl.cpp; sourceTree = "<group>"; }; - 1ED0FDCA124BB9380029177F /* PartialTranslOptColl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartialTranslOptColl.h; path = src/PartialTranslOptColl.h; sourceTree = "<group>"; }; - 1ED0FDCB124BB9380029177F /* PCNTools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCNTools.cpp; path = src/PCNTools.cpp; sourceTree = "<group>"; }; - 1ED0FDCC124BB9380029177F /* PCNTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCNTools.h; path = src/PCNTools.h; sourceTree = "<group>"; }; - 1ED0FDCD124BB9380029177F /* PDTAimp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDTAimp.h; path = src/PDTAimp.h; sourceTree = "<group>"; }; - 1ED0FDCE124BB9380029177F /* Phrase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Phrase.cpp; path = src/Phrase.cpp; sourceTree = "<group>"; }; - 1ED0FDCF124BB9380029177F /* Phrase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Phrase.h; path = src/Phrase.h; sourceTree = "<group>"; }; - 1ED0FDD0124BB9380029177F /* PhraseDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionary.cpp; path = src/PhraseDictionary.cpp; sourceTree = "<group>"; }; - 1ED0FDD1124BB9380029177F /* PhraseDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionary.h; path = src/PhraseDictionary.h; sourceTree = "<group>"; }; - 1ED0FDD2124BB9380029177F /* PhraseDictionaryDynSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryDynSuffixArray.cpp; path = src/PhraseDictionaryDynSuffixArray.cpp; sourceTree = "<group>"; }; - 1ED0FDD3124BB9380029177F /* PhraseDictionaryDynSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryDynSuffixArray.h; path = src/PhraseDictionaryDynSuffixArray.h; sourceTree = "<group>"; }; - 1ED0FDD4124BB9380029177F /* PhraseDictionaryMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryMemory.cpp; path = src/PhraseDictionaryMemory.cpp; sourceTree = "<group>"; }; - 1ED0FDD5124BB9380029177F /* PhraseDictionaryMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryMemory.h; path = src/PhraseDictionaryMemory.h; sourceTree = "<group>"; }; - 1ED0FDD6124BB9380029177F /* PhraseDictionaryNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryNode.cpp; path = src/PhraseDictionaryNode.cpp; sourceTree = "<group>"; }; - 1ED0FDD7124BB9380029177F /* PhraseDictionaryNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryNode.h; path = src/PhraseDictionaryNode.h; sourceTree = "<group>"; }; - 1ED0FDD8124BB9380029177F /* PhraseDictionaryNodeSCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryNodeSCFG.cpp; path = src/PhraseDictionaryNodeSCFG.cpp; sourceTree = "<group>"; }; - 1ED0FDD9124BB9380029177F /* PhraseDictionaryNodeSCFG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryNodeSCFG.h; path = src/PhraseDictionaryNodeSCFG.h; sourceTree = "<group>"; }; - 1ED0FDDA124BB9380029177F /* PhraseDictionaryOnDisk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryOnDisk.cpp; path = src/PhraseDictionaryOnDisk.cpp; sourceTree = "<group>"; }; - 1ED0FDDB124BB9380029177F /* PhraseDictionaryOnDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryOnDisk.h; path = src/PhraseDictionaryOnDisk.h; sourceTree = "<group>"; }; - 1ED0FDDD124BB9380029177F /* PhraseDictionarySCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionarySCFG.cpp; path = src/PhraseDictionarySCFG.cpp; sourceTree = "<group>"; }; - 1ED0FDDF124BB9380029177F /* PhraseDictionaryTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryTree.cpp; path = src/PhraseDictionaryTree.cpp; sourceTree = "<group>"; }; - 1ED0FDE0124BB9380029177F /* PhraseDictionaryTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryTree.h; path = src/PhraseDictionaryTree.h; sourceTree = "<group>"; }; - 1ED0FDE1124BB9380029177F /* PhraseDictionaryTreeAdaptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryTreeAdaptor.cpp; path = src/PhraseDictionaryTreeAdaptor.cpp; sourceTree = "<group>"; }; - 1ED0FDE2124BB9380029177F /* PhraseDictionaryTreeAdaptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryTreeAdaptor.h; path = src/PhraseDictionaryTreeAdaptor.h; sourceTree = "<group>"; }; - 1ED0FDE3124BB9380029177F /* PrefixTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrefixTree.h; path = src/PrefixTree.h; sourceTree = "<group>"; }; - 1ED0FDE4124BB9380029177F /* PrefixTreeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrefixTreeMap.cpp; path = src/PrefixTreeMap.cpp; sourceTree = "<group>"; }; - 1ED0FDE5124BB9380029177F /* PrefixTreeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrefixTreeMap.h; path = src/PrefixTreeMap.h; sourceTree = "<group>"; }; - 1ED0FDE6124BB9380029177F /* ReorderingConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReorderingConstraint.cpp; path = src/ReorderingConstraint.cpp; sourceTree = "<group>"; }; - 1ED0FDE7124BB9380029177F /* ReorderingConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReorderingConstraint.h; path = src/ReorderingConstraint.h; sourceTree = "<group>"; }; - 1ED0FDE8124BB9380029177F /* ReorderingStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReorderingStack.cpp; path = src/ReorderingStack.cpp; sourceTree = "<group>"; }; - 1ED0FDE9124BB9380029177F /* ReorderingStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReorderingStack.h; path = src/ReorderingStack.h; sourceTree = "<group>"; }; - 1ED0FDEA124BB9380029177F /* rule.proto */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rule.proto; path = src/rule.proto; sourceTree = "<group>"; }; - 1ED0FDEB124BB9380029177F /* ScoreComponentCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreComponentCollection.cpp; path = src/ScoreComponentCollection.cpp; sourceTree = "<group>"; }; - 1ED0FDEC124BB9380029177F /* ScoreComponentCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreComponentCollection.h; path = src/ScoreComponentCollection.h; sourceTree = "<group>"; }; - 1ED0FDED124BB9380029177F /* ScoreIndexManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreIndexManager.cpp; path = src/ScoreIndexManager.cpp; sourceTree = "<group>"; }; - 1ED0FDEE124BB9380029177F /* ScoreIndexManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreIndexManager.h; path = src/ScoreIndexManager.h; sourceTree = "<group>"; }; - 1ED0FDEF124BB9380029177F /* ScoreProducer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreProducer.cpp; path = src/ScoreProducer.cpp; sourceTree = "<group>"; }; - 1ED0FDF0124BB9380029177F /* ScoreProducer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreProducer.h; path = src/ScoreProducer.h; sourceTree = "<group>"; }; - 1ED0FDF1124BB9380029177F /* Search.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Search.cpp; path = src/Search.cpp; sourceTree = "<group>"; }; - 1ED0FDF2124BB9380029177F /* Search.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Search.h; path = src/Search.h; sourceTree = "<group>"; }; - 1ED0FDF3124BB9380029177F /* SearchCubePruning.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchCubePruning.cpp; path = src/SearchCubePruning.cpp; sourceTree = "<group>"; }; - 1ED0FDF4124BB9380029177F /* SearchCubePruning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchCubePruning.h; path = src/SearchCubePruning.h; sourceTree = "<group>"; }; - 1ED0FDF5124BB9380029177F /* SearchNormal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchNormal.cpp; path = src/SearchNormal.cpp; sourceTree = "<group>"; }; - 1ED0FDF6124BB9380029177F /* SearchNormal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchNormal.h; path = src/SearchNormal.h; sourceTree = "<group>"; }; - 1ED0FDF7124BB9380029177F /* Sentence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sentence.cpp; path = src/Sentence.cpp; sourceTree = "<group>"; }; - 1ED0FDF8124BB9380029177F /* Sentence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sentence.h; path = src/Sentence.h; sourceTree = "<group>"; }; - 1ED0FDF9124BB9380029177F /* SentenceStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SentenceStats.cpp; path = src/SentenceStats.cpp; sourceTree = "<group>"; }; - 1ED0FDFA124BB9380029177F /* SentenceStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentenceStats.h; path = src/SentenceStats.h; sourceTree = "<group>"; }; - 1ED0FDFB124BB9380029177F /* SquareMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SquareMatrix.cpp; path = src/SquareMatrix.cpp; sourceTree = "<group>"; }; - 1ED0FDFC124BB9380029177F /* SquareMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SquareMatrix.h; path = src/SquareMatrix.h; sourceTree = "<group>"; }; - 1ED0FDFD124BB9380029177F /* StaticData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StaticData.cpp; path = src/StaticData.cpp; sourceTree = "<group>"; }; - 1ED0FDFE124BB9380029177F /* StaticData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StaticData.h; path = src/StaticData.h; sourceTree = "<group>"; }; - 1ED0FDFF124BB9380029177F /* TargetPhrase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetPhrase.cpp; path = src/TargetPhrase.cpp; sourceTree = "<group>"; }; - 1ED0FE00124BB9380029177F /* TargetPhrase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetPhrase.h; path = src/TargetPhrase.h; sourceTree = "<group>"; }; - 1ED0FE01124BB9380029177F /* TargetPhraseCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetPhraseCollection.cpp; path = src/TargetPhraseCollection.cpp; sourceTree = "<group>"; }; - 1ED0FE02124BB9380029177F /* TargetPhraseCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetPhraseCollection.h; path = src/TargetPhraseCollection.h; sourceTree = "<group>"; }; - 1ED0FE03124BB9380029177F /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = src/Timer.cpp; sourceTree = "<group>"; }; - 1ED0FE04124BB9380029177F /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = src/Timer.h; sourceTree = "<group>"; }; - 1ED0FE05124BB9380029177F /* TranslationOption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOption.cpp; path = src/TranslationOption.cpp; sourceTree = "<group>"; }; - 1ED0FE06124BB9380029177F /* TranslationOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOption.h; path = src/TranslationOption.h; sourceTree = "<group>"; }; - 1ED0FE07124BB9380029177F /* TranslationOptionCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionCollection.cpp; path = src/TranslationOptionCollection.cpp; sourceTree = "<group>"; }; - 1ED0FE08124BB9380029177F /* TranslationOptionCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionCollection.h; path = src/TranslationOptionCollection.h; sourceTree = "<group>"; }; - 1ED0FE09124BB9380029177F /* TranslationOptionCollectionConfusionNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionCollectionConfusionNet.cpp; path = src/TranslationOptionCollectionConfusionNet.cpp; sourceTree = "<group>"; }; - 1ED0FE0A124BB9380029177F /* TranslationOptionCollectionConfusionNet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionCollectionConfusionNet.h; path = src/TranslationOptionCollectionConfusionNet.h; sourceTree = "<group>"; }; - 1ED0FE0B124BB9380029177F /* TranslationOptionCollectionText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionCollectionText.cpp; path = src/TranslationOptionCollectionText.cpp; sourceTree = "<group>"; }; - 1ED0FE0C124BB9380029177F /* TranslationOptionCollectionText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionCollectionText.h; path = src/TranslationOptionCollectionText.h; sourceTree = "<group>"; }; - 1ED0FE0D124BB9380029177F /* TranslationOptionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionList.cpp; path = src/TranslationOptionList.cpp; sourceTree = "<group>"; }; - 1ED0FE0E124BB9380029177F /* TranslationOptionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionList.h; path = src/TranslationOptionList.h; sourceTree = "<group>"; }; - 1ED0FE0F124BB9380029177F /* TranslationSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationSystem.cpp; path = src/TranslationSystem.cpp; sourceTree = "<group>"; }; - 1ED0FE10124BB9380029177F /* TranslationSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationSystem.h; path = src/TranslationSystem.h; sourceTree = "<group>"; }; - 1ED0FE11124BB9380029177F /* TreeInput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TreeInput.cpp; path = src/TreeInput.cpp; sourceTree = "<group>"; }; - 1ED0FE12124BB9380029177F /* TreeInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TreeInput.h; path = src/TreeInput.h; sourceTree = "<group>"; }; - 1ED0FE13124BB9380029177F /* TrellisPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TrellisPath.cpp; path = src/TrellisPath.cpp; sourceTree = "<group>"; }; - 1ED0FE14124BB9380029177F /* TrellisPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrellisPath.h; path = src/TrellisPath.h; sourceTree = "<group>"; }; - 1ED0FE15124BB9380029177F /* TrellisPathCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TrellisPathCollection.cpp; path = src/TrellisPathCollection.cpp; sourceTree = "<group>"; }; - 1ED0FE16124BB9380029177F /* TrellisPathCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrellisPathCollection.h; path = src/TrellisPathCollection.h; sourceTree = "<group>"; }; - 1ED0FE17124BB9380029177F /* TrellisPathList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrellisPathList.h; path = src/TrellisPathList.h; sourceTree = "<group>"; }; - 1ED0FE18124BB9380029177F /* TypeDef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeDef.h; path = src/TypeDef.h; sourceTree = "<group>"; }; - 1ED0FE19124BB9380029177F /* UniqueObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniqueObject.h; path = src/UniqueObject.h; sourceTree = "<group>"; }; - 1ED0FE1A124BB9380029177F /* UserMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserMessage.cpp; path = src/UserMessage.cpp; sourceTree = "<group>"; }; - 1ED0FE1B124BB9380029177F /* UserMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserMessage.h; path = src/UserMessage.h; sourceTree = "<group>"; }; - 1ED0FE1C124BB9380029177F /* Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Util.cpp; path = src/Util.cpp; sourceTree = "<group>"; }; - 1ED0FE1D124BB9380029177F /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Util.h; path = src/Util.h; sourceTree = "<group>"; }; - 1ED0FE1E124BB9380029177F /* Word.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Word.cpp; path = src/Word.cpp; sourceTree = "<group>"; }; - 1ED0FE1F124BB9380029177F /* Word.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Word.h; path = src/Word.h; sourceTree = "<group>"; }; - 1ED0FE22124BB9380029177F /* WordLattice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordLattice.cpp; path = src/WordLattice.cpp; sourceTree = "<group>"; }; - 1ED0FE23124BB9380029177F /* WordLattice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordLattice.h; path = src/WordLattice.h; sourceTree = "<group>"; }; - 1ED0FE24124BB9380029177F /* WordsBitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordsBitmap.cpp; path = src/WordsBitmap.cpp; sourceTree = "<group>"; }; - 1ED0FE25124BB9380029177F /* WordsBitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordsBitmap.h; path = src/WordsBitmap.h; sourceTree = "<group>"; }; - 1ED0FE26124BB9380029177F /* WordsRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordsRange.cpp; path = src/WordsRange.cpp; sourceTree = "<group>"; }; - 1ED0FE27124BB9380029177F /* WordsRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordsRange.h; path = src/WordsRange.h; sourceTree = "<group>"; }; - 1ED0FE28124BB9380029177F /* XmlOption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XmlOption.cpp; path = src/XmlOption.cpp; sourceTree = "<group>"; }; - 1ED0FE29124BB9380029177F /* XmlOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XmlOption.h; path = src/XmlOption.h; sourceTree = "<group>"; }; - 1ED0FFD1124BC0BF0029177F /* ChartTranslationOptionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTranslationOptionList.cpp; path = src/ChartTranslationOptionList.cpp; sourceTree = "<group>"; }; - 1ED0FFD2124BC0BF0029177F /* ChartTranslationOptionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTranslationOptionList.h; path = src/ChartTranslationOptionList.h; sourceTree = "<group>"; }; - 1ED22EE313DD96B0000DE8C9 /* DotChartInMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DotChartInMemory.cpp; path = src/DotChartInMemory.cpp; sourceTree = "<group>"; }; - 1ED22EE413DD96B0000DE8C9 /* DotChartInMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DotChartInMemory.h; path = src/DotChartInMemory.h; sourceTree = "<group>"; }; - 1EE58D9D133726C700D93158 /* NonTerminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NonTerminal.cpp; path = src/NonTerminal.cpp; sourceTree = "<group>"; }; - 1EE58D9E133726C700D93158 /* NonTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NonTerminal.h; path = src/NonTerminal.h; sourceTree = "<group>"; }; - 1EEB43ED1264A6F200739BA5 /* PhraseDictionarySCFG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionarySCFG.h; path = src/PhraseDictionarySCFG.h; sourceTree = "<group>"; }; - D2AAC046055464E500DB518D /* libmoses.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmoses.a; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D289987405E68DCB004EDB86 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* moses */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6A0FF2B0290797F04C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - ); - name = moses; - sourceTree = "<group>"; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 1ECA43B1146D586D00209CEF /* ChartTrellisDetour.h */, - 1ECA43B2146D586D00209CEF /* ChartTrellisDetourQueue.cpp */, - 1ECA43B3146D586D00209CEF /* ChartTrellisDetourQueue.h */, - 1ECA43AD146D585900209CEF /* ChartCellLabelSet.h */, - 1ECA43AE146D585900209CEF /* ChartTrellisDetour.cpp */, - 1E16D086144DAA3F00B60B4F /* LM */, - 1ED0FD4C124BB9380029177F /* AlignmentInfo.cpp */, - 1ED0FD4D124BB9380029177F /* AlignmentInfo.h */, - 1E07291D13B3854D004454FD /* AlignmentInfoCollection.cpp */, - 1E07291E13B3854D004454FD /* AlignmentInfoCollection.h */, - 1ED0FD4E124BB9380029177F /* BilingualDynSuffixArray.cpp */, - 1ED0FD4F124BB9380029177F /* BilingualDynSuffixArray.h */, - 1ED0FD50124BB9380029177F /* BitmapContainer.cpp */, - 1ED0FD51124BB9380029177F /* BitmapContainer.h */, - 1ED0FD52124BB9380029177F /* CellCollection.h */, - 1E2E1604132A890D00ED4085 /* ChartCell.cpp */, - 1E2E1605132A890D00ED4085 /* ChartCell.h */, - 1E2E1606132A890D00ED4085 /* ChartCellCollection.cpp */, - 1E2E1607132A890D00ED4085 /* ChartCellCollection.h */, - 1E2E1608132A890D00ED4085 /* ChartHypothesis.cpp */, - 1E2E1609132A890D00ED4085 /* ChartHypothesis.h */, - 1E2E160A132A890D00ED4085 /* ChartHypothesisCollection.cpp */, - 1E2E160B132A890D00ED4085 /* ChartHypothesisCollection.h */, - 1E2E160C132A890D00ED4085 /* ChartManager.cpp */, - 1E2E160D132A890D00ED4085 /* ChartManager.h */, - 1EA6AB4813BCC838004465AF /* ChartRuleLookupManager.cpp */, - 1EA6AB4913BCC838004465AF /* ChartRuleLookupManager.h */, - 1E1C589012F310A70067DEB7 /* ChartRuleLookupManagerMemory.cpp */, - 1E1C589112F310A70067DEB7 /* ChartRuleLookupManagerMemory.h */, - 1E1C589212F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.cpp */, - 1E1C589312F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.h */, - 1ED00034124BC2690029177F /* ChartTranslationOption.cpp */, - 1ED00035124BC2690029177F /* ChartTranslationOption.h */, - 1E2E160E132A890D00ED4085 /* ChartTranslationOptionCollection.cpp */, - 1E2E160F132A890D00ED4085 /* ChartTranslationOptionCollection.h */, - 1ED0FFD1124BC0BF0029177F /* ChartTranslationOptionList.cpp */, - 1ED0FFD2124BC0BF0029177F /* ChartTranslationOptionList.h */, - 1E2E1610132A890D00ED4085 /* ChartTrellisNode.cpp */, - 1E2E1611132A890D00ED4085 /* ChartTrellisNode.h */, - 1E2E1612132A890D00ED4085 /* ChartTrellisPath.cpp */, - 1E2E1613132A890D00ED4085 /* ChartTrellisPath.h */, - 1E2E1617132A890D00ED4085 /* ChartTrellisPathList.h */, - 1ED0FD57124BB9380029177F /* ConfusionNet.cpp */, - 1ED0FD58124BB9380029177F /* ConfusionNet.h */, - 1ED0FD59124BB9380029177F /* DecodeFeature.cpp */, - 1ED0FD5A124BB9380029177F /* DecodeFeature.h */, - 1ED0FD5B124BB9380029177F /* DecodeGraph.cpp */, - 1ED0FD5C124BB9380029177F /* DecodeGraph.h */, - 1ED0FD5D124BB9380029177F /* DecodeStep.cpp */, - 1ED0FD5E124BB9380029177F /* DecodeStep.h */, - 1ED0FD5F124BB9380029177F /* DecodeStepGeneration.cpp */, - 1ED0FD60124BB9380029177F /* DecodeStepGeneration.h */, - 1ED0FD61124BB9380029177F /* DecodeStepTranslation.cpp */, - 1ED0FD62124BB9380029177F /* DecodeStepTranslation.h */, - 1ED0FD63124BB9380029177F /* Dictionary.cpp */, - 1ED0FD64124BB9380029177F /* Dictionary.h */, - 1ED0FD65124BB9380029177F /* DotChart.cpp */, - 1ED0FD66124BB9380029177F /* DotChart.h */, - 1ED22EE313DD96B0000DE8C9 /* DotChartInMemory.cpp */, - 1ED22EE413DD96B0000DE8C9 /* DotChartInMemory.h */, - 1ED0FD67124BB9380029177F /* DotChartOnDisk.cpp */, - 1ED0FD68124BB9380029177F /* DotChartOnDisk.h */, - 1ED0FD69124BB9380029177F /* DummyScoreProducers.cpp */, - 1ED0FD6A124BB9380029177F /* DummyScoreProducers.h */, - 1ED0FD6B124BB9380029177F /* DynSAInclude */, - 1ED0FD73124BB9380029177F /* DynSuffixArray.cpp */, - 1ED0FD74124BB9380029177F /* DynSuffixArray.h */, - 1ED0FD7D124BB9380029177F /* FFState.cpp */, - 1ED0FD7E124BB9380029177F /* FFState.h */, - 1ED0FD75124BB9380029177F /* Factor.cpp */, - 1ED0FD76124BB9380029177F /* Factor.h */, - 1ED0FD77124BB9380029177F /* FactorCollection.cpp */, - 1ED0FD78124BB9380029177F /* FactorCollection.h */, - 1ED0FD79124BB9380029177F /* FactorTypeSet.cpp */, - 1ED0FD7A124BB9380029177F /* FactorTypeSet.h */, - 1ED0FD7B124BB9380029177F /* FeatureFunction.cpp */, - 1ED0FD7C124BB9380029177F /* FeatureFunction.h */, - 1ED0FD7F124BB9380029177F /* File.cpp */, - 1ED0FD80124BB9380029177F /* File.h */, - 1ED0FD81124BB9380029177F /* FilePtr.h */, - 1ED0FD82124BB9380029177F /* FloydWarshall.cpp */, - 1ED0FD83124BB9380029177F /* FloydWarshall.h */, - 1ED0FD84124BB9380029177F /* GenerationDictionary.cpp */, - 1ED0FD85124BB9380029177F /* GenerationDictionary.h */, - 1ED0FD86124BB9380029177F /* GlobalLexicalModel.cpp */, - 1ED0FD87124BB9380029177F /* GlobalLexicalModel.h */, - 1ED0FD8C124BB9380029177F /* Hypothesis.cpp */, - 1ED0FD8D124BB9380029177F /* Hypothesis.h */, - 1ED0FD8E124BB9380029177F /* HypothesisStack.cpp */, - 1ED0FD8F124BB9380029177F /* HypothesisStack.h */, - 1ED0FD90124BB9380029177F /* HypothesisStackCubePruning.cpp */, - 1ED0FD91124BB9380029177F /* HypothesisStackCubePruning.h */, - 1ED0FD92124BB9380029177F /* HypothesisStackNormal.cpp */, - 1ED0FD93124BB9380029177F /* HypothesisStackNormal.h */, - 1ED0FD94124BB9380029177F /* InputFileStream.cpp */, - 1ED0FD95124BB9380029177F /* InputFileStream.h */, - 1ED0FD96124BB9380029177F /* InputType.cpp */, - 1ED0FD97124BB9380029177F /* InputType.h */, - 1ED0FDB9124BB9380029177F /* LMList.cpp */, - 1ED0FDBA124BB9380029177F /* LMList.h */, - 1ED0FDBB124BB9380029177F /* LVoc.cpp */, - 1ED0FDBC124BB9380029177F /* LVoc.h */, - 1ED0FDB3124BB9380029177F /* LexicalReordering.cpp */, - 1ED0FDB4124BB9380029177F /* LexicalReordering.h */, - 1ED0FDB5124BB9380029177F /* LexicalReorderingState.cpp */, - 1ED0FDB6124BB9380029177F /* LexicalReorderingState.h */, - 1ED0FDB7124BB9380029177F /* LexicalReorderingTable.cpp */, - 1ED0FDB8124BB9380029177F /* LexicalReorderingTable.h */, - 1ED0FDC0124BB9380029177F /* Manager.cpp */, - 1ED0FDC1124BB9380029177F /* Manager.h */, - 1EE58D9D133726C700D93158 /* NonTerminal.cpp */, - 1EE58D9E133726C700D93158 /* NonTerminal.h */, - 1ED0FDC6124BB9380029177F /* ObjectPool.h */, - 1E2E1632132A892800ED4085 /* OutputCollector.h */, - 1ED0FDCB124BB9380029177F /* PCNTools.cpp */, - 1ED0FDCC124BB9380029177F /* PCNTools.h */, - 1ED0FDCD124BB9380029177F /* PDTAimp.h */, - 1ED0FDC7124BB9380029177F /* Parameter.cpp */, - 1ED0FDC8124BB9380029177F /* Parameter.h */, - 1ED0FDC9124BB9380029177F /* PartialTranslOptColl.cpp */, - 1ED0FDCA124BB9380029177F /* PartialTranslOptColl.h */, - 1ED0FDCE124BB9380029177F /* Phrase.cpp */, - 1ED0FDCF124BB9380029177F /* Phrase.h */, - 1ED0FDD0124BB9380029177F /* PhraseDictionary.cpp */, - 1ED0FDD1124BB9380029177F /* PhraseDictionary.h */, - 1ED0FDD2124BB9380029177F /* PhraseDictionaryDynSuffixArray.cpp */, - 1ED0FDD3124BB9380029177F /* PhraseDictionaryDynSuffixArray.h */, - 1ED0FDD4124BB9380029177F /* PhraseDictionaryMemory.cpp */, - 1ED0FDD5124BB9380029177F /* PhraseDictionaryMemory.h */, - 1ED0FDD6124BB9380029177F /* PhraseDictionaryNode.cpp */, - 1ED0FDD7124BB9380029177F /* PhraseDictionaryNode.h */, - 1ED0FDD8124BB9380029177F /* PhraseDictionaryNodeSCFG.cpp */, - 1ED0FDD9124BB9380029177F /* PhraseDictionaryNodeSCFG.h */, - 1ED0FDDA124BB9380029177F /* PhraseDictionaryOnDisk.cpp */, - 1ED0FDDB124BB9380029177F /* PhraseDictionaryOnDisk.h */, - 1ED0FDDD124BB9380029177F /* PhraseDictionarySCFG.cpp */, - 1EEB43ED1264A6F200739BA5 /* PhraseDictionarySCFG.h */, - 1ED0FDDF124BB9380029177F /* PhraseDictionaryTree.cpp */, - 1ED0FDE0124BB9380029177F /* PhraseDictionaryTree.h */, - 1ED0FDE1124BB9380029177F /* PhraseDictionaryTreeAdaptor.cpp */, - 1ED0FDE2124BB9380029177F /* PhraseDictionaryTreeAdaptor.h */, - 1E078C1E14643C2000A707F4 /* PhraseDictionaryHiero.cpp */, - 1E078C1B14643AED00A707F4 /* PhraseDictionaryHiero.h */, - 1E2755B214667CA3009D1DF9 /* PhraseDictionaryALSuffixArray.cpp */, - 1E2755B514667CC2009D1DF9 /* PhraseDictionaryALSuffixArray.h */, - 1ED0FDE3124BB9380029177F /* PrefixTree.h */, - 1ED0FDE4124BB9380029177F /* PrefixTreeMap.cpp */, - 1ED0FDE5124BB9380029177F /* PrefixTreeMap.h */, - 1EBB262713A12DB500B51840 /* RandLMCache.h */, - 1EBB262813A12DB500B51840 /* RandLMFilter.h */, - 1ED0FDE6124BB9380029177F /* ReorderingConstraint.cpp */, - 1ED0FDE7124BB9380029177F /* ReorderingConstraint.h */, - 1ED0FDE8124BB9380029177F /* ReorderingStack.cpp */, - 1ED0FDE9124BB9380029177F /* ReorderingStack.h */, - 1E2E1633132A892800ED4085 /* RuleCube.cpp */, - 1E2E1634132A892800ED4085 /* RuleCube.h */, - 1E46B5A413BA5C7F0084F898 /* RuleCubeItem.cpp */, - 1E46B5A513BA5C7F0084F898 /* RuleCubeItem.h */, - 1E2E1635132A892800ED4085 /* RuleCubeQueue.cpp */, - 1E2E1636132A892800ED4085 /* RuleCubeQueue.h */, - 1ED0DE1D1432A0D100C20FBE /* RuleTableLoaderCompact.cpp */, - 1ED0DE1E1432A0D100C20FBE /* RuleTableLoaderCompact.h */, - 1ED0DE211432A0D100C20FBE /* RuleTableLoaderFactory.cpp */, - 1ED0DE221432A0D100C20FBE /* RuleTableLoaderFactory.h */, - 1ED0DE251432A0D100C20FBE /* RuleTableLoaderStandard.cpp */, - 1ED0DE261432A0D100C20FBE /* RuleTableLoaderStandard.h */, - 1E078C20146440A900A707F4 /* RuleTableLoaderHiero.h */, - 1E078C22146440F700A707F4 /* RuleTableLoaderHiero.cpp */, - 1E474E11145575CA00178AD5 /* RuleTableLoader.h */, - 1ED0FDEB124BB9380029177F /* ScoreComponentCollection.cpp */, - 1ED0FDEC124BB9380029177F /* ScoreComponentCollection.h */, - 1ED0FDED124BB9380029177F /* ScoreIndexManager.cpp */, - 1ED0FDEE124BB9380029177F /* ScoreIndexManager.h */, - 1ED0FDEF124BB9380029177F /* ScoreProducer.cpp */, - 1ED0FDF0124BB9380029177F /* ScoreProducer.h */, - 1ED0FDF1124BB9380029177F /* Search.cpp */, - 1ED0FDF2124BB9380029177F /* Search.h */, - 1ED0FDF3124BB9380029177F /* SearchCubePruning.cpp */, - 1ED0FDF4124BB9380029177F /* SearchCubePruning.h */, - 1ED0FDF5124BB9380029177F /* SearchNormal.cpp */, - 1ED0FDF6124BB9380029177F /* SearchNormal.h */, - 1ED0FDF7124BB9380029177F /* Sentence.cpp */, - 1ED0FDF8124BB9380029177F /* Sentence.h */, - 1ED0FDF9124BB9380029177F /* SentenceStats.cpp */, - 1ED0FDFA124BB9380029177F /* SentenceStats.h */, - 1ED0FDFB124BB9380029177F /* SquareMatrix.cpp */, - 1ED0FDFC124BB9380029177F /* SquareMatrix.h */, - 1ED0FDFD124BB9380029177F /* StaticData.cpp */, - 1ED0FDFE124BB9380029177F /* StaticData.h */, - 1E528B9C13A12B2D00E9A67E /* SyntacticLanguageModel.cpp */, - 1ED0FDFF124BB9380029177F /* TargetPhrase.cpp */, - 1ED0FE00124BB9380029177F /* TargetPhrase.h */, - 1ED0FE01124BB9380029177F /* TargetPhraseCollection.cpp */, - 1ED0FE02124BB9380029177F /* TargetPhraseCollection.h */, - 1E2E1637132A892800ED4085 /* ThreadPool.cpp */, - 1E2E1638132A892800ED4085 /* ThreadPool.h */, - 1ED0FE03124BB9380029177F /* Timer.cpp */, - 1ED0FE04124BB9380029177F /* Timer.h */, - 1ED0FE05124BB9380029177F /* TranslationOption.cpp */, - 1ED0FE06124BB9380029177F /* TranslationOption.h */, - 1ED0FE07124BB9380029177F /* TranslationOptionCollection.cpp */, - 1ED0FE08124BB9380029177F /* TranslationOptionCollection.h */, - 1ED0FE09124BB9380029177F /* TranslationOptionCollectionConfusionNet.cpp */, - 1ED0FE0A124BB9380029177F /* TranslationOptionCollectionConfusionNet.h */, - 1ED0FE0B124BB9380029177F /* TranslationOptionCollectionText.cpp */, - 1ED0FE0C124BB9380029177F /* TranslationOptionCollectionText.h */, - 1ED0FE0D124BB9380029177F /* TranslationOptionList.cpp */, - 1ED0FE0E124BB9380029177F /* TranslationOptionList.h */, - 1ED0FE0F124BB9380029177F /* TranslationSystem.cpp */, - 1ED0FE10124BB9380029177F /* TranslationSystem.h */, - 1ED0FE11124BB9380029177F /* TreeInput.cpp */, - 1ED0FE12124BB9380029177F /* TreeInput.h */, - 1ED0FE13124BB9380029177F /* TrellisPath.cpp */, - 1ED0FE14124BB9380029177F /* TrellisPath.h */, - 1ED0FE15124BB9380029177F /* TrellisPathCollection.cpp */, - 1ED0FE16124BB9380029177F /* TrellisPathCollection.h */, - 1ED0FE17124BB9380029177F /* TrellisPathList.h */, - 1ED0FE18124BB9380029177F /* TypeDef.h */, - 1ED0FE19124BB9380029177F /* UniqueObject.h */, - 1ED0FE1A124BB9380029177F /* UserMessage.cpp */, - 1ED0FE1B124BB9380029177F /* UserMessage.h */, - 1ED0FE1C124BB9380029177F /* Util.cpp */, - 1ED0FE1D124BB9380029177F /* Util.h */, - 1ED0FE1E124BB9380029177F /* Word.cpp */, - 1ED0FE1F124BB9380029177F /* Word.h */, - 1ED0FE22124BB9380029177F /* WordLattice.cpp */, - 1ED0FE23124BB9380029177F /* WordLattice.h */, - 1ED0FE24124BB9380029177F /* WordsBitmap.cpp */, - 1ED0FE25124BB9380029177F /* WordsBitmap.h */, - 1ED0FE26124BB9380029177F /* WordsRange.cpp */, - 1ED0FE27124BB9380029177F /* WordsRange.h */, - 1ED0FE28124BB9380029177F /* XmlOption.cpp */, - 1ED0FE29124BB9380029177F /* XmlOption.h */, - 1ED0FD88124BB9380029177F /* gzfilebuf.h */, - 1ED0FD89124BB9380029177F /* hash.cpp */, - 1EBB262213A12DB500B51840 /* hash.h */, - 1ED0FD8A124BB9380029177F /* hash.h */, - 1ED0FD8B124BB9380029177F /* hypergraph.proto */, - 1EBB262313A12DB500B51840 /* onlineRLM.h */, - 1E528B9B13A12B2D00E9A67E /* params.cpp */, - 1EBB262413A12DB500B51840 /* params.h */, - 1EBB262513A12DB500B51840 /* perfectHash.h */, - 1EBB262613A12DB500B51840 /* quantizer.h */, - 1ED0FDEA124BB9380029177F /* rule.proto */, - ); - name = Source; - sourceTree = "<group>"; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - D2AAC046055464E500DB518D /* libmoses.a */, - ); - name = Products; - sourceTree = "<group>"; - }; - 1E16D086144DAA3F00B60B4F /* LM */ = { - isa = PBXGroup; - children = ( - 1E16D087144DAA6C00B60B4F /* Base.cpp */, - 1E16D088144DAA6C00B60B4F /* Base.h */, - 1E16D08B144DAA6C00B60B4F /* Factory.cpp */, - 1E16D08C144DAA6C00B60B4F /* Factory.h */, - 1E16D08D144DAA6C00B60B4F /* Implementation.cpp */, - 1E16D08E144DAA6C00B60B4F /* Implementation.h */, - 1E16D08F144DAA6C00B60B4F /* IRST.cpp */, - 1E16D090144DAA6C00B60B4F /* IRST.h */, - 1E16D091144DAA6C00B60B4F /* Joint.cpp */, - 1E16D092144DAA6C00B60B4F /* Joint.h */, - 1E16D093144DAA6C00B60B4F /* Ken.cpp */, - 1E16D094144DAA6C00B60B4F /* Ken.h */, - 1E16D095144DAA6C00B60B4F /* MultiFactor.cpp */, - 1E16D096144DAA6C00B60B4F /* MultiFactor.h */, - 1E16D099144DAA6C00B60B4F /* ParallelBackoff.cpp */, - 1E16D09A144DAA6C00B60B4F /* ParallelBackoff.h */, - 1E16D09F144DAA6C00B60B4F /* SingleFactor.cpp */, - 1E16D0A0144DAA6C00B60B4F /* SingleFactor.h */, - 1E16D0A1144DAA6C00B60B4F /* SRI.cpp */, - 1E16D0A2144DAA6C00B60B4F /* SRI.h */, - ); - name = LM; - sourceTree = "<group>"; - }; - 1ED0FD6B124BB9380029177F /* DynSAInclude */ = { - isa = PBXGroup; - children = ( - 1ED0FD6C124BB9380029177F /* fdstream.h */, - 1ED0FD6D124BB9380029177F /* file.cpp */, - 1ED0FD6E124BB9380029177F /* file.h */, - 1ED0FD6F124BB9380029177F /* types.h */, - 1ED0FD70124BB9380029177F /* utils.h */, - 1ED0FD71124BB9380029177F /* vocab.cpp */, - 1ED0FD72124BB9380029177F /* vocab.h */, - ); - name = DynSAInclude; - path = src/DynSAInclude; - sourceTree = "<group>"; - }; - C6A0FF2B0290797F04C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - D2AAC043055464E500DB518D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ED0FE2B124BB9380029177F /* AlignmentInfo.h in Headers */, - 1ED0FE2D124BB9380029177F /* BilingualDynSuffixArray.h in Headers */, - 1ED0FE2F124BB9380029177F /* BitmapContainer.h in Headers */, - 1ED0FE30124BB9380029177F /* CellCollection.h in Headers */, - 1ED0FE36124BB9380029177F /* ConfusionNet.h in Headers */, - 1ED0FE38124BB9380029177F /* DecodeFeature.h in Headers */, - 1ED0FE3A124BB9380029177F /* DecodeGraph.h in Headers */, - 1ED0FE3C124BB9380029177F /* DecodeStep.h in Headers */, - 1ED0FE3E124BB9380029177F /* DecodeStepGeneration.h in Headers */, - 1ED0FE40124BB9380029177F /* DecodeStepTranslation.h in Headers */, - 1ED0FE42124BB9380029177F /* Dictionary.h in Headers */, - 1ED0FE44124BB9380029177F /* DotChart.h in Headers */, - 1ED0FE46124BB9380029177F /* DotChartOnDisk.h in Headers */, - 1ED0FE48124BB9380029177F /* DummyScoreProducers.h in Headers */, - 1ED0FE49124BB9380029177F /* fdstream.h in Headers */, - 1ED0FE4B124BB9380029177F /* file.h in Headers */, - 1ED0FE4C124BB9380029177F /* types.h in Headers */, - 1ED0FE4D124BB9380029177F /* utils.h in Headers */, - 1ED0FE4F124BB9380029177F /* vocab.h in Headers */, - 1ED0FE51124BB9380029177F /* DynSuffixArray.h in Headers */, - 1ED0FE53124BB9380029177F /* Factor.h in Headers */, - 1ED0FE55124BB9380029177F /* FactorCollection.h in Headers */, - 1ED0FE57124BB9380029177F /* FactorTypeSet.h in Headers */, - 1ED0FE59124BB9380029177F /* FeatureFunction.h in Headers */, - 1ED0FE5B124BB9380029177F /* FFState.h in Headers */, - 1ED0FE5D124BB9380029177F /* File.h in Headers */, - 1ED0FE5E124BB9380029177F /* FilePtr.h in Headers */, - 1ED0FE60124BB9380029177F /* FloydWarshall.h in Headers */, - 1ED0FE62124BB9380029177F /* GenerationDictionary.h in Headers */, - 1ED0FE64124BB9380029177F /* GlobalLexicalModel.h in Headers */, - 1ED0FE65124BB9380029177F /* gzfilebuf.h in Headers */, - 1ED0FE67124BB9380029177F /* hash.h in Headers */, - 1ED0FE69124BB9380029177F /* Hypothesis.h in Headers */, - 1ED0FE6B124BB9380029177F /* HypothesisStack.h in Headers */, - 1ED0FE6D124BB9380029177F /* HypothesisStackCubePruning.h in Headers */, - 1ED0FE6F124BB9380029177F /* HypothesisStackNormal.h in Headers */, - 1ED0FE71124BB9380029177F /* InputFileStream.h in Headers */, - 1ED0FE73124BB9380029177F /* InputType.h in Headers */, - 1ED0FE90124BB9380029177F /* LexicalReordering.h in Headers */, - 1ED0FE92124BB9380029177F /* LexicalReorderingState.h in Headers */, - 1ED0FE94124BB9380029177F /* LexicalReorderingTable.h in Headers */, - 1ED0FE96124BB9380029177F /* LMList.h in Headers */, - 1ED0FE98124BB9380029177F /* LVoc.h in Headers */, - 1ED0FE9B124BB9380029177F /* Manager.h in Headers */, - 1ED0FEA0124BB9380029177F /* ObjectPool.h in Headers */, - 1ED0FEA2124BB9380029177F /* Parameter.h in Headers */, - 1ED0FEA4124BB9380029177F /* PartialTranslOptColl.h in Headers */, - 1ED0FEA6124BB9380029177F /* PCNTools.h in Headers */, - 1ED0FEA7124BB9380029177F /* PDTAimp.h in Headers */, - 1ED0FEA9124BB9380029177F /* Phrase.h in Headers */, - 1ED0FEAB124BB9380029177F /* PhraseDictionary.h in Headers */, - 1ED0FEAD124BB9380029177F /* PhraseDictionaryDynSuffixArray.h in Headers */, - 1ED0FEAF124BB9380029177F /* PhraseDictionaryMemory.h in Headers */, - 1ED0FEB1124BB9380029177F /* PhraseDictionaryNode.h in Headers */, - 1ED0FEB3124BB9380029177F /* PhraseDictionaryNodeSCFG.h in Headers */, - 1ED0FEB5124BB9380029177F /* PhraseDictionaryOnDisk.h in Headers */, - 1ED0FEBA124BB9380029177F /* PhraseDictionaryTree.h in Headers */, - 1ED0FEBC124BB9380029177F /* PhraseDictionaryTreeAdaptor.h in Headers */, - 1ED0FEBD124BB9380029177F /* PrefixTree.h in Headers */, - 1ED0FEBF124BB9380029177F /* PrefixTreeMap.h in Headers */, - 1ED0FEC1124BB9380029177F /* ReorderingConstraint.h in Headers */, - 1ED0FEC3124BB9380029177F /* ReorderingStack.h in Headers */, - 1ED0FEC5124BB9380029177F /* ScoreComponentCollection.h in Headers */, - 1ED0FEC7124BB9380029177F /* ScoreIndexManager.h in Headers */, - 1ED0FEC9124BB9380029177F /* ScoreProducer.h in Headers */, - 1ED0FECB124BB9380029177F /* Search.h in Headers */, - 1ED0FECD124BB9380029177F /* SearchCubePruning.h in Headers */, - 1ED0FECF124BB9380029177F /* SearchNormal.h in Headers */, - 1ED0FED1124BB9380029177F /* Sentence.h in Headers */, - 1ED0FED3124BB9380029177F /* SentenceStats.h in Headers */, - 1ED0FED5124BB9380029177F /* SquareMatrix.h in Headers */, - 1ED0FED7124BB9380029177F /* StaticData.h in Headers */, - 1ED0FED9124BB9380029177F /* TargetPhrase.h in Headers */, - 1ED0FEDB124BB9380029177F /* TargetPhraseCollection.h in Headers */, - 1ED0FEDD124BB9380029177F /* Timer.h in Headers */, - 1ED0FEDF124BB9380029177F /* TranslationOption.h in Headers */, - 1ED0FEE1124BB9380029177F /* TranslationOptionCollection.h in Headers */, - 1ED0FEE3124BB9380029177F /* TranslationOptionCollectionConfusionNet.h in Headers */, - 1ED0FEE5124BB9380029177F /* TranslationOptionCollectionText.h in Headers */, - 1ED0FEE7124BB9380029177F /* TranslationOptionList.h in Headers */, - 1ED0FEE9124BB9380029177F /* TranslationSystem.h in Headers */, - 1ED0FEEB124BB9380029177F /* TreeInput.h in Headers */, - 1ED0FEED124BB9380029177F /* TrellisPath.h in Headers */, - 1ED0FEEF124BB9380029177F /* TrellisPathCollection.h in Headers */, - 1ED0FEF0124BB9380029177F /* TrellisPathList.h in Headers */, - 1ED0FEF1124BB9380029177F /* TypeDef.h in Headers */, - 1ED0FEF2124BB9380029177F /* UniqueObject.h in Headers */, - 1ED0FEF4124BB9380029177F /* UserMessage.h in Headers */, - 1ED0FEF6124BB9380029177F /* Util.h in Headers */, - 1ED0FEF8124BB9380029177F /* Word.h in Headers */, - 1ED0FEFC124BB9380029177F /* WordLattice.h in Headers */, - 1ED0FEFE124BB9380029177F /* WordsBitmap.h in Headers */, - 1ED0FF00124BB9380029177F /* WordsRange.h in Headers */, - 1ED0FF02124BB9380029177F /* XmlOption.h in Headers */, - 1ED0FFD4124BC0BF0029177F /* ChartTranslationOptionList.h in Headers */, - 1ED00037124BC2690029177F /* ChartTranslationOption.h in Headers */, - 1EEB43EE1264A6F200739BA5 /* PhraseDictionarySCFG.h in Headers */, - 1E1C589612F310A70067DEB7 /* ChartRuleLookupManagerMemory.h in Headers */, - 1E1C589812F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.h in Headers */, - 1E2E161B132A890D00ED4085 /* ChartCell.h in Headers */, - 1E2E161D132A890D00ED4085 /* ChartCellCollection.h in Headers */, - 1E2E161F132A890D00ED4085 /* ChartHypothesis.h in Headers */, - 1E2E1621132A890D00ED4085 /* ChartHypothesisCollection.h in Headers */, - 1E2E1623132A890D00ED4085 /* ChartManager.h in Headers */, - 1E2E1625132A890D00ED4085 /* ChartTranslationOptionCollection.h in Headers */, - 1E2E1627132A890D00ED4085 /* ChartTrellisNode.h in Headers */, - 1E2E1629132A890D00ED4085 /* ChartTrellisPath.h in Headers */, - 1E2E162D132A890D00ED4085 /* ChartTrellisPathList.h in Headers */, - 1E2E1639132A892800ED4085 /* OutputCollector.h in Headers */, - 1E2E163B132A892800ED4085 /* RuleCube.h in Headers */, - 1E2E163D132A892800ED4085 /* RuleCubeQueue.h in Headers */, - 1E2E163F132A892800ED4085 /* ThreadPool.h in Headers */, - 1EE58DA0133726C700D93158 /* NonTerminal.h in Headers */, - 1EBB262913A12DB500B51840 /* hash.h in Headers */, - 1EBB262A13A12DB500B51840 /* onlineRLM.h in Headers */, - 1EBB262B13A12DB500B51840 /* params.h in Headers */, - 1EBB262C13A12DB500B51840 /* perfectHash.h in Headers */, - 1EBB262D13A12DB500B51840 /* quantizer.h in Headers */, - 1EBB262E13A12DB500B51840 /* RandLMCache.h in Headers */, - 1EBB262F13A12DB500B51840 /* RandLMFilter.h in Headers */, - 1E07292013B3854D004454FD /* AlignmentInfoCollection.h in Headers */, - 1E46B5A713BA5C7F0084F898 /* RuleCubeItem.h in Headers */, - 1EA6AB4B13BCC838004465AF /* ChartRuleLookupManager.h in Headers */, - 1ED22EE613DD96B0000DE8C9 /* DotChartInMemory.h in Headers */, - 1ED0DE2A1432A0D200C20FBE /* RuleTableLoaderCompact.h in Headers */, - 1ED0DE2D1432A0D200C20FBE /* RuleTableLoaderFactory.h in Headers */, - 1ED0DE301432A0D200C20FBE /* RuleTableLoaderStandard.h in Headers */, - 1E16D0A4144DAA6C00B60B4F /* Base.h in Headers */, - 1E16D0A8144DAA6C00B60B4F /* Factory.h in Headers */, - 1E16D0AA144DAA6C00B60B4F /* Implementation.h in Headers */, - 1E16D0AC144DAA6C00B60B4F /* IRST.h in Headers */, - 1E16D0AE144DAA6C00B60B4F /* Joint.h in Headers */, - 1E16D0B0144DAA6C00B60B4F /* Ken.h in Headers */, - 1E16D0B2144DAA6C00B60B4F /* MultiFactor.h in Headers */, - 1E16D0B6144DAA6C00B60B4F /* ParallelBackoff.h in Headers */, - 1E16D0BC144DAA6C00B60B4F /* SingleFactor.h in Headers */, - 1E16D0BE144DAA6C00B60B4F /* SRI.h in Headers */, - 1E474E12145575CA00178AD5 /* RuleTableLoader.h in Headers */, - 1E078C1C14643AED00A707F4 /* PhraseDictionaryHiero.h in Headers */, - 1E078C21146440A900A707F4 /* RuleTableLoaderHiero.h in Headers */, - 1E2755B614667CC3009D1DF9 /* PhraseDictionaryALSuffixArray.h in Headers */, - 1ECA43AF146D585900209CEF /* ChartCellLabelSet.h in Headers */, - 1ECA43B4146D586D00209CEF /* ChartTrellisDetour.h in Headers */, - 1ECA43B6146D586D00209CEF /* ChartTrellisDetourQueue.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - D2AAC045055464E500DB518D /* moses */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "moses" */; - buildPhases = ( - D2AAC043055464E500DB518D /* Headers */, - D2AAC044055464E500DB518D /* Sources */, - D289987405E68DCB004EDB86 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = moses; - productName = moses; - productReference = D2AAC046055464E500DB518D /* libmoses.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0410; - }; - buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "moses" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* moses */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D2AAC045055464E500DB518D /* moses */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - D2AAC044055464E500DB518D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ED0FE2A124BB9380029177F /* AlignmentInfo.cpp in Sources */, - 1ED0FE2C124BB9380029177F /* BilingualDynSuffixArray.cpp in Sources */, - 1ED0FE2E124BB9380029177F /* BitmapContainer.cpp in Sources */, - 1ED0FE35124BB9380029177F /* ConfusionNet.cpp in Sources */, - 1ED0FE37124BB9380029177F /* DecodeFeature.cpp in Sources */, - 1ED0FE39124BB9380029177F /* DecodeGraph.cpp in Sources */, - 1ED0FE3B124BB9380029177F /* DecodeStep.cpp in Sources */, - 1ED0FE3D124BB9380029177F /* DecodeStepGeneration.cpp in Sources */, - 1ED0FE3F124BB9380029177F /* DecodeStepTranslation.cpp in Sources */, - 1ED0FE41124BB9380029177F /* Dictionary.cpp in Sources */, - 1ED0FE43124BB9380029177F /* DotChart.cpp in Sources */, - 1ED0FE45124BB9380029177F /* DotChartOnDisk.cpp in Sources */, - 1ED0FE47124BB9380029177F /* DummyScoreProducers.cpp in Sources */, - 1ED0FE4A124BB9380029177F /* file.cpp in Sources */, - 1ED0FE4E124BB9380029177F /* vocab.cpp in Sources */, - 1ED0FE50124BB9380029177F /* DynSuffixArray.cpp in Sources */, - 1ED0FE52124BB9380029177F /* Factor.cpp in Sources */, - 1ED0FE54124BB9380029177F /* FactorCollection.cpp in Sources */, - 1ED0FE56124BB9380029177F /* FactorTypeSet.cpp in Sources */, - 1ED0FE58124BB9380029177F /* FeatureFunction.cpp in Sources */, - 1ED0FE5A124BB9380029177F /* FFState.cpp in Sources */, - 1ED0FE5C124BB9380029177F /* File.cpp in Sources */, - 1ED0FE5F124BB9380029177F /* FloydWarshall.cpp in Sources */, - 1ED0FE61124BB9380029177F /* GenerationDictionary.cpp in Sources */, - 1ED0FE63124BB9380029177F /* GlobalLexicalModel.cpp in Sources */, - 1ED0FE66124BB9380029177F /* hash.cpp in Sources */, - 1ED0FE68124BB9380029177F /* Hypothesis.cpp in Sources */, - 1ED0FE6A124BB9380029177F /* HypothesisStack.cpp in Sources */, - 1ED0FE6C124BB9380029177F /* HypothesisStackCubePruning.cpp in Sources */, - 1ED0FE6E124BB9380029177F /* HypothesisStackNormal.cpp in Sources */, - 1ED0FE70124BB9380029177F /* InputFileStream.cpp in Sources */, - 1ED0FE72124BB9380029177F /* InputType.cpp in Sources */, - 1ED0FE8F124BB9380029177F /* LexicalReordering.cpp in Sources */, - 1ED0FE91124BB9380029177F /* LexicalReorderingState.cpp in Sources */, - 1ED0FE93124BB9380029177F /* LexicalReorderingTable.cpp in Sources */, - 1ED0FE95124BB9380029177F /* LMList.cpp in Sources */, - 1ED0FE97124BB9380029177F /* LVoc.cpp in Sources */, - 1ED0FE9A124BB9380029177F /* Manager.cpp in Sources */, - 1ED0FEA1124BB9380029177F /* Parameter.cpp in Sources */, - 1ED0FEA3124BB9380029177F /* PartialTranslOptColl.cpp in Sources */, - 1ED0FEA5124BB9380029177F /* PCNTools.cpp in Sources */, - 1ED0FEA8124BB9380029177F /* Phrase.cpp in Sources */, - 1ED0FEAA124BB9380029177F /* PhraseDictionary.cpp in Sources */, - 1ED0FEAC124BB9380029177F /* PhraseDictionaryDynSuffixArray.cpp in Sources */, - 1ED0FEAE124BB9380029177F /* PhraseDictionaryMemory.cpp in Sources */, - 1ED0FEB0124BB9380029177F /* PhraseDictionaryNode.cpp in Sources */, - 1ED0FEB2124BB9380029177F /* PhraseDictionaryNodeSCFG.cpp in Sources */, - 1ED0FEB4124BB9380029177F /* PhraseDictionaryOnDisk.cpp in Sources */, - 1ED0FEB7124BB9380029177F /* PhraseDictionarySCFG.cpp in Sources */, - 1ED0FEB9124BB9380029177F /* PhraseDictionaryTree.cpp in Sources */, - 1ED0FEBB124BB9380029177F /* PhraseDictionaryTreeAdaptor.cpp in Sources */, - 1ED0FEBE124BB9380029177F /* PrefixTreeMap.cpp in Sources */, - 1ED0FEC0124BB9380029177F /* ReorderingConstraint.cpp in Sources */, - 1ED0FEC2124BB9380029177F /* ReorderingStack.cpp in Sources */, - 1ED0FEC4124BB9380029177F /* ScoreComponentCollection.cpp in Sources */, - 1ED0FEC6124BB9380029177F /* ScoreIndexManager.cpp in Sources */, - 1ED0FEC8124BB9380029177F /* ScoreProducer.cpp in Sources */, - 1ED0FECA124BB9380029177F /* Search.cpp in Sources */, - 1ED0FECC124BB9380029177F /* SearchCubePruning.cpp in Sources */, - 1ED0FECE124BB9380029177F /* SearchNormal.cpp in Sources */, - 1ED0FED0124BB9380029177F /* Sentence.cpp in Sources */, - 1ED0FED2124BB9380029177F /* SentenceStats.cpp in Sources */, - 1ED0FED4124BB9380029177F /* SquareMatrix.cpp in Sources */, - 1ED0FED6124BB9380029177F /* StaticData.cpp in Sources */, - 1ED0FED8124BB9380029177F /* TargetPhrase.cpp in Sources */, - 1ED0FEDA124BB9380029177F /* TargetPhraseCollection.cpp in Sources */, - 1ED0FEDC124BB9380029177F /* Timer.cpp in Sources */, - 1ED0FEDE124BB9380029177F /* TranslationOption.cpp in Sources */, - 1ED0FEE0124BB9380029177F /* TranslationOptionCollection.cpp in Sources */, - 1ED0FEE2124BB9380029177F /* TranslationOptionCollectionConfusionNet.cpp in Sources */, - 1ED0FEE4124BB9380029177F /* TranslationOptionCollectionText.cpp in Sources */, - 1ED0FEE6124BB9380029177F /* TranslationOptionList.cpp in Sources */, - 1ED0FEE8124BB9380029177F /* TranslationSystem.cpp in Sources */, - 1ED0FEEA124BB9380029177F /* TreeInput.cpp in Sources */, - 1ED0FEEC124BB9380029177F /* TrellisPath.cpp in Sources */, - 1ED0FEEE124BB9380029177F /* TrellisPathCollection.cpp in Sources */, - 1ED0FEF3124BB9380029177F /* UserMessage.cpp in Sources */, - 1ED0FEF5124BB9380029177F /* Util.cpp in Sources */, - 1ED0FEF7124BB9380029177F /* Word.cpp in Sources */, - 1ED0FEFB124BB9380029177F /* WordLattice.cpp in Sources */, - 1ED0FEFD124BB9380029177F /* WordsBitmap.cpp in Sources */, - 1ED0FEFF124BB9380029177F /* WordsRange.cpp in Sources */, - 1ED0FF01124BB9380029177F /* XmlOption.cpp in Sources */, - 1ED0FFD3124BC0BF0029177F /* ChartTranslationOptionList.cpp in Sources */, - 1ED00036124BC2690029177F /* ChartTranslationOption.cpp in Sources */, - 1E1C589512F310A70067DEB7 /* ChartRuleLookupManagerMemory.cpp in Sources */, - 1E1C589712F310A70067DEB7 /* ChartRuleLookupManagerOnDisk.cpp in Sources */, - 1E2E161A132A890D00ED4085 /* ChartCell.cpp in Sources */, - 1E2E161C132A890D00ED4085 /* ChartCellCollection.cpp in Sources */, - 1E2E161E132A890D00ED4085 /* ChartHypothesis.cpp in Sources */, - 1E2E1620132A890D00ED4085 /* ChartHypothesisCollection.cpp in Sources */, - 1E2E1622132A890D00ED4085 /* ChartManager.cpp in Sources */, - 1E2E1624132A890D00ED4085 /* ChartTranslationOptionCollection.cpp in Sources */, - 1E2E1626132A890D00ED4085 /* ChartTrellisNode.cpp in Sources */, - 1E2E1628132A890D00ED4085 /* ChartTrellisPath.cpp in Sources */, - 1E2E163A132A892800ED4085 /* RuleCube.cpp in Sources */, - 1E2E163C132A892800ED4085 /* RuleCubeQueue.cpp in Sources */, - 1E2E163E132A892800ED4085 /* ThreadPool.cpp in Sources */, - 1EE58D9F133726C700D93158 /* NonTerminal.cpp in Sources */, - 1E528B9D13A12B2D00E9A67E /* params.cpp in Sources */, - 1E528B9E13A12B2D00E9A67E /* SyntacticLanguageModel.cpp in Sources */, - 1E07291F13B3854D004454FD /* AlignmentInfoCollection.cpp in Sources */, - 1E46B5A613BA5C7F0084F898 /* RuleCubeItem.cpp in Sources */, - 1EA6AB4A13BCC838004465AF /* ChartRuleLookupManager.cpp in Sources */, - 1ED22EE513DD96B0000DE8C9 /* DotChartInMemory.cpp in Sources */, - 1ED0DE291432A0D200C20FBE /* RuleTableLoaderCompact.cpp in Sources */, - 1ED0DE2C1432A0D200C20FBE /* RuleTableLoaderFactory.cpp in Sources */, - 1ED0DE2F1432A0D200C20FBE /* RuleTableLoaderStandard.cpp in Sources */, - 1E16D0A3144DAA6C00B60B4F /* Base.cpp in Sources */, - 1E16D0A7144DAA6C00B60B4F /* Factory.cpp in Sources */, - 1E16D0A9144DAA6C00B60B4F /* Implementation.cpp in Sources */, - 1E16D0AB144DAA6C00B60B4F /* IRST.cpp in Sources */, - 1E16D0AD144DAA6C00B60B4F /* Joint.cpp in Sources */, - 1E16D0AF144DAA6C00B60B4F /* Ken.cpp in Sources */, - 1E16D0B1144DAA6C00B60B4F /* MultiFactor.cpp in Sources */, - 1E16D0B5144DAA6C00B60B4F /* ParallelBackoff.cpp in Sources */, - 1E16D0BB144DAA6C00B60B4F /* SingleFactor.cpp in Sources */, - 1E16D0BD144DAA6C00B60B4F /* SRI.cpp in Sources */, - 1E078C1F14643C2000A707F4 /* PhraseDictionaryHiero.cpp in Sources */, - 1E078C23146440F700A707F4 /* RuleTableLoaderHiero.cpp in Sources */, - 1E2755B314667CA4009D1DF9 /* PhraseDictionaryALSuffixArray.cpp in Sources */, - 1ECA43B0146D585900209CEF /* ChartTrellisDetour.cpp in Sources */, - 1ECA43B5146D586D00209CEF /* ChartTrellisDetourQueue.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1DEB91EC08733DB70010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - "_FILE_OFFSET_BITS=64", - _LARGE_FILES, - ); - HEADER_SEARCH_PATHS = ( - src, - ../irstlm/include, - ../srilm/include, - ../kenlm, - ../randlm/include, - ../, - /opt/local/include, - ../synlm/hhmm/wsjparse/include, - ../synlm/hhmm/rvtl/include/, - ); - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = moses; - }; - name = Debug; - }; - 1DEB91ED08733DB70010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - "_FILE_OFFSET_BITS=64", - _LARGE_FILES, - ); - HEADER_SEARCH_PATHS = ( - src, - ../irstlm/include, - ../srilm/include, - ../kenlm, - ../randlm/include, - ../, - /opt/local/include, - ../synlm/hhmm/wsjparse/include, - ../synlm/hhmm/rvtl/include/, - ); - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = moses; - }; - name = Release; - }; - 1DEB91F008733DB70010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - LM_RAND, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../irstlm/include, - ../srilm/include, - ../kenlm, - ../randlm/include, - /opt/local/include, - ); - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1DEB91F108733DB70010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - LM_RAND, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../irstlm/include, - ../srilm/include, - ../kenlm, - ../randlm/include, - /opt/local/include, - ); - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "moses" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91EC08733DB70010E9CD /* Debug */, - 1DEB91ED08733DB70010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "moses" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91F008733DB70010E9CD /* Debug */, - 1DEB91F108733DB70010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/moses/src/AlignmentInfo.cpp b/moses/src/AlignmentInfo.cpp index c3b10a2d5..3af17870e 100644 --- a/moses/src/AlignmentInfo.cpp +++ b/moses/src/AlignmentInfo.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ #include <algorithm> -#include <cassert> +#include "util/check.hh" #include "AlignmentInfo.h" #include "TypeDef.h" #include "StaticData.h" @@ -76,7 +76,7 @@ std::vector< const std::pair<size_t,size_t>* > AlignmentInfo::GetSortedAlignment break; default: - assert(false); + CHECK(false); } return ret; diff --git a/moses/src/BilingualDynSuffixArray.cpp b/moses/src/BilingualDynSuffixArray.cpp index b1be289a9..4ae3ab932 100644 --- a/moses/src/BilingualDynSuffixArray.cpp +++ b/moses/src/BilingualDynSuffixArray.cpp @@ -46,10 +46,10 @@ bool BilingualDynSuffixArray::Load( InputFileStream sourceStrme(source); InputFileStream targetStrme(target); cerr << "Loading source corpus...\n"; - LoadCorpus(sourceStrme, m_inputFactors, Input, *m_srcCorpus, m_srcSntBreaks, m_srcVocab); + LoadCorpus(sourceStrme, m_inputFactors, *m_srcCorpus, m_srcSntBreaks, m_srcVocab); cerr << "Loading target corpus...\n"; - LoadCorpus(targetStrme, m_outputFactors, Output, *m_trgCorpus, m_trgSntBreaks, m_trgVocab); - assert(m_srcSntBreaks.size() == m_trgSntBreaks.size()); + LoadCorpus(targetStrme, m_outputFactors,*m_trgCorpus, m_trgSntBreaks, m_trgVocab); + CHECK(m_srcSntBreaks.size() == m_trgSntBreaks.size()); // build suffix arrays and auxilliary arrays cerr << "Building Source Suffix Array...\n"; @@ -76,7 +76,7 @@ int BilingualDynSuffixArray::LoadRawAlignments(InputFileStream& align) std::vector<int> vtmp; while(getline(align, line)) { Utils::splitToInt(line, vtmp, "- "); - assert(vtmp.size() % 2 == 0); + CHECK(vtmp.size() % 2 == 0); std::vector<short> vAlgn; // store as short ints for memory for (std::vector<int>::const_iterator itr = vtmp.begin(); itr != vtmp.end(); ++itr) { @@ -90,7 +90,7 @@ int BilingualDynSuffixArray::LoadRawAlignments(string& align) { // stores the alignments in the raw file format vector<int> vtmp; Utils::splitToInt(align, vtmp, "- "); - assert(vtmp.size() % 2 == 0); + CHECK(vtmp.size() % 2 == 0); vector<short> vAlgn; // store as short ints for memory for (std::vector<int>::const_iterator itr = vtmp.begin(); itr != vtmp.end(); ++itr) { @@ -108,7 +108,7 @@ int BilingualDynSuffixArray::LoadAlignments(InputFileStream& align) while(getline(align, line)) { Utils::splitToInt(line, vtmp, "- "); - assert(vtmp.size() % 2 == 0); + CHECK(vtmp.size() % 2 == 0); int sourceSize = GetSourceSentenceSize(sntIndex); int targetSize = GetTargetSentenceSize(sntIndex); @@ -117,8 +117,8 @@ int BilingualDynSuffixArray::LoadAlignments(InputFileStream& align) for(int i=0; i < (int)vtmp.size(); i+=2) { int sourcePos = vtmp[i]; int targetPos = vtmp[i+1]; - assert(sourcePos < sourceSize); - assert(targetPos < targetSize); + CHECK(sourcePos < sourceSize); + CHECK(targetPos < targetSize); curSnt.alignedList[sourcePos].push_back(targetPos); // list of target nodes for each source word curSnt.numberAligned[targetPos]++; // cnt of how many source words connect to this target word @@ -176,7 +176,7 @@ void BilingualDynSuffixArray::CleanUp() } int BilingualDynSuffixArray::LoadCorpus(InputFileStream& corpus, const FactorList& factors, - const FactorDirection& direction, std::vector<wordID_t>& cArray, std::vector<wordID_t>& sntArray, + std::vector<wordID_t>& cArray, std::vector<wordID_t>& sntArray, Vocab* vocab) { std::string line, word; @@ -185,7 +185,7 @@ int BilingualDynSuffixArray::LoadCorpus(InputFileStream& corpus, const FactorLis const std::string& factorDelimiter = StaticData::Instance().GetFactorDelimiter(); while(getline(corpus, line)) { sntArray.push_back(sntIdx); - Phrase phrase(direction, ARRAY_SIZE_INCR); + Phrase phrase(ARRAY_SIZE_INCR); // parse phrase phrase.CreateFromString( factors, line, factorDelimiter); // store words in vocabulary and corpus @@ -240,7 +240,7 @@ pair<float, float> BilingualDynSuffixArray::GetLexicalWeight(const PhrasePair& p CacheWordProbs(srcWord); itrCache = m_wordPairCache.find(wordpair); // search cache again } - assert(itrCache != m_wordPairCache.end()); + CHECK(itrCache != m_wordPairCache.end()); srcSumPairProbs += itrCache->second.first; targetProbs[wordpair] = itrCache->second.second; } @@ -255,7 +255,7 @@ pair<float, float> BilingualDynSuffixArray::GetLexicalWeight(const PhrasePair& p CacheWordProbs(srcWord); itrCache = m_wordPairCache.find(wordpair); // search cache again } - assert(itrCache != m_wordPairCache.end()); + CHECK(itrCache != m_wordPairCache.end()); srcSumPairProbs += itrCache->second.first; targetProbs[wordpair] = itrCache->second.second; } @@ -306,13 +306,13 @@ void BilingualDynSuffixArray::CacheWordProbs(wordID_t srcWord) const std::map<wordID_t, int> counts; std::vector<wordID_t> sword(1, srcWord), wrdIndices; bool ret = m_srcSA->GetCorpusIndex(&sword, &wrdIndices); - assert(ret); + CHECK(ret); std::vector<int> sntIndexes = GetSntIndexes(wrdIndices, 1, m_srcSntBreaks); float denom(0); // for each occurrence of this word for(size_t snt = 0; snt < sntIndexes.size(); ++snt) { int sntIdx = sntIndexes.at(snt); // get corpus index for sentence - assert(sntIdx != -1); + CHECK(sntIdx != -1); int srcWrdSntIdx = wrdIndices.at(snt) - m_srcSntBreaks.at(sntIdx); // get word index in sentence const std::vector<int> srcAlg = GetSentenceAlignment(sntIdx).alignedList.at(srcWrdSntIdx); // list of target words for this source word if(srcAlg.size() == 0) { @@ -356,7 +356,7 @@ TargetPhrase* BilingualDynSuffixArray::GetMosesFactorIDs(const SAPhrase& phrase) TargetPhrase* targetPhrase = new TargetPhrase(Output); for(size_t i=0; i < phrase.words.size(); ++i) { // look up trg words Word& word = m_trgVocab->GetWord( phrase.words[i]); - assert(word != m_trgVocab->GetkOOVWord()); + CHECK(word != m_trgVocab->GetkOOVWord()); targetPhrase->AddWord(word); } // scoring @@ -409,7 +409,7 @@ void BilingualDynSuffixArray::GetTargetPhrasesByLexicalWeight(const Phrase& src, for(iterPhrases = phraseCounts.begin(); iterPhrases != phraseCounts.end(); ++iterPhrases) { float trg2SrcMLE = float(iterPhrases->second) / totalTrgPhrases; itrLexW = lexicalWeights.find(iterPhrases->first); - assert(itrLexW != lexicalWeights.end()); + CHECK(itrLexW != lexicalWeights.end()); Scores scoreVector(3); scoreVector[0] = trg2SrcMLE; scoreVector[1] = itrLexW->second.first; @@ -458,7 +458,7 @@ void BilingualDynSuffixArray::addSntPair(string& source, string& target, string& const std::string& factorDelimiter = StaticData::Instance().GetFactorDelimiter(); const unsigned oldSrcCrpSize = m_srcCorpus->size(), oldTrgCrpSize = m_trgCorpus->size(); cerr << "old source corpus size = " << oldSrcCrpSize << "\told target size = " << oldTrgCrpSize << endl; - Phrase sphrase(Input, ARRAY_SIZE_INCR); + Phrase sphrase(ARRAY_SIZE_INCR); sphrase.CreateFromString(m_inputFactors, source, factorDelimiter); m_srcVocab->MakeOpen(); wordID_t sIDs[sphrase.GetSize()]; @@ -473,7 +473,7 @@ void BilingualDynSuffixArray::addSntPair(string& source, string& target, string& } m_srcSntBreaks.push_back(oldSrcCrpSize); // former end of corpus is index of new sentence m_srcVocab->MakeClosed(); - Phrase tphrase(Output, ARRAY_SIZE_INCR); + Phrase tphrase(ARRAY_SIZE_INCR); tphrase.CreateFromString(m_outputFactors, target, factorDelimiter); m_trgVocab->MakeOpen(); wordID_t tIDs[tphrase.GetSize()]; diff --git a/moses/src/BilingualDynSuffixArray.h b/moses/src/BilingualDynSuffixArray.h index 6f33911b9..137978c14 100644 --- a/moses/src/BilingualDynSuffixArray.h +++ b/moses/src/BilingualDynSuffixArray.h @@ -22,7 +22,7 @@ public: void SetId(size_t pos, wordID_t id) { - assert(pos < words.size()); + CHECK(pos < words.size()); words[pos] = id; } bool operator<(const SAPhrase& phr2) const @@ -109,7 +109,7 @@ private: const size_t m_maxPhraseLength, m_maxSampleSize; int LoadCorpus(InputFileStream&, const std::vector<FactorType>& factors, - const FactorDirection& direction, std::vector<wordID_t>&, std::vector<wordID_t>&, + std::vector<wordID_t>&, std::vector<wordID_t>&, Vocab*); int LoadAlignments(InputFileStream& aligs); int LoadRawAlignments(InputFileStream& aligs); diff --git a/moses/src/BitmapContainer.cpp b/moses/src/BitmapContainer.cpp index 48a5249cf..c80f3b542 100644 --- a/moses/src/BitmapContainer.cpp +++ b/moses/src/BitmapContainer.cpp @@ -59,7 +59,7 @@ public: const TranslationSystem* m_system; bool operator()(const Hypothesis* hypoA, const Hypothesis* hypoB) const { - assert (m_transOptRange != NULL); + CHECK(m_transOptRange != NULL); const float weightDistortion = m_system->GetWeightDistortion(); const DistortionScoreProducer *dsp = m_system->GetDistortionProducer(); @@ -149,11 +149,11 @@ BackwardsEdge::BackwardsEdge(const BitmapContainer &prevBitmapContainer } if (m_translations.size() > 1) { - assert(m_translations.Get(0)->GetFutureScore() >= m_translations.Get(1)->GetFutureScore()); + CHECK(m_translations.Get(0)->GetFutureScore() >= m_translations.Get(1)->GetFutureScore()); } if (m_hypotheses.size() > 1) { - assert(m_hypotheses[0]->GetTotalScore() >= m_hypotheses[1]->GetTotalScore()); + CHECK(m_hypotheses[0]->GetTotalScore() >= m_hypotheses[1]->GetTotalScore()); } HypothesisScoreOrdererWithDistortion orderer (&transOptRange, system); @@ -202,8 +202,8 @@ BackwardsEdge::SeenPosition(const size_t x, const size_t y) void BackwardsEdge::SetSeenPosition(const size_t x, const size_t y) { - assert(x < (1<<17)); - assert(y < (1<<17)); + CHECK(x < (1<<17)); + CHECK(y < (1<<17)); m_seenPosition.insert((x<<16) + y); } @@ -367,7 +367,7 @@ BitmapContainer::AddHypothesis(Hypothesis *hypothesis) ++iter; } - assert(itemExists == false); + CHECK(itemExists == false); m_hypotheses.push_back(hypothesis); } @@ -410,12 +410,12 @@ BitmapContainer::ProcessBestHypothesis() HypothesisQueueItem *item = Dequeue(); // If the priority queue is exhausted, we are done and should have exited - assert(item != NULL); + CHECK(item != NULL); // check we are pulling things off of priority queue in right order if (!Empty()) { HypothesisQueueItem *check = Dequeue(true); - assert(item->GetHypothesis()->GetTotalScore() >= check->GetHypothesis()->GetTotalScore()); + CHECK(item->GetHypothesis()->GetTotalScore() >= check->GetHypothesis()->GetTotalScore()); } // Logging for the criminally insane diff --git a/moses/src/BleuScoreFeature.cpp b/moses/src/BleuScoreFeature.cpp index dccea638a..15008ebc0 100644 --- a/moses/src/BleuScoreFeature.cpp +++ b/moses/src/BleuScoreFeature.cpp @@ -8,7 +8,7 @@ namespace Moses { size_t BleuScoreState::bleu_order = 4; -BleuScoreState::BleuScoreState(): m_words(Output,1), +BleuScoreState::BleuScoreState(): m_words(1), // m_source_length(0), m_target_length(0), m_scaled_ref_length(0), @@ -111,7 +111,7 @@ void BleuScoreFeature::LoadReferences(const std::vector< std::vector< std::strin (ref_pair.first).push_back(refTokens.size()); for (size_t order = 1; order <= BleuScoreState::bleu_order; order++) { for (size_t end_idx = order; end_idx <= refTokens.size(); end_idx++) { - Phrase ngram(Output,1); + Phrase ngram(1); for (size_t s_idx = end_idx - order; s_idx < end_idx; s_idx++) { const Factor* f = fc.AddFactor(Output, 0, refTokens[s_idx]); Word w; @@ -151,7 +151,7 @@ void BleuScoreFeature::SetCurrentShortestReference(size_t ref_id) { * O_f = m_historySmoothing * (O_f + |f|) input length of pseudo-document */ void BleuScoreFeature::UpdateHistory(const vector< const Word* >& hypo) { - Phrase phrase(Output, hypo); + Phrase phrase(hypo); std::vector< size_t > ngram_counts(BleuScoreState::bleu_order); std::vector< size_t > ngram_matches(BleuScoreState::bleu_order); @@ -176,7 +176,7 @@ void BleuScoreFeature::UpdateHistory(const vector< const Word* >& hypo) { */ void BleuScoreFeature::UpdateHistory(const vector< vector< const Word* > >& hypos, vector<size_t>& sourceLengths, vector<size_t>& ref_ids, size_t rank, size_t epoch) { for (size_t ref_id = 0; ref_id < hypos.size(); ++ref_id){ - Phrase phrase(Output, hypos[ref_id]); + Phrase phrase(hypos[ref_id]); std::vector< size_t > ngram_counts(BleuScoreState::bleu_order); std::vector< size_t > ngram_matches(BleuScoreState::bleu_order); diff --git a/moses/src/BleuScoreFeature.h b/moses/src/BleuScoreFeature.h index f14bc6ee9..7bdf4369a 100644 --- a/moses/src/BleuScoreFeature.h +++ b/moses/src/BleuScoreFeature.h @@ -81,7 +81,8 @@ public: void SetCurrentShortestReference(size_t); void UpdateHistory(const std::vector< const Word* >&); void UpdateHistory(const std::vector< std::vector< const Word* > >& hypos, std::vector<size_t>& sourceLengths, std::vector<size_t>& ref_ids, size_t rank, size_t epoch); -// void PrintReferenceLength(const std::vector<size_t>& ref_ids); + void PrintReferenceLength(const std::vector<size_t>& ref_ids); + size_t GetReferenceLength(size_t ref_id); size_t GetClosestReferenceLength(size_t ref_id, int hypoLength); void SetBleuParameters(bool sentenceBleu, bool scaleByInputLength, bool scaleByAvgInputLength, bool scaleByInverseLength, bool scaleByAvgInverseLength, @@ -107,7 +108,7 @@ public: ScoreComponentCollection* ) const { /* Not implemented */ - assert(0); + CHECK(0); } float CalculateBleu(BleuScoreState*) const; const FFState* EmptyHypothesisState(const InputType&) const; diff --git a/moses/src/ChartCell.cpp b/moses/src/ChartCell.cpp index ac5c47089..21c5dd68a 100644 --- a/moses/src/ChartCell.cpp +++ b/moses/src/ChartCell.cpp @@ -62,7 +62,7 @@ const HypoList &ChartCell::GetSortedHypotheses(const Word &constituentLabel) con { std::map<Word, ChartHypothesisCollection>::const_iterator iter = m_hypoColl.find(constituentLabel); - assert(iter != m_hypoColl.end()); + CHECK(iter != m_hypoColl.end()); return iter->second.GetSortedHypotheses(); } @@ -117,7 +117,7 @@ void ChartCell::ProcessSentence(const ChartTranslationOptionList &transOptList void ChartCell::SortHypotheses() { // sort each mini cells & fill up target lhs list - assert(m_targetLabelSet.Empty()); + CHECK(m_targetLabelSet.Empty()); std::map<Word, ChartHypothesisCollection>::iterator iter; for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) { ChartHypothesisCollection &coll = iter->second; @@ -135,7 +135,7 @@ const ChartHypothesis *ChartCell::GetBestHypothesis() const std::map<Word, ChartHypothesisCollection>::const_iterator iter; for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) { const HypoList &sortedList = iter->second.GetSortedHypotheses(); - assert(sortedList.size() > 0); + CHECK(sortedList.size() > 0); const ChartHypothesis *hypo = sortedList[0]; if (hypo->GetTotalScore() > bestScore) { diff --git a/moses/src/ChartCell.h b/moses/src/ChartCell.h index 4ea148ff1..ab9e5b1ea 100644 --- a/moses/src/ChartCell.h +++ b/moses/src/ChartCell.h @@ -72,7 +72,7 @@ public: const ChartHypothesis *GetBestHypothesis() const; const ChartCellLabel &GetSourceWordLabel() const { - assert(m_coverage.GetNumWordsCovered() == 1); + CHECK(m_coverage.GetNumWordsCovered() == 1); return *m_sourceWordLabel; } diff --git a/moses/src/ChartHypothesis.cpp b/moses/src/ChartHypothesis.cpp index cd3448f43..9c618d73d 100644 --- a/moses/src/ChartHypothesis.cpp +++ b/moses/src/ChartHypothesis.cpp @@ -108,7 +108,7 @@ void ChartHypothesis::CreateOutputPhrase(Phrase &outPhrase) const /** Return full output phrase */ Phrase ChartHypothesis::GetOutputPhrase() const { - Phrase outPhrase(Output, ARRAY_SIZE_INCR); + Phrase outPhrase(ARRAY_SIZE_INCR); CreateOutputPhrase(outPhrase); return outPhrase; } diff --git a/moses/src/ChartHypothesisCollection.cpp b/moses/src/ChartHypothesisCollection.cpp index 531a60b20..48a108aab 100644 --- a/moses/src/ChartHypothesisCollection.cpp +++ b/moses/src/ChartHypothesisCollection.cpp @@ -73,7 +73,7 @@ bool ChartHypothesisCollection::AddHypothesis(ChartHypothesis *hypo, ChartManage // equiv hypo exists, recombine with other hypo HCType::iterator &iterExisting = addRet.first; ChartHypothesis *hypoExisting = *iterExisting; - assert(iterExisting != m_hypos.end()); + CHECK(iterExisting != m_hypos.end()); //StaticData::Instance().GetSentenceStats().AddRecombination(*hypo, **iterExisting); @@ -225,7 +225,7 @@ void ChartHypothesisCollection::PruneToSize(ChartManager &manager) for (iter = hyposOrdered.begin() + (m_maxHypoStackSize * 2); iter != hyposOrdered.end(); ++iter) { ChartHypothesis *hypo = *iter; HCType::iterator iterFindHypo = m_hypos.find(hypo); - assert(iterFindHypo != m_hypos.end()); + CHECK(iterFindHypo != m_hypos.end()); Remove(iterFindHypo); } } @@ -234,7 +234,7 @@ void ChartHypothesisCollection::PruneToSize(ChartManager &manager) void ChartHypothesisCollection::SortHypotheses() { - assert(m_hyposOrdered.empty()); + CHECK(m_hyposOrdered.empty()); if (!m_hypos.empty()) { // done everything for this cell. // sort diff --git a/moses/src/ChartHypothesisCollection.h b/moses/src/ChartHypothesisCollection.h index 059686854..ebf1c6002 100644 --- a/moses/src/ChartHypothesisCollection.h +++ b/moses/src/ChartHypothesisCollection.h @@ -44,10 +44,10 @@ public: // assert in same cell const WordsRange &rangeA = hypoA->GetCurrSourceRange() , &rangeB = hypoB->GetCurrSourceRange(); - assert(rangeA == rangeB); + CHECK(rangeA == rangeB); // shouldn't be mixing hypos with different lhs - assert(hypoA->GetTargetLHS() == hypoB->GetTargetLHS()); + CHECK(hypoA->GetTargetLHS() == hypoB->GetTargetLHS()); int ret = hypoA->RecombineCompare(*hypoB); if (ret != 0) diff --git a/moses/src/ChartManager.cpp b/moses/src/ChartManager.cpp index 7bcaf80af..b2ed3a435 100644 --- a/moses/src/ChartManager.cpp +++ b/moses/src/ChartManager.cpp @@ -198,7 +198,7 @@ void ChartManager::CalcNBest(size_t count, ChartTrellisPathList &ret,bool onlyDi ++i) { // Get the best detour from the queue. std::auto_ptr<const ChartTrellisDetour> detour(contenders.Pop()); - assert(detour.get()); + CHECK(detour.get()); // Create a full base path from the chosen detour. basePath.reset(new ChartTrellisPath(*detour)); @@ -206,7 +206,7 @@ void ChartManager::CalcNBest(size_t count, ChartTrellisPathList &ret,bool onlyDi // Generate new detours from this base path and add them to the queue of // contenders. The new detours deviate from the base path by a single // replacement along the previous detour sub-path. - assert(basePath->GetDeviationPoint()); + CHECK(basePath->GetDeviationPoint()); CreateDeviantPaths(basePath, *(basePath->GetDeviationPoint()), contenders); // If the n-best list is allowed to contain duplicate translations (at the diff --git a/moses/src/ChartRuleLookupManagerMemory.cpp b/moses/src/ChartRuleLookupManagerMemory.cpp index 6b8fc25e5..aab3dfcce 100644 --- a/moses/src/ChartRuleLookupManagerMemory.cpp +++ b/moses/src/ChartRuleLookupManagerMemory.cpp @@ -38,7 +38,7 @@ ChartRuleLookupManagerMemory::ChartRuleLookupManagerMemory( : ChartRuleLookupManager(src, cellColl) , m_ruleTable(ruleTable) { - assert(m_dottedRuleColls.size() == 0); + CHECK(m_dottedRuleColls.size() == 0); size_t sourceSize = src.GetSize(); m_dottedRuleColls.resize(sourceSize); diff --git a/moses/src/ChartRuleLookupManagerOnDisk.cpp b/moses/src/ChartRuleLookupManagerOnDisk.cpp index 48933474f..b8c0674f5 100644 --- a/moses/src/ChartRuleLookupManagerOnDisk.cpp +++ b/moses/src/ChartRuleLookupManagerOnDisk.cpp @@ -25,7 +25,7 @@ #include "StaticData.h" #include "DotChartOnDisk.h" #include "ChartTranslationOptionList.h" -#include "../../OnDiskPt/src/TargetPhraseCollection.h" +#include "../../OnDiskPt/TargetPhraseCollection.h" using namespace std; @@ -53,7 +53,7 @@ ChartRuleLookupManagerOnDisk::ChartRuleLookupManagerOnDisk( , m_weight(weight) , m_filePath(filePath) { - assert(m_expandableDottedRuleListVec.size() == 0); + CHECK(m_expandableDottedRuleListVec.size() == 0); size_t sourceSize = sentence.GetSize(); m_expandableDottedRuleListVec.resize(sourceSize); @@ -258,7 +258,7 @@ void ChartRuleLookupManagerOnDisk::GetChartRuleCollection( targetPhraseCollection = iterCache->second; } - assert(targetPhraseCollection); + CHECK(targetPhraseCollection); if (!targetPhraseCollection->IsEmpty()) { outColl.Add(*targetPhraseCollection, prevDottedRule, GetCellCollection(), adhereTableLimit, rulesLimit); diff --git a/moses/src/ChartRuleLookupManagerOnDisk.h b/moses/src/ChartRuleLookupManagerOnDisk.h index 5ab2fb74e..ba87dbbf8 100644 --- a/moses/src/ChartRuleLookupManagerOnDisk.h +++ b/moses/src/ChartRuleLookupManagerOnDisk.h @@ -21,7 +21,7 @@ #ifndef moses_ChartRuleLookupManagerOnDisk_h #define moses_ChartRuleLookupManagerOnDisk_h -#include "../../OnDiskPt/src/OnDiskWrapper.h" +#include "../../OnDiskPt/OnDiskWrapper.h" #include "ChartRuleLookupManager.h" #include "ChartTranslationOptionList.h" diff --git a/moses/src/ChartTranslationOption.cpp b/moses/src/ChartTranslationOption.cpp index 27084f30b..6aa04d189 100644 --- a/moses/src/ChartTranslationOption.cpp +++ b/moses/src/ChartTranslationOption.cpp @@ -43,7 +43,7 @@ void ChartTranslationOption::CalcEstimateOfBestScore( // add the score of the best underlying hypothesis const ChartCellLabel &cellLabel = rule->GetChartCellLabel(); const ChartHypothesisCollection *hypoColl = cellLabel.GetStack(); - assert(hypoColl); + CHECK(hypoColl); m_estimateOfBestScore += hypoColl->GetBestScore(); } rule = rule->GetPrev(); diff --git a/moses/src/ChartTranslationOption.h b/moses/src/ChartTranslationOption.h index 9b2df13de..116eff037 100644 --- a/moses/src/ChartTranslationOption.h +++ b/moses/src/ChartTranslationOption.h @@ -24,7 +24,7 @@ #include "TargetPhraseCollection.h" #include "WordsRange.h" -#include <cassert> +#include "util/check.hh" #include <vector> namespace Moses diff --git a/moses/src/ChartTranslationOptionCollection.cpp b/moses/src/ChartTranslationOptionCollection.cpp index dea904d57..8f06656b2 100644 --- a/moses/src/ChartTranslationOptionCollection.cpp +++ b/moses/src/ChartTranslationOptionCollection.cpp @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> +#include "util/check.hh" #include "ChartTranslationOptionCollection.h" #include "ChartCellCollection.h" #include "InputType.h" @@ -77,12 +77,12 @@ void ChartTranslationOptionCollection::CreateTranslationOptionsForRange( ChartTranslationOptionList &chartRuleColl = GetTranslationOptionList(startPos, endPos); const WordsRange &wordsRange = chartRuleColl.GetSourceRange(); - assert(m_decodeGraphList.size() == m_ruleLookupManagers.size()); + CHECK(m_decodeGraphList.size() == m_ruleLookupManagers.size()); std::vector <DecodeGraph*>::const_iterator iterDecodeGraph; std::vector <ChartRuleLookupManager*>::const_iterator iterRuleLookupManagers = m_ruleLookupManagers.begin(); for (iterDecodeGraph = m_decodeGraphList.begin(); iterDecodeGraph != m_decodeGraphList.end(); ++iterDecodeGraph, ++iterRuleLookupManagers) { const DecodeGraph &decodeGraph = **iterDecodeGraph; - assert(decodeGraph.GetSize() == 1); + CHECK(decodeGraph.GetSize() == 1); ChartRuleLookupManager &ruleLookupManager = **iterRuleLookupManagers; size_t maxSpan = decodeGraph.GetMaxChartSpan(); if (maxSpan == 0 || (endPos-startPos+1) <= maxSpan) { @@ -125,7 +125,7 @@ void ChartTranslationOptionCollection::ProcessUnknownWord(size_t startPos, size_ ruleLookupManager.GetChartRuleCollection(wordsRange, false, fullList); } } - assert(iterRuleLookupManagers == m_ruleLookupManagers.end()); + CHECK(iterRuleLookupManagers == m_ruleLookupManagers.end()); bool alwaysCreateDirectTranslationOption = StaticData::Instance().IsAlwaysCreateDirectTranslationOption(); // create unknown words for 1 word coverage where we don't have any trans options @@ -137,13 +137,13 @@ void ChartTranslationOptionCollection::ProcessUnknownWord(size_t startPos, size_ ChartTranslationOptionList &ChartTranslationOptionCollection::GetTranslationOptionList(size_t startPos, size_t endPos) { size_t sizeVec = m_collection[startPos].size(); - assert(endPos-startPos < sizeVec); + CHECK(endPos-startPos < sizeVec); return m_collection[startPos][endPos - startPos]; } const ChartTranslationOptionList &ChartTranslationOptionCollection::GetTranslationOptionList(size_t startPos, size_t endPos) const { size_t sizeVec = m_collection[startPos].size(); - assert(endPos-startPos < sizeVec); + CHECK(endPos-startPos < sizeVec); return m_collection[startPos][endPos - startPos]; } @@ -197,7 +197,7 @@ void ChartTranslationOptionCollection::ProcessOneUnknownWord(const Word &sourceW // modify the starting bitmap } - Phrase* m_unksrc = new Phrase(Input, 1); + Phrase* m_unksrc = new Phrase(1); m_unksrc->AddWord() = sourceWord; m_unksrcs.push_back(m_unksrc); @@ -221,7 +221,7 @@ void ChartTranslationOptionCollection::ProcessOneUnknownWord(const Word &sourceW Word targetLHS(true); targetLHS.CreateFromString(Output, staticData.GetOutputFactorOrder(), targetLHSStr, true); - assert(targetLHS.GetFactor(0) != NULL); + CHECK(targetLHS.GetFactor(0) != NULL); // add to dictionary TargetPhrase *targetPhrase = new TargetPhrase(Output); @@ -264,7 +264,7 @@ void ChartTranslationOptionCollection::ProcessOneUnknownWord(const Word &sourceW Word targetLHS(true); targetLHS.CreateFromString(Output, staticData.GetOutputFactorOrder(), targetLHSStr, true); - assert(targetLHS.GetFactor(0) != NULL); + CHECK(targetLHS.GetFactor(0) != NULL); targetPhrase->SetSourcePhrase(*m_unksrc); targetPhrase->SetScore(unknownWordPenaltyProducer, unknownScore); diff --git a/moses/src/ChartTranslationOptionList.cpp b/moses/src/ChartTranslationOptionList.cpp index 100db79b4..cb1b8e256 100644 --- a/moses/src/ChartTranslationOptionList.cpp +++ b/moses/src/ChartTranslationOptionList.cpp @@ -102,7 +102,7 @@ void ChartTranslationOptionList::Add(const TargetPhraseCollection &targetPhraseC void ChartTranslationOptionList::Add(ChartTranslationOption *transOpt) { - assert(transOpt); + CHECK(transOpt); m_collection.push_back(transOpt); } diff --git a/moses/src/ChartTrellisNode.cpp b/moses/src/ChartTrellisNode.cpp index 725886c68..ce3c9eaf7 100644 --- a/moses/src/ChartTrellisNode.cpp +++ b/moses/src/ChartTrellisNode.cpp @@ -76,7 +76,7 @@ ChartTrellisNode::~ChartTrellisNode() Phrase ChartTrellisNode::GetOutputPhrase() const { // exactly like same fn in hypothesis, but use trellis nodes instead of prevHypos pointer - Phrase ret(Output, ARRAY_SIZE_INCR); + Phrase ret(ARRAY_SIZE_INCR); const ChartTranslationOption &transOpt = m_hypo.GetTranslationOption(); @@ -103,7 +103,7 @@ Phrase ChartTrellisNode::GetOutputPhrase() const void ChartTrellisNode::CreateChildren() { - assert(m_children.empty()); + CHECK(m_children.empty()); const std::vector<const ChartHypothesis*> &prevHypos = m_hypo.GetPrevHypos(); m_children.reserve(prevHypos.size()); for (size_t ind = 0; ind < prevHypos.size(); ++ind) { @@ -118,7 +118,7 @@ void ChartTrellisNode::CreateChildren(const ChartTrellisNode &rootNode, const ChartHypothesis &replacementHypo, ChartTrellisNode *&deviationPoint) { - assert(m_children.empty()); + CHECK(m_children.empty()); const NodeChildren &children = rootNode.GetChildren(); m_children.reserve(children.size()); for (size_t ind = 0; ind < children.size(); ++ind) { diff --git a/moses/src/ChartTrellisPath.cpp b/moses/src/ChartTrellisPath.cpp index de8803da3..231d4237a 100644 --- a/moses/src/ChartTrellisPath.cpp +++ b/moses/src/ChartTrellisPath.cpp @@ -42,7 +42,7 @@ ChartTrellisPath::ChartTrellisPath(const ChartTrellisDetour &detour) , m_scoreBreakdown(detour.GetBasePath().m_scoreBreakdown) , m_totalScore(0) { - assert(m_deviationPoint); + CHECK(m_deviationPoint); ScoreComponentCollection scoreChange; scoreChange = detour.GetReplacementHypo().GetScoreBreakdown(); scoreChange.MinusEquals(detour.GetSubstitutedNode().GetHypothesis().GetScoreBreakdown()); diff --git a/moses/src/ConfusionNet.cpp b/moses/src/ConfusionNet.cpp index 911ca2836..8ff119497 100644 --- a/moses/src/ConfusionNet.cpp +++ b/moses/src/ConfusionNet.cpp @@ -247,7 +247,7 @@ ConfusionNet::CreateTranslationOptionCollection(const TranslationSystem* system) size_t maxNoTransOptPerCoverage = StaticData::Instance().GetMaxNoTransOptPerCoverage(); float translationOptionThreshold = StaticData::Instance().GetTranslationOptionThreshold(); TranslationOptionCollection *rv= new TranslationOptionCollectionConfusionNet(system, *this, maxNoTransOptPerCoverage, translationOptionThreshold); - assert(rv); + CHECK(rv); return rv; } diff --git a/moses/src/ConfusionNet.h b/moses/src/ConfusionNet.h index 4bbb893de..25b5a021d 100644 --- a/moses/src/ConfusionNet.h +++ b/moses/src/ConfusionNet.h @@ -39,7 +39,7 @@ public: } const Column& GetColumn(size_t i) const { - assert(i<data.size()); + CHECK(i<data.size()); return data[i]; } const Column& operator[](size_t i) const { @@ -69,7 +69,7 @@ public: TranslationOptionCollection* CreateTranslationOptionCollection(const TranslationSystem* system) const; const NonTerminalSet &GetLabelSet(size_t /*startPos*/, size_t /*endPos*/) const { - assert(false); + CHECK(false); return *(new NonTerminalSet()); } diff --git a/moses/src/DecodeGraph.h b/moses/src/DecodeGraph.h index f899fbf0e..770cb9958 100644 --- a/moses/src/DecodeGraph.h +++ b/moses/src/DecodeGraph.h @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #ifndef moses_DecodeGraph_h #define moses_DecodeGraph_h -#include <cassert> +#include "util/check.hh" #include <list> #include <iterator> #include "TypeDef.h" @@ -78,7 +78,7 @@ public: } size_t GetMaxChartSpan() const { - assert(m_maxChartSpan != NOT_FOUND); + CHECK(m_maxChartSpan != NOT_FOUND); return m_maxChartSpan; } diff --git a/moses/src/DecodeStep.h b/moses/src/DecodeStep.h index 4bf310fd9..4d2f2280b 100644 --- a/moses/src/DecodeStep.h +++ b/moses/src/DecodeStep.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #ifndef moses_DecodeStep_h #define moses_DecodeStep_h -#include <cassert> +#include "util/check.hh" #include "TypeDef.h" #include "Dictionary.h" diff --git a/moses/src/DecodeStepGeneration.cpp b/moses/src/DecodeStepGeneration.cpp index 94427bff7..0f0c5c2dc 100644 --- a/moses/src/DecodeStepGeneration.cpp +++ b/moses/src/DecodeStepGeneration.cpp @@ -149,7 +149,7 @@ void DecodeStepGeneration::Process(const TranslationSystem* system } // merge with existing trans opt - Phrase genPhrase(Output, mergeWords); + Phrase genPhrase( mergeWords); TranslationOption *newTransOpt = MergeGeneration(inputPartialTranslOpt, genPhrase, generationScore); if (newTransOpt != NULL) { outputPartialTranslOptColl.Add(system, newTransOpt); diff --git a/moses/src/DotChartInMemory.h b/moses/src/DotChartInMemory.h index 2854a5d0a..fe7ab64c5 100644 --- a/moses/src/DotChartInMemory.h +++ b/moses/src/DotChartInMemory.h @@ -26,7 +26,7 @@ #include "DotChart.h" #include "PhraseDictionaryNodeSCFG.h" -#include <cassert> +#include "util/check.hh" #include <vector> namespace Moses @@ -96,7 +96,7 @@ public: } void Add(size_t pos, const DottedRuleInMemory *dottedRule) { - assert(dottedRule); + CHECK(dottedRule); m_coll[pos].push_back(dottedRule); if (!dottedRule->GetLastNode().IsLeaf()) { m_expandableDottedRuleList.push_back(dottedRule); diff --git a/moses/src/DotChartOnDisk.cpp b/moses/src/DotChartOnDisk.cpp index 5144cfc7c..1674f0e21 100644 --- a/moses/src/DotChartOnDisk.cpp +++ b/moses/src/DotChartOnDisk.cpp @@ -20,7 +20,7 @@ #include <algorithm> #include "DotChartOnDisk.h" #include "Util.h" -#include "../../OnDiskPt/src/PhraseNode.h" +#include "../../OnDiskPt/PhraseNode.h" using namespace std; diff --git a/moses/src/DotChartOnDisk.h b/moses/src/DotChartOnDisk.h index ddf20c2f1..4473b7685 100644 --- a/moses/src/DotChartOnDisk.h +++ b/moses/src/DotChartOnDisk.h @@ -20,7 +20,7 @@ #pragma once #include <vector> -#include <cassert> +#include "util/check.hh" #include "DotChart.h" @@ -108,7 +108,7 @@ class SavedNodeOnDisk public: SavedNodeOnDisk(const DottedRuleOnDisk *dottedRule) :m_dottedRule(dottedRule) { - assert(m_dottedRule); + CHECK(m_dottedRule); } ~SavedNodeOnDisk() { @@ -164,7 +164,7 @@ public: } void Add(size_t pos, const DottedRuleOnDisk *dottedRule) { - assert(dottedRule); + CHECK(dottedRule); m_coll[pos]->Add(dottedRule); m_savedNode.push_back(new SavedNodeOnDisk(dottedRule)); diff --git a/moses/src/DummyScoreProducers.cpp b/moses/src/DummyScoreProducers.cpp index fc8f670aa..5191fd75b 100644 --- a/moses/src/DummyScoreProducers.cpp +++ b/moses/src/DummyScoreProducers.cpp @@ -1,6 +1,6 @@ // $Id$ -#include <cassert> +#include "util/check.hh" #include "FFState.h" #include "StaticData.h" #include "DummyScoreProducers.h" diff --git a/moses/src/DummyScoreProducers.h b/moses/src/DummyScoreProducers.h index f399f1165..058e8f22d 100644 --- a/moses/src/DummyScoreProducers.h +++ b/moses/src/DummyScoreProducers.h @@ -32,7 +32,7 @@ public: const ChartHypothesis&, int /* featureID */, ScoreComponentCollection*) const { - assert(0); // feature function not valid in chart decoder + CHECK(0); // feature function not valid in chart decoder return NULL; } }; diff --git a/moses/src/DynSAInclude/RandLMCache.h b/moses/src/DynSAInclude/RandLMCache.h index 3f38cae02..3f38cae02 100755..100644 --- a/moses/src/DynSAInclude/RandLMCache.h +++ b/moses/src/DynSAInclude/RandLMCache.h diff --git a/moses/src/DynSAInclude/RandLMFilter.h b/moses/src/DynSAInclude/RandLMFilter.h index fe64e23aa..556bbe44a 100755..100644 --- a/moses/src/DynSAInclude/RandLMFilter.h +++ b/moses/src/DynSAInclude/RandLMFilter.h @@ -37,15 +37,15 @@ namespace randlm { // number of bits in T cell_width_ = sizeof(T) << 3; // current implementation has following constraints - assert(cell_width_ > 0 && cell_width_ <= 64 && cell_width_ >= width); + CHECK(cell_width_ > 0 && cell_width_ <= 64 && cell_width_ >= width); // used for >> division log_cell_width_ = static_cast<int>(floor(log(cell_width_)/log(2) + 0.000001)); // size of underlying data in Ts cells_ = ((addresses * width) + cell_width_ - 1) >> log_cell_width_; // instantiate underlying data data_ = new T[cells_]; - assert(data_ != NULL); - assert(reset()); + CHECK(data_ != NULL); + CHECK(reset()); // 'first_bit' marks the first bit used by 'address' (left padded with zeros). first_bit_ = (width % cell_width_ == 0) ? 0 : cell_width_ - (width % cell_width_); // mask for full cell @@ -54,9 +54,9 @@ namespace randlm { address_mask_ = full_mask_ >> first_bit_; } Filter(FileHandler* fin, bool loaddata = true) : data_(NULL) { - assert(loadHeader(fin)); + CHECK(loadHeader(fin)); if (loaddata) - assert(loadData(fin)); + CHECK(loadData(fin)); } virtual ~Filter() { delete[] data_; @@ -72,7 +72,7 @@ namespace randlm { } // read / write functions inline bool read(uint64_t address, T* value) { - assert(address <= addresses_); + CHECK(address <= addresses_); // copy address to 'value' uint64_t data_bit = address * width_; uint32_t data_cell = (data_bit >> log_cell_width_); // % cells_; @@ -94,7 +94,7 @@ namespace randlm { return true; } inline T read(uint64_t address) { - assert(address <= addresses_); + CHECK(address <= addresses_); // return value at address T value = 0; uint64_t data_bit = address * width_; @@ -116,8 +116,8 @@ namespace randlm { return value; } inline bool write(uint64_t address, T value) { - assert(address <= addresses_); - assert(log2(value) <= width_); + CHECK(address <= addresses_); + CHECK(log2(value) <= width_); // write 'value' to address uint64_t data_bit = address * width_; uint32_t data_cell = (data_bit >> log_cell_width_); // % cells_; @@ -207,50 +207,50 @@ namespace randlm { int getCellWidth() { return cell_width_; } uint32_t getCells() { return cells_; } virtual bool save(FileHandler* out) { - assert(out != NULL); - assert(out->write((char*)&cells_, sizeof(cells_))); - assert(out->write((char*)&cell_width_, sizeof(cell_width_))); - assert(out->write((char*)&log_cell_width_, sizeof(log_cell_width_))); - assert(out->write((char*)&addresses_, sizeof(addresses_))); - assert(out->write((char*)&width_, sizeof(width_))); - assert(out->write((char*)&first_bit_, sizeof(first_bit_))); - assert(out->write((char*)&full_mask_, sizeof(full_mask_))); - assert(out->write((char*)&address_mask_, sizeof(address_mask_))); - //assert(out->write((char*)data_, cells_ * sizeof(T))); + CHECK(out != NULL); + CHECK(out->write((char*)&cells_, sizeof(cells_))); + CHECK(out->write((char*)&cell_width_, sizeof(cell_width_))); + CHECK(out->write((char*)&log_cell_width_, sizeof(log_cell_width_))); + CHECK(out->write((char*)&addresses_, sizeof(addresses_))); + CHECK(out->write((char*)&width_, sizeof(width_))); + CHECK(out->write((char*)&first_bit_, sizeof(first_bit_))); + CHECK(out->write((char*)&full_mask_, sizeof(full_mask_))); + CHECK(out->write((char*)&address_mask_, sizeof(address_mask_))); + //CHECK(out->write((char*)data_, cells_ * sizeof(T))); const uint64_t jump = 524288032ul; //(uint64_t)pow(2, 29); if((width_ == 1) || cells_ < jump) - assert(out->write((char*)data_, cells_ * sizeof(T))); + CHECK(out->write((char*)data_, cells_ * sizeof(T))); else { uint64_t idx(0); while(idx + jump < cells_) { - assert(out->write((char*)&data_[idx], jump * sizeof(T))); + CHECK(out->write((char*)&data_[idx], jump * sizeof(T))); idx += jump; } - assert(out->write((char*)&data_[idx], (cells_ - idx) * sizeof(T))); + CHECK(out->write((char*)&data_[idx], (cells_ - idx) * sizeof(T))); } return true; } protected: bool loadHeader(FileHandler* fin) { - assert(fin != NULL); - assert(fin->read((char*)&cells_, sizeof(cells_))); - assert(fin->read((char*)&cell_width_, sizeof(cell_width_))); - assert(cell_width_ == sizeof(T) << 3); // make sure correct underlying data type - assert(fin->read((char*)&log_cell_width_, sizeof(log_cell_width_))); - assert(fin->read((char*)&addresses_, sizeof(addresses_))); - assert(fin->read((char*)&width_, sizeof(width_))); - assert(fin->read((char*)&first_bit_, sizeof(first_bit_))); - assert(fin->read((char*)&full_mask_, sizeof(full_mask_))); - assert(fin->read((char*)&address_mask_, sizeof(address_mask_))); + CHECK(fin != NULL); + CHECK(fin->read((char*)&cells_, sizeof(cells_))); + CHECK(fin->read((char*)&cell_width_, sizeof(cell_width_))); + CHECK(cell_width_ == sizeof(T) << 3); // make sure correct underlying data type + CHECK(fin->read((char*)&log_cell_width_, sizeof(log_cell_width_))); + CHECK(fin->read((char*)&addresses_, sizeof(addresses_))); + CHECK(fin->read((char*)&width_, sizeof(width_))); + CHECK(fin->read((char*)&first_bit_, sizeof(first_bit_))); + CHECK(fin->read((char*)&full_mask_, sizeof(full_mask_))); + CHECK(fin->read((char*)&address_mask_, sizeof(address_mask_))); return true; } bool loadData(FileHandler* fin) { // instantiate underlying array data_ = new T[cells_]; - assert(data_ != NULL); - assert(fin->read((char*)data_, cells_ * sizeof(T))); - //assert(fin->read((char*)&data_[0], ceil(float(cells_) / 2.0) * sizeof(T))); - //assert(fin->read((char*)&data_[cells_ / 2], (cells_ / 2) * sizeof(T))); + CHECK(data_ != NULL); + CHECK(fin->read((char*)data_, cells_ * sizeof(T))); + //CHECK(fin->read((char*)&data_[0], ceil(float(cells_) / 2.0) * sizeof(T))); + //CHECK(fin->read((char*)&data_[cells_ / 2], (cells_ / 2) * sizeof(T))); return true; } uint64_t cells_; // number T making up 'data_' @@ -271,7 +271,7 @@ namespace randlm { BitFilter(FileHandler* fin, bool loaddata = true) : Filter<uint8_t>(fin, loaddata) { if (loaddata) - assert(load(fin)); + CHECK(load(fin)); } // TODO: overload operator[] virtual bool testBit(uint64_t location) { @@ -289,7 +289,7 @@ namespace randlm { return true; } bool save(FileHandler* fout) { - assert(Filter<uint8_t>::save(fout)); + CHECK(Filter<uint8_t>::save(fout)); std::cerr << "Saved BitFilter. Rho = " << rho() << "." << std::endl;; return true; } @@ -316,10 +316,10 @@ namespace randlm { class ResizedBitFilter : public BitFilter { public: ResizedBitFilter(FileHandler* fin) : BitFilter(fin) { - assert(load(fin)); + CHECK(load(fin)); } ResizedBitFilter(FileHandler* fin, uint64_t newsize) : BitFilter(newsize) { - assert(resizeFromFile(fin, newsize)); + CHECK(resizeFromFile(fin, newsize)); } bool resizeFromFile(FileHandler* oldin, uint64_t newsize); virtual bool testBit(uint64_t location) { @@ -332,18 +332,18 @@ namespace randlm { } bool save(FileHandler* fout) { // re-hashing parameters - assert(BitFilter::save(fout)); + CHECK(BitFilter::save(fout)); std::cerr << "Saved ResizedBitFilter. Rho = " << rho() << "." << std::endl; - assert(fout->write((char*)&old_addresses_, sizeof(old_addresses_))); - assert(fout->write((char*)&a_, sizeof(a_))); + CHECK(fout->write((char*)&old_addresses_, sizeof(old_addresses_))); + CHECK(fout->write((char*)&a_, sizeof(a_))); return fout->write((char*)&b_, sizeof(b_)); } protected: bool load(FileHandler* fin) { // re-hashing parameters std::cerr << "Loaded ResizedBitFilter. Rho = " << rho() << "." << std::endl; - assert(fin->read((char*)&old_addresses_, sizeof(old_addresses_))); - assert(fin->read((char*)&a_, sizeof(a_))); + CHECK(fin->read((char*)&old_addresses_, sizeof(old_addresses_))); + CHECK(fin->read((char*)&a_, sizeof(a_))); return fin->read((char*)&b_, sizeof(b_)); } // member data @@ -360,7 +360,7 @@ namespace randlm { CountingFilter(uint64_t addresses, int width, bool wrap_around = true) : Filter<T>(addresses, width), wrap_around_(wrap_around) {} CountingFilter(FileHandler* fin) : Filter<T>(fin, true) { - assert(load(fin)); + CHECK(load(fin)); } ~CountingFilter() {} // increment this address by one @@ -384,11 +384,11 @@ namespace randlm { return true; // wrapped round so check whether need to reset to max count if (!wrap_around_) - assert(this->write(address, this->address_mask_)); + CHECK(this->write(address, this->address_mask_)); return false; // false to indicate that overflowed } bool save(FileHandler* fout) { - assert(Filter<T>::save(fout)); + CHECK(Filter<T>::save(fout)); return fout->write((char*)&wrap_around_, sizeof(wrap_around_)); } private: diff --git a/moses/src/DynSAInclude/file.cpp b/moses/src/DynSAInclude/file.cpp index 70c45ca77..d2901c1ae 100644 --- a/moses/src/DynSAInclude/file.cpp +++ b/moses/src/DynSAInclude/file.cpp @@ -24,7 +24,7 @@ FileHandler::FileHandler(const std::string & path, std::ios_base::openmode flags exit(EXIT_FAILURE); } else { bool ret = setStreamBuffer(flags & std::ios::in); - assert(ret); + CHECK(ret); } this->precision(32); } @@ -59,11 +59,11 @@ bool FileHandler::setStreamBuffer(bool checkExists) { // redirect stdin or stdout if necesary if (path_ == FileHandler::kStdInDescriptor) { - assert(flags_ & std::ios::in); + CHECK(flags_ & std::ios::in); std::streambuf* sb = std::cin.rdbuf(); buffer_ = sb; } else if (path_ == FileHandler::kStdOutDescriptor) { - assert(flags_ & std::ios::out); + CHECK(flags_ & std::ios::out); std::streambuf* sb = std::cout.rdbuf(); buffer_ = sb; } else { diff --git a/moses/src/DynSAInclude/file.h b/moses/src/DynSAInclude/file.h index 97ea6cb52..3157f918b 100644 --- a/moses/src/DynSAInclude/file.h +++ b/moses/src/DynSAInclude/file.h @@ -7,7 +7,7 @@ #include <cstdlib> #include <sys/stat.h> #include <string> -#include <cassert> +#include "util/check.hh" #include "fdstream.h" #include "utils.h" diff --git a/moses/src/DynSAInclude/hash.h b/moses/src/DynSAInclude/hash.h index f0965d9bd..233d0be5d 100755..100644 --- a/moses/src/DynSAInclude/hash.h +++ b/moses/src/DynSAInclude/hash.h @@ -1,7 +1,7 @@ #ifndef INC_ALLHASHFUNCS_H #define INC_ALLHASHFUNCS_H -#include <cassert> +#include "util/check.hh" #include <cmath> #include "types.h" #include "utils.h" @@ -28,12 +28,12 @@ class HashBase { virtual T hash(const wordID_t* id, const int len, count_t h)=0; // vocab mapped hashing count_t size() { return H_;} virtual void save(FileHandler* fout) { - assert(fout != 0); + CHECK(fout != 0); fout->write((char*)&m_, sizeof(m_)); fout->write((char*)&H_, sizeof(H_)); } virtual void load(FileHandler* fin) { - assert(fin != 0); + CHECK(fin != 0); fin->read((char*)&m_, sizeof(m_)); fin->read((char*)&H_, sizeof(H_)); } @@ -43,7 +43,7 @@ class UnivHash_linear: public HashBase<T> { public: UnivHash_linear(float m, count_t H, P pr): HashBase<T>(m, H), pr_(pr) { - //assert(isPrime(pr_)); + //CHECK(isPrime(pr_)); initSeeds(); } UnivHash_linear(FileHandler* fin): @@ -177,7 +177,7 @@ T UnivHash_tableXOR<T>::hash(const char* s, count_t h = 0) { unsigned char c; while((c = *s++) && (++pos < MAX_STR_LEN)) value ^= table_[h][idx += c]; - assert(value < this->m_); + CHECK(value < this->m_); return value; } @@ -265,7 +265,7 @@ void UnivHash_linear<T>::freeSeeds() { template <typename T> inline T UnivHash_linear<T>::hash(const wordID_t* id, const int len, count_t h=0) { - assert(h < this->H_); + CHECK(h < this->H_); T value = 0; int pos(0); while(pos < len) { @@ -277,7 +277,7 @@ inline T UnivHash_linear<T>::hash(const wordID_t* id, const int len, template <typename T> inline T UnivHash_linear<T>::hash(const wordID_t id, const count_t pos, const T prevValue, count_t h=0) { - assert(h < this->H_); + CHECK(h < this->H_); T value = prevValue + ((a_[h][pos] * id) + b_[h][pos]); // % pr_; return value % this->m_; } @@ -315,7 +315,7 @@ void UnivHash_linear<T>::load(FileHandler* fin) { /* template <typename T> T UnivHash_linear<T>::hash(const char* s, count_t h=0) { - assert(h < this->H_); + CHECK(h < this->H_); T value = 0; int pos(0); unsigned char c; diff --git a/moses/src/DynSAInclude/onlineRLM.h b/moses/src/DynSAInclude/onlineRLM.h index dd81afa46..adc7934fc 100755..100644 --- a/moses/src/DynSAInclude/onlineRLM.h +++ b/moses/src/DynSAInclude/onlineRLM.h @@ -21,7 +21,7 @@ public: OnlineRLM(uint16_t MBs, int width, int bucketRange, count_t order, Vocab* v, float qBase = 8): PerfectHash<T>(MBs, width, bucketRange, qBase), vocab_(v), bAdapting_(false), order_(order), corpusSize_(0), alpha_(0) { - assert(vocab_ != 0); + CHECK(vocab_ != 0); //instantiate quantizer class here cache_ = new Cache<float>(8888.8888, 9999.9999); // unknown_value, null_value alpha_ = new float[order_ + 1]; @@ -137,7 +137,7 @@ int OnlineRLM<T>::query(const wordID_t* IDs, int len) { value -= ((value & this->hitMask_) != 0) ? this->hitMask_ : 0; // check for previous hit marks } else { - assert(filterIdx < this->cells_); + CHECK(filterIdx < this->cells_); //markQueried(filterIdx); } } @@ -158,12 +158,12 @@ bool OnlineRLM<T>::markPrefix(const wordID_t* IDs, const int len, bool bSet) { return false; } if(filterIndex != this->cells_ + 1) { - assert(hpdItr == this->dict_.end()); + CHECK(hpdItr == this->dict_.end()); if(bSet) bPrefix_->setBit(filterIndex); // mark index else bPrefix_->clearBit(filterIndex); // unset index } else { - assert(filterIndex == this->cells_ + 1); + CHECK(filterIndex == this->cells_ + 1); //how to handle hpd prefixes? } if(pfCache.nodes() > 10000) pfCache.clear(); @@ -289,14 +289,14 @@ float OnlineRLM<T>::getProb(const wordID_t* ngram, int len, logprob = alpha_[len] + oovprob; break; case 1: // unigram found only - assert(in[len - 1] > 0); + CHECK(in[len - 1] > 0); logprob = alpha_[len - 1] + (corpusSize_ > 0 ? log10(static_cast<float>(in[len - 1]) / static_cast<float>(corpusSize_)) : 0); //logprob = alpha_[len - 1] + //log10(static_cast<float>(in[len - 1]) / static_cast<float>(corpusSize_)); break; default: - assert(den_val > 0); + CHECK(den_val > 0); //if(subgram == in[len - found]) ++subgram; // avoid returning zero probs???? logprob = alpha_[len - num_fnd] + log10(static_cast<float>(in[len - num_fnd]) / static_cast<float>(den_val)); @@ -313,7 +313,7 @@ template<typename T> const void* OnlineRLM<T>::getContext(const wordID_t* ngram, int len) { int dummy(0); float* addresses[len]; // only interested in addresses of cache - assert(cache_->getCache2(ngram, len, &addresses[0], &dummy) == len); + CHECK(cache_->getCache2(ngram, len, &addresses[0], &dummy) == len); // return address of cache node return (const void*)addresses[0]; } @@ -391,7 +391,7 @@ void OnlineRLM<T>::load(FileHandler* fin) { cerr << "Loading ORLM...\n"; // load vocab first vocab_ = new Vocab(fin); - assert(vocab_ != 0); + CHECK(vocab_ != 0); fin->read((char*)&corpusSize_, sizeof(corpusSize_)); cerr << "\tCorpus size = " << corpusSize_ << endl; fin->read((char*)&order_, sizeof(order_)); diff --git a/moses/src/DynSAInclude/params.cpp b/moses/src/DynSAInclude/params.cpp index c37fcd684..4be3a1676 100755..100644 --- a/moses/src/DynSAInclude/params.cpp +++ b/moses/src/DynSAInclude/params.cpp @@ -59,9 +59,9 @@ bool Parameters::loadParams(int argc, char ** argv) { //if the parameter is of type booL no corresponding value if( getValueType(param) == kBoolValue ) { jumpBy = 1; - assert(setParamValue(param, kTrueValue)); + CHECK(setParamValue(param, kTrueValue)); } else { //not of type bool so must have corresponding value - assert(i+1 < argc); + CHECK(i+1 < argc); jumpBy = 2; std::string val = argv[i+1]; Utils::trim(val); diff --git a/moses/src/DynSAInclude/params.h b/moses/src/DynSAInclude/params.h index 33930e536..e0aab6135 100755..100644 --- a/moses/src/DynSAInclude/params.h +++ b/moses/src/DynSAInclude/params.h @@ -5,7 +5,7 @@ #include <map> #include <set> #include <vector> -#include <cassert> +#include "util/check.hh" #include "file.h" #include "utils.h" #include "types.h" diff --git a/moses/src/DynSAInclude/perfectHash.h b/moses/src/DynSAInclude/perfectHash.h index 2ee2ce156..2e3bfbc8f 100755..100644 --- a/moses/src/DynSAInclude/perfectHash.h +++ b/moses/src/DynSAInclude/perfectHash.h @@ -22,7 +22,7 @@ class PerfectHash { public: PerfectHash(uint16_t MBs, int width, int bucketRange, float qBase); PerfectHash(FileHandler* fin) { - assert(fin != 0); + CHECK(fin != 0); } virtual ~PerfectHash(); void analyze(); @@ -116,7 +116,7 @@ uint64_t PerfectHash<T>::insert(const wordID_t* IDs, const int len, } ++index; } - assert((emptyidx < index) && (filter_->read(emptyidx) == 0)); // should have found empty index if it gets here + CHECK((emptyidx < index) && (filter_->read(emptyidx) == 0)); // should have found empty index if it gets here T code = (T)qtizer_->code(value); filter_->write(emptyidx, fp); // insert the fprint values_->write(emptyidx, code); @@ -214,8 +214,8 @@ void PerfectHash<T>::remove(const wordID_t* IDs, const int len) { } template<typename T> // clear filter index void PerfectHash<T>::remove(uint64_t index) { - assert(index < cells_); - assert(filter_->read(index) != 0); // slow + CHECK(index < cells_); + CHECK(filter_->read(index) != 0); // slow filter_->write(index, 0); values_->write(index, 0); //reduce bucket size @@ -255,7 +255,7 @@ count_t PerfectHash<T>::bucketsMemUse() { } template<typename T> void PerfectHash<T>::save(FileHandler* fout) { - assert(fout != 0); + CHECK(fout != 0); cerr << "\tSaving perfect hash parameters...\n"; fout->write((char*)&hitMask_, sizeof(hitMask_)); fout->write((char*)&memBound_, sizeof(memBound_)); @@ -280,7 +280,7 @@ void PerfectHash<T>::save(FileHandler* fout) { } template<typename T> void PerfectHash<T>::load(FileHandler* fin) { - assert(fin != 0); + CHECK(fin != 0); cerr << "\tLoading perfect hash parameters...\n"; fin->read((char*)&hitMask_, sizeof(hitMask_)); fin->read((char*)&memBound_, sizeof(memBound_)); diff --git a/moses/src/DynSAInclude/quantizer.h b/moses/src/DynSAInclude/quantizer.h index e452716e4..c12189615 100755..100644 --- a/moses/src/DynSAInclude/quantizer.h +++ b/moses/src/DynSAInclude/quantizer.h @@ -3,7 +3,7 @@ #include <vector> #include <cmath> -#include <cassert> +#include "util/check.hh" #include <algorithm> #include "types.h" @@ -11,7 +11,7 @@ static const float kFloatErr = 0.00001f; class LogQtizer { public: LogQtizer(float i): base_(pow(2, 1 / i)) { - assert(base_ > 1); + CHECK(base_ > 1); max_code_ = 0; float value = 1; // code = 1 -> value = 1 for any base std::vector<float> code_to_value_vec; @@ -34,12 +34,12 @@ public: std::cerr << "Initialized quantization (size = " << max_code_ + 1 << ")" << std::endl; } LogQtizer(FileHandler* fin) { - assert(fin != NULL); + CHECK(fin != NULL); load(fin); } int code(float value) { // should just be: return log_b(value) - assert(!(value < min_value_ || value > max_value_)); + CHECK(!(value < min_value_ || value > max_value_)); // but binary search removes errors due to floor operator above int code = static_cast<int>(std::lower_bound(code_to_value_, code_to_value_+ max_code_, value) - code_to_value_); diff --git a/moses/src/DynSAInclude/vocab.cpp b/moses/src/DynSAInclude/vocab.cpp index f0825f5a4..27e052260 100644 --- a/moses/src/DynSAInclude/vocab.cpp +++ b/moses/src/DynSAInclude/vocab.cpp @@ -118,7 +118,7 @@ bool Vocab::Load(FileHandler* vcbin, const FactorDirection& direction, wordID_t id; void *ret = getline(*vcbin, line); - assert(ret); + CHECK(ret); std::istringstream first(line.c_str()); uint32_t vcbsize(0); first >> vcbsize; @@ -132,7 +132,7 @@ bool Vocab::Load(FileHandler* vcbin, const FactorDirection& direction, // may be no id (i.e. file may just be a word list) if (id == 0 && word != GetkOOVWord()) id = m_ids2words.size() + 1; // assign ids sequentially starting from 1 - assert(m_ids2words.count(id) == 0 && m_words2ids.count(word) == 0); + CHECK(m_ids2words.count(id) == 0 && m_words2ids.count(word) == 0); m_ids2words[id] = word; m_words2ids[word] = id; } diff --git a/moses/src/DynSAInclude/vocab.h b/moses/src/DynSAInclude/vocab.h index cb2d3dac1..467d16fdb 100644 --- a/moses/src/DynSAInclude/vocab.h +++ b/moses/src/DynSAInclude/vocab.h @@ -39,7 +39,7 @@ public: m_kBOSWordID(1) { InitSpecialWords(); bool ret = Load(vocab_path, direction, factors, closed); - assert(ret); + CHECK(ret); } Vocab(FileHandler * fin, const FactorDirection& direction, const FactorList& factors, bool closed = true): @@ -47,7 +47,7 @@ public: m_kBOSWordID(1) { InitSpecialWords(); bool ret = Load(fin, direction, factors, closed); - assert(ret); + CHECK(ret); } Vocab(FileHandler *fin): m_kOOVWordID(0), diff --git a/moses/src/DynSuffixArray.cpp b/moses/src/DynSuffixArray.cpp index 0b446cc1d..f043f5c9b 100644 --- a/moses/src/DynSuffixArray.cpp +++ b/moses/src/DynSuffixArray.cpp @@ -109,7 +109,7 @@ void DynSuffixArray::Insert(vuint_t* newSent, unsigned newIndex) //stage 3...all words of new sentence are inserted backwards // stage 2: k=ISA[newIndex], tmp= L[k], L[k] = newChar //PrintAuxArrays(); - assert(newIndex <= m_SA->size()); + CHECK(newIndex <= m_SA->size()); int k(-1), kprime(-1); k = (newIndex < m_SA->size() ? m_ISA->at(newIndex) : m_ISA->at(0)); // k is now index of the cycle that starts at newindex int true_pos = LastFirstFunc(k); // track cycle shift (newIndex - 1) @@ -161,7 +161,7 @@ void DynSuffixArray::Reorder(unsigned j, unsigned jprime) //cerr << "j=" << j << "\tj'=" << jprime << endl; int isaIdx(-1); int new_j = LastFirstFunc(j); - assert(j <= jprime); + CHECK(j <= jprime); // for SA and L, the element at pos j is moved to pos j' m_L->insert(m_L->begin() + jprime + 1, m_L->at(j)); m_L->erase(m_L->begin() + j); diff --git a/moses/src/FFState.h b/moses/src/FFState.h index f8728de18..49b0e55a8 100644 --- a/moses/src/FFState.h +++ b/moses/src/FFState.h @@ -1,7 +1,7 @@ #ifndef moses_FFState_h #define moses_FFState_h -#include <cassert> +#include "util/check.hh" #include <vector> diff --git a/moses/src/FeatureFunction.cpp b/moses/src/FeatureFunction.cpp index 322d8de6e..ad9db5e1c 100644 --- a/moses/src/FeatureFunction.cpp +++ b/moses/src/FeatureFunction.cpp @@ -1,6 +1,6 @@ #include "FeatureFunction.h" -#include <cassert> +#include "util/check.hh" namespace Moses { @@ -19,7 +19,7 @@ void StatelessFeatureFunction::Evaluate( const TargetPhrase& /* cur_hypo */, ScoreComponentCollection* /* accumulator */) const { - assert(!"Please implement Evaluate or set ComputeValueInTranslationOption to true"); + CHECK(!"Please implement Evaluate or set ComputeValueInTranslationOption to true"); } bool StatefulFeatureFunction::IsStateless() const diff --git a/moses/src/FeatureVector.cpp b/moses/src/FeatureVector.cpp index 7889fdd75..638690fa9 100644 --- a/moses/src/FeatureVector.cpp +++ b/moses/src/FeatureVector.cpp @@ -20,7 +20,6 @@ */ #include <algorithm> -#include <cassert> #include <cmath> #include <fstream> #include <sstream> @@ -505,7 +504,7 @@ namespace Moses { } FValue FVector::inner_product(const FVector& rhs) const { - assert(m_coreFeatures.size() == rhs.m_coreFeatures.size()); + CHECK(m_coreFeatures.size() == rhs.m_coreFeatures.size()); FValue product = 0.0; for (const_iterator i = cbegin(); i != cend(); ++i) { product += ((i->second)*(rhs.get(i->first))); diff --git a/moses/src/FeatureVector.h b/moses/src/FeatureVector.h index 9a75d54a0..38e23b9c6 100644 --- a/moses/src/FeatureVector.h +++ b/moses/src/FeatureVector.h @@ -44,6 +44,8 @@ #include <boost/thread/shared_mutex.hpp> #endif +#include "util/check.hh" + namespace Moses { typedef float FValue; @@ -251,7 +253,7 @@ namespace Moses { ar >> names; ar >> values; ar >> m_coreFeatures; - assert (names.size() == values.size()); + CHECK(names.size() == values.size()); for (size_t i = 0; i < names.size(); ++i) { set(FName(names[i]), values[i]); } diff --git a/moses/src/FeatureVectorTest.cpp b/moses/src/FeatureVectorTest.cpp new file mode 100644 index 000000000..af1829e62 --- /dev/null +++ b/moses/src/FeatureVectorTest.cpp @@ -0,0 +1,273 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2010- University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + +#include <boost/test/unit_test.hpp> + +#include "FeatureVector.h" + +using namespace Moses; +using namespace std; + +static const float TOL = 0.00001; + +BOOST_AUTO_TEST_SUITE(fv) + +BOOST_AUTO_TEST_CASE(vector_sum_diff) +{ + FVector f1,f2,f3; + FName n1("a"); + FName n2("b"); + FName n3("c"); + FName n4("d"); + f1[n1] = 1.2; f1[n2] = 1.4; f1[n3] = -0.1; + f2[n1] = 0.01; f2[n3] = 5.6; f2[n4] = 0.6; + f3[n1] =1.2; + FVector sum = f1 + f2; + FVector diff = f1 - f2; + BOOST_CHECK_CLOSE((FValue)sum[n1], 1.21, TOL); + BOOST_CHECK_CLOSE((FValue)sum[n2], 1.4, TOL); + BOOST_CHECK_CLOSE((FValue)sum[n3], 5.5, TOL); + BOOST_CHECK_CLOSE((FValue)sum[n4], 0.6, TOL); + BOOST_CHECK_CLOSE((FValue)diff[n1], 1.19, TOL); + BOOST_CHECK_CLOSE((FValue)diff[n2], 1.4, TOL); + BOOST_CHECK_CLOSE((FValue)diff[n3], -5.7, TOL); + BOOST_CHECK_CLOSE((FValue)diff[n4], -0.6, TOL); + f1 -= f3; + cerr << f1 << endl << f3 << endl ; + BOOST_CHECK_CLOSE((FValue)f1[n1],0,TOL); +} + + +BOOST_AUTO_TEST_CASE(scalar) +{ + FVector f1,f2; + FName n1("a"); + FName n2("b"); + FName n3("c"); + FName n4("d"); + f1[n1] = 0.2; f1[n2] = 9.178; f1[n3] = -0.1; + f2[n1] = 0.01; f2[n3] = 5.6; f2[n4] = 0.6; + FVector prod1 = f1 * 2; + FVector prod2 = f1 * -0.1; + FVector quot = f2 / 2; + BOOST_CHECK_CLOSE((FValue)prod1[n1], 0.4, TOL); + BOOST_CHECK_CLOSE((FValue)prod1[n2], 18.356, TOL); + BOOST_CHECK_CLOSE((FValue)prod1[n3], -0.2, TOL); + + BOOST_CHECK_CLOSE((FValue)prod2[n1], -0.02, TOL); + BOOST_CHECK_CLOSE((FValue)prod2[n2], -0.9178, TOL); + BOOST_CHECK_CLOSE((FValue)prod2[n3], 0.01, TOL); + + BOOST_CHECK_CLOSE((FValue)quot[n1], 0.005, TOL); + BOOST_CHECK_CLOSE((FValue)quot[n2], 0, TOL); + BOOST_CHECK_CLOSE((FValue)quot[n3], 2.8, TOL); + BOOST_CHECK_CLOSE((FValue)quot[n4], 0.3, TOL); +} + +BOOST_AUTO_TEST_CASE(inc) +{ + FVector f1; + FName n1("a"); + FName n2("b"); + f1[n1] = 2.3; f1[n2] = -0.4; + f1[n1]+=2; + BOOST_CHECK_CLOSE((FValue)f1[n1], 4.3, TOL); + BOOST_CHECK_CLOSE((FValue)f1[n2], -0.4, TOL); + + FValue res = ++f1[n2]; + BOOST_CHECK_CLOSE(res,0.6, TOL); + BOOST_CHECK_CLOSE((FValue)f1[n1], 4.3, TOL); + BOOST_CHECK_CLOSE((FValue)f1[n2], 0.6, TOL); +} + +BOOST_AUTO_TEST_CASE(vector_mult) +{ + FVector f1,f2; + FName n1("a"); + FName n2("b"); + FName n3("c"); + FName n4("d"); + f1[n1] = 0.2; f1[n2] = 9.178; f1[n3] = -0.1; + f2[n1] = 0.01; f2[n2] = 5.6; f2[n3] = 1; f2[n4] = 0.6; + FVector prod = f1 * f2; + FVector quot = f1/f2; + BOOST_CHECK_CLOSE((FValue)prod[n1], 0.002, TOL); + BOOST_CHECK_CLOSE((FValue)prod[n2], 51.3968, TOL); + BOOST_CHECK_CLOSE((FValue)prod[n3], -0.1, TOL); + BOOST_CHECK_CLOSE((FValue)prod[n4], 0, TOL); + + BOOST_CHECK_CLOSE((FValue)quot[n1], 20, TOL); + BOOST_CHECK_CLOSE((FValue)quot[n2], 1.63892865, TOL); + BOOST_CHECK_CLOSE((FValue)quot[n3], -0.1, TOL); + BOOST_CHECK_CLOSE((FValue)quot[n4], 0, TOL); +} + +BOOST_AUTO_TEST_CASE(core) +{ + FVector f1(2); + f1[0] = 1.3; + f1[1] = -1.9; + BOOST_CHECK_CLOSE(f1[0],1.3,TOL); + BOOST_CHECK_CLOSE(f1[1],-1.9,TOL); + f1[1] = 0.1; + BOOST_CHECK_CLOSE(f1[1],0.1,TOL); + + BOOST_CHECK_EQUAL(f1.size(),2); + + f1[FName("a")] = 1.2; + BOOST_CHECK_EQUAL(f1.size(),3); +} + +BOOST_AUTO_TEST_CASE(core_arith) +{ + FVector f1(2); + FVector f2(2); + FName n1("a"); + FName n2("b"); + f1[0] = 1.1; f1[1] = 0.25; f1[n1] = 3.6; f1[n2] = -1.5; + f2[0] = 0.5; f2[1] = -0.1; f2[n1] = 1; + + //vector ops + FVector sum = f1+f2; + FVector diff = f1-f2; + FVector prod = f1*f2; + FVector quot = f2/f1; + + BOOST_CHECK_CLOSE((FValue)sum[0], 1.6 , TOL); + BOOST_CHECK_CLOSE((FValue)sum[1], 0.15 , TOL); + BOOST_CHECK_CLOSE((FValue)sum[n1], 4.6 , TOL); + BOOST_CHECK_CLOSE((FValue)sum[n2], -1.5 , TOL); + + BOOST_CHECK_CLOSE((FValue)diff[0], 0.6 , TOL); + BOOST_CHECK_CLOSE((FValue)diff[1], 0.35 , TOL); + BOOST_CHECK_CLOSE((FValue)diff[n1], 2.6 , TOL); + BOOST_CHECK_CLOSE((FValue)diff[n2], -1.5 , TOL); + + BOOST_CHECK_CLOSE((FValue)prod[0], 0.55 , TOL); + BOOST_CHECK_CLOSE((FValue)prod[1], -0.025 , TOL); + BOOST_CHECK_CLOSE((FValue)prod[n1], 3.6 , TOL); + BOOST_CHECK_CLOSE((FValue)prod[n2], 0 , TOL); + + BOOST_CHECK_CLOSE((FValue)quot[0], 0.4545454545 , TOL); + BOOST_CHECK_CLOSE((FValue)quot[1], -0.4 , TOL); + BOOST_CHECK_CLOSE((FValue)quot[n1], 0.277777777 , TOL); + BOOST_CHECK_CLOSE((FValue)quot[n2], 0 , TOL); + + //with different length vectors + FVector f3(2); + FVector f4(1); + f3[0] = 2; f3[1] = -1; + f4[0] = 5; + + FVector sum1 = f3 + f4; + FVector sum2 = f4 + f3; + BOOST_CHECK_EQUAL(sum1,sum2); + BOOST_CHECK_CLOSE(sum1[0], 7, TOL); + BOOST_CHECK_CLOSE(sum1[1], -1, TOL); + + FVector diff1 = f3 - f4; + FVector diff2 = f4 - f3; + BOOST_CHECK_CLOSE(diff1[0], -3, TOL); + BOOST_CHECK_CLOSE(diff1[1], -1, TOL); + BOOST_CHECK_CLOSE(diff2[0], 3, TOL); + BOOST_CHECK_CLOSE(diff2[1], 1, TOL); + + FVector prod1 = f3 * f4; + FVector prod2 = f4 * f3; + BOOST_CHECK_EQUAL(prod1,prod2); + BOOST_CHECK_CLOSE(prod1[0], 10, TOL); + BOOST_CHECK_CLOSE(prod1[1], 0, TOL); + + FVector quot1 = f3 / f4; + FVector quot2 = f4 / f3; + BOOST_CHECK_CLOSE(quot1[0], 0.4, TOL); + BOOST_CHECK_EQUAL(quot1[1], -numeric_limits<float>::infinity()); + BOOST_CHECK_CLOSE(quot2[0], 2.5, TOL); + BOOST_CHECK_CLOSE(quot2[1], 0, TOL); + +} + +BOOST_AUTO_TEST_CASE(core_scalar) +{ + FVector f1(3); + FName n1("a"); + f1[0] = 1.5; f1[1] = 2.1; f1[2] = 4; f1[n1] = -0.5; + + FVector prod = f1*2; + FVector quot = f1/5; + + BOOST_CHECK_CLOSE((FValue)prod[0], 3 , TOL); + BOOST_CHECK_CLOSE((FValue)prod[1], 4.2 , TOL); + BOOST_CHECK_CLOSE((FValue)prod[2], 8 , TOL); + BOOST_CHECK_CLOSE((FValue)prod[n1],-1 , TOL); + + BOOST_CHECK_CLOSE((FValue)quot[0], 0.3 , TOL); + BOOST_CHECK_CLOSE((FValue)quot[1], 0.42 , TOL); + BOOST_CHECK_CLOSE((FValue)quot[2], 0.8 , TOL); + BOOST_CHECK_CLOSE((FValue)quot[n1],-0.1 , TOL); + +} + +BOOST_AUTO_TEST_CASE(l1norm) +{ + FVector f1(3); + FName n1("a"); + f1[0] = 1.5; f1[1] = 2.1; f1[2] = 4; f1[n1] = -0.5; + FValue n = f1.l1norm(); + BOOST_CHECK_CLOSE((FValue)n, abs(1.5)+abs(2.1)+abs(4)+abs(-0.5), TOL); +} + + +BOOST_AUTO_TEST_CASE(sum) +{ + FVector f1(3); + FName n1("a"); + FName n2("b"); + f1[0] = 1.5; f1[1] = 2.1; f1[2] = 4; f1[n1] = -0.5; f1[n2] = 2.7; + FValue n = f1.sum(); + BOOST_CHECK_CLOSE((FValue)n, 1.5+2.1+4-0.5+2.7, TOL); +} + +BOOST_AUTO_TEST_CASE(l2norm) +{ + FVector f1(3); + FName n1("a"); + f1[0] = 1.5; f1[1] = 2.1; f1[2] = 4; f1[n1] = -0.5; + FValue n = f1.l2norm(); + BOOST_CHECK_CLOSE((FValue)n, sqrt((1.5*1.5)+(2.1*2.1)+(4*4)+(-0.5*-0.5)), TOL); +} + +BOOST_AUTO_TEST_CASE(ip) +{ + FVector f1(2); + FVector f2(2); + FName n1("a"); + FName n2("b"); + FName n3("c"); + f1[0] = 1.1; f1[1] = -0.1; ; f1[n2] = -1.5; f1[n3] = 2.2; + f2[0] = 0.5; f2[1] = 0.25; f2[n1] = 1; f2[n3] = 2.4; + FValue p1 = inner_product(f1,f2); + FValue p2 = inner_product(f2,f1); + BOOST_CHECK_CLOSE(p1,p2,TOL); + BOOST_CHECK_CLOSE((FValue)p1, 1.1*0.5 + -0.1*0.25 + 2.2*2.4, TOL); +} + + +BOOST_AUTO_TEST_SUITE_END() + diff --git a/moses/src/File.h b/moses/src/File.h index 47d25abd4..09d9ddc92 100644 --- a/moses/src/File.h +++ b/moses/src/File.h @@ -10,7 +10,7 @@ #include <cstdio> #include <iostream> #include <vector> -#include <cassert> +#include "util/check.hh" #include "UserMessage.h" #include "TypeDef.h" #include "Util.h" @@ -161,7 +161,7 @@ inline FILE* fOpen(const char* fn,const char* m) return f; else { UserMessage::Add(std::string("ERROR: could not open file ") + fn + " with mode " + m + "\n"); - assert(false); + CHECK(false); return NULL; } } diff --git a/moses/src/FloydWarshall.cpp b/moses/src/FloydWarshall.cpp index 9e495053b..e63de819b 100644 --- a/moses/src/FloydWarshall.cpp +++ b/moses/src/FloydWarshall.cpp @@ -1,4 +1,4 @@ -#include <cassert> +#include "util/check.hh" #include <climits> #include <vector> @@ -11,7 +11,7 @@ using namespace std; // All-pairs shortest path algorithm void floyd_warshall(const std::vector<std::vector<bool> >& edges, std::vector<std::vector<int> >& dist) { - assert(edges.size() == edges.front().size()); + CHECK(edges.size() == edges.front().size()); dist.clear(); dist.resize(edges.size(), std::vector<int>(edges.size(), 0)); diff --git a/moses/src/Hypothesis.cpp b/moses/src/Hypothesis.cpp index 6dd0db90c..86e2e791b 100644 --- a/moses/src/Hypothesis.cpp +++ b/moses/src/Hypothesis.cpp @@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> +#include "util/check.hh" #include <iostream> #include <limits> #include <vector> @@ -100,7 +100,7 @@ Hypothesis::Hypothesis(const Hypothesis &prevHypo, const TranslationOption &tran { // assert that we are not extending our hypothesis by retranslating something // that this hypothesis has already translated! - assert(!m_sourceCompleted.Overlap(m_currSourceWordsRange)); + CHECK(!m_sourceCompleted.Overlap(m_currSourceWordsRange)); //_hash_computed = false; m_sourceCompleted.SetValue(m_currSourceWordsRange.GetStartPos(), m_currSourceWordsRange.GetEndPos(), true); @@ -321,7 +321,7 @@ float Hypothesis::CalcExpectedScore( const SquareMatrix &futureScore ) t = clock(); // track time excluding LM } - assert(!"Need to add code to get the distortion scores"); + CHECK(!"Need to add code to get the distortion scores"); //CalcDistortionScore(); // LANGUAGE MODEL ESTIMATE (includes word penalty cost) @@ -345,7 +345,7 @@ void Hypothesis::CalcRemainingScore() clock_t t=0; // used to track time // LANGUAGE MODEL COST - assert(!"Need to add code to get the LM score(s)"); + CHECK(!"Need to add code to get the LM score(s)"); //CalcLMScore(staticData.GetAllLM()); IFVERBOSE(2) { diff --git a/moses/src/Hypothesis.h b/moses/src/Hypothesis.h index 326f1891f..fefd6e2fe 100644 --- a/moses/src/Hypothesis.h +++ b/moses/src/Hypothesis.h @@ -168,9 +168,6 @@ public: std::string GetSourcePhraseStringRep(const std::vector<FactorType> factorsToPrint) const; std::string GetTargetPhraseStringRep(const std::vector<FactorType> factorsToPrint) const; - inline const TargetPhrase GetTargetPhrase() const { - return m_targetPhrase; - } std::string GetSourcePhraseStringRep() const; std::string GetTargetPhraseStringRep() const; @@ -188,7 +185,7 @@ public: const Hypothesis *hypo = this; while (pos < hypo->GetCurrTargetWordsRange().GetStartPos()) { hypo = hypo->GetPrevHypo(); - assert(hypo != NULL); + CHECK(hypo != NULL); } return hypo->GetCurrWord(pos - hypo->GetCurrTargetWordsRange().GetStartPos()); } diff --git a/moses/src/HypothesisStackCubePruning.cpp b/moses/src/HypothesisStackCubePruning.cpp index 91de8d393..ca54bf944 100644 --- a/moses/src/HypothesisStackCubePruning.cpp +++ b/moses/src/HypothesisStackCubePruning.cpp @@ -99,7 +99,7 @@ bool HypothesisStackCubePruning::AddPrune(Hypothesis *hypo) // equiv hypo exists, recombine with other hypo iterator &iterExisting = addRet.first; Hypothesis *hypoExisting = *iterExisting; - assert(iterExisting != m_hypos.end()); + CHECK(iterExisting != m_hypos.end()); m_manager.GetSentenceStats().AddRecombination(*hypo, **iterExisting); @@ -119,7 +119,7 @@ bool HypothesisStackCubePruning::AddPrune(Hypothesis *hypo) if (!added) { iterExisting = m_hypos.find(hypo); TRACE_ERR("Offending hypo = " << **iterExisting << endl); - assert(false); + CHECK(false); } return false; } else { @@ -137,7 +137,7 @@ bool HypothesisStackCubePruning::AddPrune(Hypothesis *hypo) void HypothesisStackCubePruning::AddInitial(Hypothesis *hypo) { std::pair<iterator, bool> addRet = Add(hypo); - assert (addRet.second); + CHECK(addRet.second); const WordsBitmap &bitmap = hypo->GetWordsBitmap(); m_bitmapAccessor[bitmap] = new BitmapContainer(bitmap, *this); diff --git a/moses/src/HypothesisStackNormal.cpp b/moses/src/HypothesisStackNormal.cpp index 62393cde3..7d72f76aa 100644 --- a/moses/src/HypothesisStackNormal.cpp +++ b/moses/src/HypothesisStackNormal.cpp @@ -109,7 +109,7 @@ bool HypothesisStackNormal::AddPrune(Hypothesis *hypo) // equiv hypo exists, recombine with other hypo iterator &iterExisting = addRet.first; Hypothesis *hypoExisting = *iterExisting; - assert(iterExisting != m_hypos.end()); + CHECK(iterExisting != m_hypos.end()); m_manager.GetSentenceStats().AddRecombination(*hypo, **iterExisting); diff --git a/moses/src/Jamfile b/moses/src/Jamfile new file mode 100644 index 000000000..b6e379070 --- /dev/null +++ b/moses/src/Jamfile @@ -0,0 +1,21 @@ +alias headers : ../../util//kenutil : : : <include>. ; + +alias ThreadPool : ThreadPool.cpp ; + +if [ option.get "with-synlm" : no : yes ] = yes +{ + lib m ; + obj SyntacticLanguageModel.o : SyntacticLanguageModel.cpp headers : <include>$(TOP)/synlm/hhmm/rvtl/include <include>$(TOP)/synlm/hhmm/wsjparse/include ; + alias synlm : SyntacticLanguageModel.o m : : : <define>HAVE_SYNLM ; +} else { + alias synlm ; +} + +lib moses : +#All cpp files except those listed, and test files +[ glob *.cpp DynSAInclude/*.cpp : ThreadPool.cpp SyntacticLanguageModel.cpp *Test.cpp Mock*.cpp ] +synlm ThreadPool LM//LM headers ../..//z ../../OnDiskPt//OnDiskPt ; + +import testing ; + +unit-test moses_test : [ glob *Test.cpp Mock*.cpp ] moses ../..//boost_unit_test_framework ; diff --git a/moses/src/LM/Factory.cpp b/moses/src/LM/Factory.cpp index 42385085b..5d877e9d6 100644 --- a/moses/src/LM/Factory.cpp +++ b/moses/src/LM/Factory.cpp @@ -26,6 +26,35 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "TypeDef.h" #include "FactorCollection.h" +///////////////////////////////////////////////// +// for those using autoconf/automake +#if HAVE_CONFIG_H +#include "config.h" + +#define LM_REMOTE 1 +# ifdef HAVE_SRILM +# define LM_SRI 1 +# else +# undef LM_SRI +# endif + +# ifdef HAVE_IRSTLM +# define LM_IRST 1 +# endif + +# ifdef HAVE_RANDLM +# define LM_RAND 1 +# endif + +# ifdef HAVE_ORLM +# define LM_ORLM 1 +# endif + +# ifdef HAVE_DMAPLM +# define LM_DMAP +# endif +#endif + // include appropriate header #ifdef LM_SRI # include "LM/SRI.h" @@ -35,7 +64,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # include "LM/IRST.h" #endif #ifdef LM_RAND -# include "LM/RandLM.h" +# include "LM/Rand.h" #endif #ifdef LM_ORLM # include "LM/ORLM.h" @@ -43,9 +72,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #ifdef LM_REMOTE # include "LM/Remote.h" #endif -#ifdef LM_KEN -# include "LM/Ken.h" -#endif +#include "LM/Ken.h" #ifdef LM_DMAP # include "LM/DMapLM.h" #endif @@ -68,18 +95,13 @@ LanguageModel* CreateLanguageModel(LMImplementation lmImplementation , int dub) { if (lmImplementation == Ken || lmImplementation == LazyKen) { -#ifdef LM_KEN return ConstructKenLM(languageModelFile, factorTypes[0], lmImplementation == LazyKen); -#else - UserMessage::Add("KenLM isn't compiled in but your config asked for it"); - return NULL; -#endif } LanguageModelImplementation *lm = NULL; switch (lmImplementation) { case RandLM: #ifdef LM_RAND - lm = new LanguageModelRandLM(); + lm = NewRandLM(); #endif break; case ORLM: @@ -110,7 +132,7 @@ LanguageModel* CreateLanguageModel(LMImplementation lmImplementation break; case ParallelBackoff: #ifdef LM_SRI - lm = new LanguageModelParallelBackoff(); + lm = NewParallelBackoff(); #endif break; case DMapLM: diff --git a/moses/src/LM/IRST.cpp b/moses/src/LM/IRST.cpp index 72a83c456..692385b4d 100644 --- a/moses/src/LM/IRST.cpp +++ b/moses/src/LM/IRST.cpp @@ -19,7 +19,6 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> #include <limits> #include <iostream> #include <fstream> diff --git a/moses/src/LM/Implementation.cpp b/moses/src/LM/Implementation.cpp index ad966387d..589ed375a 100644 --- a/moses/src/LM/Implementation.cpp +++ b/moses/src/LM/Implementation.cpp @@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> +#include "util/check.hh" #include <limits> #include <iostream> #include <memory> @@ -95,12 +95,12 @@ void LanguageModelImplementation::CalcScore(const Phrase &phrase, float &fullSco } } else { ShiftOrPush(contextFactor, word); - assert(contextFactor.size() <= GetNGramOrder()); + CHECK(contextFactor.size() <= GetNGramOrder()); if (word == GetSentenceStartArray()) { // do nothing, don't include prob for <s> unigram if (currPos != 0) { - std::cerr << "Your data contains <s> in a position other than the first word." << std::endl; + std::cerr << "Either your data contains <s> in a position other than the first word or your language model is missing <s>. Did you build your ARPA using IRSTLM and forget to run add-start-end.sh?" << std::endl; abort(); } } else { @@ -264,7 +264,7 @@ private: */ size_t CalcSuffix(const ChartHypothesis &hypo, int featureID, Phrase &ret, size_t size) const { - assert(m_contextPrefix.GetSize() <= m_numTargetTerminals); + CHECK(m_contextPrefix.GetSize() <= m_numTargetTerminals); // special handling for small hypotheses // does the prefix match the entire hypothesis string? -> just copy prefix @@ -310,8 +310,8 @@ private: public: LanguageModelChartState(const ChartHypothesis &hypo, int featureID, size_t order) :m_lmRightContext(NULL) - ,m_contextPrefix(Output, order - 1) - ,m_contextSuffix(Output, order - 1) + ,m_contextPrefix(order - 1) + ,m_contextSuffix( order - 1) ,m_hypo(hypo) { m_numTargetTerminals = hypo.GetCurrTargetPhrase().GetNumTerminals(); @@ -407,7 +407,7 @@ FFState* LanguageModelImplementation::EvaluateChart(const ChartHypothesis& hypo, // beginning of sentence symbol <s>? -> just update state if (word == GetSentenceStartArray()) { - assert(phrasePos == 0); + CHECK(phrasePos == 0); delete lmState; lmState = NewState( GetBeginSentenceState() ); } diff --git a/moses/src/LM/Jamfile b/moses/src/LM/Jamfile new file mode 100644 index 000000000..2f3cde8ef --- /dev/null +++ b/moses/src/LM/Jamfile @@ -0,0 +1,84 @@ +import option path build-system ; + +local dependencies = ; + +local with-irstlm = [ option.get "with-irstlm" ] ; +if $(with-irstlm) { + lib irstlm : : <search>$(with-irstlm)/lib ; + obj IRST.o : IRST.cpp ..//headers : <include>$(with-irstlm)/include ; + alias irst : IRST.o irstlm : : : <define>LM_IRST ; + dependencies += irst ; + echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; + echo "!!! You are linking the IRSTLM library; be sure the release is >= 5.70.02 !!!" ; + echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; +} + +local with-srilm = [ option.get "with-srilm" ] ; +if $(with-srilm) { + if [ option.get "with-srilm-dynamic" : no : yes ] = yes { + alias sri-libs : srilm ; + } else { + sri-arch = [ option.get "with-srilm-arch" ] ; + sri-arch ?= [ _shell $(with-srilm)/sbin/machine-type ] ; + sri-lib = <search>$(with-srilm)/lib/$(sri-arch) <search>$(with-srilm)/flm/obj/$(sri-arch) ; + + lib flm : : $(sri-lib) ; + lib misc : flm : $(sri-lib) ; + lib dstruct : misc flm : $(sri-lib) ; + lib oolm : dstruct misc flm : $(sri-lib) ; + + alias sri-libs : oolm dstruct misc flm ; + } + + obj SRI.o : SRI.cpp ..//headers : <include>$(with-srilm)/include <warnings>off ; + obj ParallelBackoff.o : ParallelBackoff.cpp ..//headers : <include>$(with-srilm)/include <warnings>off ; + alias sri : SRI.o ParallelBackoff.o sri-libs : : : <define>LM_SRI ; + dependencies += sri ; +} + +local with-randlm = [ option.get "with-randlm" ] ; +if $(with-randlm) { + lib randlm : : <search>$(with-randlm)/lib ; + obj Rand.o : Rand.cpp randlm ..//headers : <include>$(with-randlm)/include ; + alias rand : Rand.o : : : <define>LM_RAND ; + dependencies += rand ; +} + +obj Factory.o : Factory.cpp ..//headers $(dependencies) ; + +lib LM : Base.cpp Factory.o Implementation.cpp Joint.cpp Ken.cpp MultiFactor.cpp Remote.cpp SingleFactor.cpp + ../../../lm//kenlm ..//headers $(dependencies) ; + +#Huge kludge to force building if different --with options are passed. +#Could have used features like <srilm>on but getting these to apply only to linking was ugly and it still didn't trigger an install (since the install path doesn't encode features). +path-constant LM-LOG : bin/lm.log ; +#Is there no other way to read a file with bjam? +local previous = none ; +if [ path.exists $(LM-LOG) ] { + previous = [ _shell "cat $(LM-LOG)" ] ; +} +current = "" ; +for local i in srilm irstlm randlm { + local optval = [ option.get "with-$(i)" ] ; + if $(optval) { + current = "$(current) --with-$(i)=$(optval)" ; + } +} + +if $(current) != $(previous) { + #Write inconsistent while the build is running + if [ path.exists $(LM-LOG) ] { + local ignored = @($(LM-LOG):E=inconsistent) ; + } + #Write $(current) to $(LM-LOG) after the build completes. + rule post-build ( ok ? ) { + if $(ok) { + local ignored = @($(LM-LOG):E=$(current)) ; + } + } + IMPORT $(__name__) : post-build : : $(__name__).post-build ; + build-system.set-post-build-hook $(__name__).post-build ; + + always Factory.o ; + always LM ; +} diff --git a/moses/src/LM/Ken.cpp b/moses/src/LM/Ken.cpp index cf19f3376..c5307ffc0 100644 --- a/moses/src/LM/Ken.cpp +++ b/moses/src/LM/Ken.cpp @@ -19,7 +19,6 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> #include <cstring> #include <iostream> #include <memory> @@ -197,7 +196,7 @@ template <class Model> void LanguageModelKen<Model>::CalcScore(const Phrase &phr } else { lm::WordIndex index = TranslateID(word); if (index == m_ngram->GetVocabulary().BeginSentence()) { - std::cerr << "Your data contains <s> in a position other than the first word." << std::endl; + std::cerr << "Either your data contains <s> in a position other than the first word or your language model is missing <s>. Did you build your ARPA using IRSTLM and forget to run add-start-end.sh?" << std::endl; abort(); } float score = TransformLMScore(m_ngram->Score(*state0, index, *state1)); diff --git a/moses/src/LM/ORLM.cpp b/moses/src/LM/ORLM.cpp index 4fb365ff8..30f3ada55 100644 --- a/moses/src/LM/ORLM.cpp +++ b/moses/src/LM/ORLM.cpp @@ -1,4 +1,3 @@ -#include <cassert> #include <limits> #include <iostream> #include <fstream> @@ -22,7 +21,6 @@ bool LanguageModelORLM::Load(const std::string &filePath, FactorType factorType, m_lm = new OnlineRLM<T>(&fLmIn, m_nGramOrder); fLmIn.close(); //m_lm = new MultiOnlineRLM<T>(m_filePath, m_nGramOrder); - assert(m_lm != NULL); // get special word ids m_oov_id = m_lm->vocab_->GetWordID("<unk>"); CreateFactors(); diff --git a/moses/src/LM/ParallelBackoff.cpp b/moses/src/LM/ParallelBackoff.cpp index 70638d465..ec2fb2f78 100644 --- a/moses/src/LM/ParallelBackoff.cpp +++ b/moses/src/LM/ParallelBackoff.cpp @@ -20,21 +20,71 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ #include "LM/ParallelBackoff.h" -#include "File.h" + +#include <vector> +#include <string> +#include <sstream> +#include <fstream> + +#include "LM/MultiFactor.h" +#include "Word.h" +#include "Factor.h" +#include "FactorTypeSet.h" +#include "FactorCollection.h" +#include "Phrase.h" #include "TypeDef.h" #include "Util.h" + #include "FNgramSpecs.h" #include "FNgramStats.h" #include "FactoredVocab.h" #include "FNgram.h" #include "wmatrix.h" #include "Vocab.h" +#include "File.h" using namespace std; namespace Moses { +namespace +{ +class LanguageModelParallelBackoff : public LanguageModelMultiFactor +{ +private: + std::vector<FactorType> m_factorTypesOrdered; + + FactoredVocab *m_srilmVocab; + FNgram *m_srilmModel; + VocabIndex m_unknownId; + VocabIndex m_wtid; + VocabIndex m_wtbid; + VocabIndex m_wteid; + FNgramSpecs<FNgramCount>* fnSpecs; + //std::vector<VocabIndex> m_lmIdLookup; + std::map<size_t, VocabIndex>* lmIdMap; + std::fstream* debugStream; + + WidMatrix *widMatrix; + +public: + ~LanguageModelParallelBackoff(); + + bool Load(const std::string &filePath, const std::vector<FactorType> &factorTypes, size_t nGramOrder); + + VocabIndex GetLmID( const std::string &str ) const; + + VocabIndex GetLmID( const Factor *factor, FactorType ft ) const; + + void CreateFactors(); + + LMResult GetValueForgotState(const std::vector<const Word*> &contextFactor, FFState &outState) const; + const FFState *GetNullContextState() const; + const FFState *GetBeginSentenceState() const; + FFState *NewState(const FFState *from) const; +}; + LanguageModelParallelBackoff::~LanguageModelParallelBackoff() { /// @@ -67,7 +117,6 @@ bool LanguageModelParallelBackoff::Load(const std::string &filePath, const std:: cerr << "Factored stats\n"; FNgram* fngramLM = new FNgram(*m_srilmVocab,*fnSpecs); - assert(fngramLM != 0); cerr << "FNgram object created\n"; @@ -295,5 +344,12 @@ const FFState *LanguageModelParallelBackoff::GetBeginSentenceState() const { return NULL; } + +} + +LanguageModelMultiFactor *NewParallelBackoff() { + return new LanguageModelParallelBackoff(); +} + } diff --git a/moses/src/LM/ParallelBackoff.h b/moses/src/LM/ParallelBackoff.h index fc39a8dcf..8e4241395 100644 --- a/moses/src/LM/ParallelBackoff.h +++ b/moses/src/LM/ParallelBackoff.h @@ -21,72 +21,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #pragma once -#include <vector> -#include <string> -#include <sstream> -#include <fstream> - -#include "LM/MultiFactor.h" -#include "Word.h" -#include "Factor.h" -#include "FactorTypeSet.h" -#include "FactorCollection.h" -#include "Phrase.h" - -#include "FNgramStats.h" -#include "FactoredVocab.h" -#include "FNgram.h" -#include "wmatrix.h" -#include "Vocab.h" - -using namespace std; - -//class FactoredVocab; -//class FNgram; -//class WidMatrix; - - namespace Moses { -/** LM of multiple factors. A simple extension of single factor LM - factors backoff together. - * Rather slow as this uses string concatenation/split -*/ -class LanguageModelParallelBackoff : public LanguageModelMultiFactor -{ -private: - std::vector<FactorType> m_factorTypesOrdered; - - FactoredVocab *m_srilmVocab; - FNgram *m_srilmModel; - VocabIndex m_unknownId; - VocabIndex m_wtid; - VocabIndex m_wtbid; - VocabIndex m_wteid; - FNgramSpecs<FNgramCount>* fnSpecs; - //std::vector<VocabIndex> m_lmIdLookup; - std::map<size_t, VocabIndex>* lmIdMap; - std::fstream* debugStream; - - WidMatrix *widMatrix; - -public: - LanguageModelParallelBackoff(){} - - ~LanguageModelParallelBackoff(); - bool Load(const std::string &filePath, const std::vector<FactorType> &factorTypes, size_t nGramOrder); - - VocabIndex GetLmID( const std::string &str ) const; - - VocabIndex GetLmID( const Factor *factor, FactorType ft ) const; - - void CreateFactors(); - - LMResult GetValueForgotState(const std::vector<const Word*> &contextFactor, FFState &outState) const; - const FFState *GetNullContextState() const; - const FFState *GetBeginSentenceState() const; - FFState *NewState(const FFState *from) const; +class LanguageModelMultiFactor; -}; +LanguageModelMultiFactor *NewParallelBackoff(); } diff --git a/moses/src/LM/RandLM.cpp b/moses/src/LM/Rand.cpp index de03ea58d..93411b8d3 100644 --- a/moses/src/LM/RandLM.cpp +++ b/moses/src/LM/Rand.cpp @@ -17,21 +17,62 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> +#include "util/check.hh" #include <limits> #include <iostream> #include <fstream> +#include <string> +#include <vector> +#include "Factor.h" +#include "Util.h" +#include "LM/SingleFactor.h" +#include "RandLM.h" -#include "LM/RandLM.h" + +#include "LM/Rand.h" #include "FactorCollection.h" #include "Phrase.h" #include "InputFileStream.h" #include "StaticData.h" + namespace Moses { +namespace +{ using namespace std; +class LanguageModelRandLM : public LanguageModelPointerState +{ +public: + LanguageModelRandLM() + : m_lm(0) {} + bool Load(const std::string &filePath, FactorType factorType, size_t nGramOrder); + virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = NULL) const; + ~LanguageModelRandLM() { + delete m_lm; + } + void CleanUpAfterSentenceProcessing() { + m_lm->clearCaches(); // clear caches + } + void InitializeBeforeSentenceProcessing() { + m_lm->initThreadSpecificData(); // Creates thread specific data iff + // compiled with multithreading. + } +protected: + std::vector<randlm::WordID> m_randlm_ids_vec; + randlm::RandLM* m_lm; + randlm::WordID m_oov_id; + void CreateFactors(FactorCollection &factorCollection); + randlm::WordID GetLmID( const std::string &str ) const; + randlm::WordID GetLmID( const Factor *factor ) const { + size_t factorId = factor->GetId(); + return ( factorId >= m_randlm_ids_vec.size()) ? m_oov_id : m_randlm_ids_vec[factorId]; + }; + +}; + + bool LanguageModelRandLM::Load(const std::string &filePath, FactorType factorType, size_t nGramOrder) { @@ -42,7 +83,7 @@ bool LanguageModelRandLM::Load(const std::string &filePath, FactorType factorTyp m_nGramOrder = nGramOrder; int cache_MB = 50; // increase cache size m_lm = randlm::RandLM::initRandLM(filePath, nGramOrder, cache_MB); - assert(m_lm != NULL); + CHECK(m_lm != NULL); // get special word ids m_oov_id = m_lm->getWordID(m_lm->getOOV()); CreateFactors(factorCollection); @@ -115,4 +156,9 @@ LMResult LanguageModelRandLM::GetValue(const vector<const Word*> &contextFactor, } +LanguageModelPointerState *NewRandLM() { + return new LanguageModelRandLM(); +} + +} diff --git a/moses/src/LM/Rand.h b/moses/src/LM/Rand.h new file mode 100644 index 000000000..c4ef99947 --- /dev/null +++ b/moses/src/LM/Rand.h @@ -0,0 +1,30 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2006 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + +#ifndef moses_LM_Rand_h +#define moses_LM_Rand_h + +namespace Moses +{ +class LanguageModelPointerState; +LanguageModelPointerState *NewRandLM(); + +} + +#endif diff --git a/moses/src/LM/RandLM.h b/moses/src/LM/RandLM.h deleted file mode 100644 index 13aefb311..000000000 --- a/moses/src/LM/RandLM.h +++ /dev/null @@ -1,70 +0,0 @@ -/*********************************************************************** -Moses - factored phrase-based language decoder -Copyright (C) 2006 University of Edinburgh - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -***********************************************************************/ - -#ifndef moses_LanguageModelRandLM_h -#define moses_LanguageModelRandLM_h - -#include <string> -#include <vector> -#include "Factor.h" -#include "Util.h" -#include "LM/SingleFactor.h" -#include "RandLM.h" - -class randlm::RandLM; - -namespace Moses -{ -class Factor; -class Phrase; - -// RandLM wrapper (single factor LM) - -class LanguageModelRandLM : public LanguageModelPointerState -{ -public: - LanguageModelRandLM() : m_lm(0) {} - bool Load(const std::string &filePath, FactorType factorType, size_t nGramOrder); - virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = NULL) const; - ~LanguageModelRandLM() { - delete m_lm; - } - void CleanUpAfterSentenceProcessing() { - m_lm->clearCaches(); // clear caches - } - void InitializeBeforeSentenceProcessing() { - m_lm->initThreadSpecificData(); // Creates thread specific data iff - // compiled with multithreading. - } -protected: - std::vector<randlm::WordID> m_randlm_ids_vec; - randlm::RandLM* m_lm; - randlm::WordID m_oov_id; - void CreateFactors(FactorCollection &factorCollection); - randlm::WordID GetLmID( const std::string &str ) const; - randlm::WordID GetLmID( const Factor *factor ) const { - size_t factorId = factor->GetId(); - return ( factorId >= m_randlm_ids_vec.size()) ? m_oov_id : m_randlm_ids_vec[factorId]; - }; - -}; - -} - -#endif diff --git a/moses/src/LM/SRI.cpp b/moses/src/LM/SRI.cpp index 0c93af279..9c5a9c3d4 100644 --- a/moses/src/LM/SRI.cpp +++ b/moses/src/LM/SRI.cpp @@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> +#include "util/check.hh" #include <limits> #include <iostream> #include <fstream> @@ -31,6 +31,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "Phrase.h" #include "StaticData.h" +#include "Vocab.h" +#include "Ngram.h" + using namespace std; namespace Moses @@ -149,7 +152,7 @@ LMResult LanguageModelSRI::GetValue(const vector<const Word*> &contextFactor, St } ngram[count] = Vocab_None; - assert((*contextFactor[count-1])[factorType] != NULL); + CHECK((*contextFactor[count-1])[factorType] != NULL); // call sri lm fn VocabIndex lmId = GetLmID((*contextFactor[count-1])[factorType]); ret = GetValue(lmId, ngram+1); diff --git a/moses/src/LM/SRI.h b/moses/src/LM/SRI.h index 19932b9c9..69d55f117 100644 --- a/moses/src/LM/SRI.h +++ b/moses/src/LM/SRI.h @@ -26,12 +26,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <vector> #include "Factor.h" #include "TypeDef.h" -#include "Vocab.h" -#include "Ngram.h" #include "LM/SingleFactor.h" class Factor; class Phrase; +class Vocab; +class Ngram; namespace Moses { @@ -39,15 +39,15 @@ namespace Moses class LanguageModelSRI : public LanguageModelPointerState { protected: - std::vector<VocabIndex> m_lmIdLookup; + std::vector<unsigned int> m_lmIdLookup; ::Vocab *m_srilmVocab; Ngram *m_srilmModel; - VocabIndex m_unknownId; + unsigned int m_unknownId; - LMResult GetValue(VocabIndex wordId, VocabIndex *context) const; + LMResult GetValue(unsigned int wordId, unsigned int *context) const; void CreateFactors(); - VocabIndex GetLmID( const std::string &str ) const; - VocabIndex GetLmID( const Factor *factor ) const; + unsigned int GetLmID( const std::string &str ) const; + unsigned int GetLmID( const Factor *factor ) const; public: LanguageModelSRI(); diff --git a/moses/src/LM/SingleFactor.cpp b/moses/src/LM/SingleFactor.cpp index 10f76ac00..73c9e6e83 100644 --- a/moses/src/LM/SingleFactor.cpp +++ b/moses/src/LM/SingleFactor.cpp @@ -19,7 +19,6 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> #include <limits> #include <iostream> #include <sstream> diff --git a/moses/src/LVoc.h b/moses/src/LVoc.h index 3380c4b62..ec20fe3cd 100644 --- a/moses/src/LVoc.h +++ b/moses/src/LVoc.h @@ -37,11 +37,11 @@ public: std::pair<typename M::iterator,bool> p =m.insert(std::make_pair(k,data.size())); if(p.second) data.push_back(k); - assert(static_cast<size_t>(p.first->second)<data.size()); + CHECK(static_cast<size_t>(p.first->second)<data.size()); return p.first->second; } Key const& symbol(LabelId i) const { - assert(static_cast<size_t>(i)<data.size()); + CHECK(static_cast<size_t>(i)<data.size()); return data[i]; } diff --git a/moses/src/LexicalReordering.cpp b/moses/src/LexicalReordering.cpp index 91affd7d8..b32b96b0d 100644 --- a/moses/src/LexicalReordering.cpp +++ b/moses/src/LexicalReordering.cpp @@ -72,7 +72,7 @@ LexicalReordering::~LexicalReordering() Scores LexicalReordering::GetProb(const Phrase& f, const Phrase& e) const { - return m_table->GetScore(f, e, Phrase(Output, ARRAY_SIZE_INCR)); + return m_table->GetScore(f, e, Phrase(ARRAY_SIZE_INCR)); } FFState* LexicalReordering::Evaluate(const Hypothesis& hypo, diff --git a/moses/src/LexicalReordering.h b/moses/src/LexicalReordering.h index 71c225062..e979b5bf5 100644 --- a/moses/src/LexicalReordering.h +++ b/moses/src/LexicalReordering.h @@ -51,7 +51,7 @@ public: virtual FFState* EvaluateChart(const ChartHypothesis&, int /* featureID */, ScoreComponentCollection*) const { - assert(0); // not valid for chart decoder + CHECK(0); // not valid for chart decoder return NULL; } diff --git a/moses/src/LexicalReorderingState.cpp b/moses/src/LexicalReorderingState.cpp index fb1de0e81..346ac745b 100644 --- a/moses/src/LexicalReorderingState.cpp +++ b/moses/src/LexicalReorderingState.cpp @@ -1,7 +1,7 @@ #include <vector> #include <string> -#include <cassert> +#include "util/check.hh" #include "FFState.h" #include "Hypothesis.h" @@ -126,7 +126,7 @@ LexicalReorderingState *LexicalReorderingConfiguration::CreateLexicalReorderingS void LexicalReorderingState::CopyScores(Scores& scores, const TranslationOption &topt, ReorderingType reoType) const { // don't call this on a bidirectional object - assert(m_direction == LexicalReorderingConfiguration::Backward || m_direction == LexicalReorderingConfiguration::Forward); + CHECK(m_direction == LexicalReorderingConfiguration::Backward || m_direction == LexicalReorderingConfiguration::Forward); const Scores *cachedScores = (m_direction == LexicalReorderingConfiguration::Backward) ? topt.GetCachedScores(m_configuration.GetScoreProducer()) : m_prevScore; @@ -188,7 +188,7 @@ int PhraseBasedReorderingState::Compare(const FFState& o) const return 0; const PhraseBasedReorderingState* other = dynamic_cast<const PhraseBasedReorderingState*>(&o); - assert(other != NULL); + CHECK(other != NULL); if (m_prevRange == other->m_prevRange) { if (m_direction == LexicalReorderingConfiguration::Forward) { return ComparePrevScores(other->m_prevScore); @@ -405,7 +405,7 @@ int HierarchicalReorderingForwardState::Compare(const FFState& o) const return 0; const HierarchicalReorderingForwardState* other = dynamic_cast<const HierarchicalReorderingForwardState*>(&o); - assert(other != NULL); + CHECK(other != NULL); if (m_prevRange == other->m_prevRange) { return ComparePrevScores(other->m_prevScore); } else if (m_prevRange < other->m_prevRange) { diff --git a/moses/src/LexicalReorderingTable.cpp b/moses/src/LexicalReorderingTable.cpp index a4735d64d..00be0a495 100644 --- a/moses/src/LexicalReorderingTable.cpp +++ b/moses/src/LexicalReorderingTable.cpp @@ -258,7 +258,7 @@ Scores LexicalReorderingTableTree::GetScore(const Phrase& f, const Phrase& e, co } if(m_FactorsC.empty()) { - assert(1 == cands.size()); + CHECK(1 == cands.size()); return cands[0].GetScore(0); } else { score = auxFindScoreForContext(cands, c); @@ -273,7 +273,7 @@ Scores LexicalReorderingTableTree::GetScore(const Phrase& f, const Phrase& e, co Scores LexicalReorderingTableTree::auxFindScoreForContext(const Candidates& cands, const Phrase& context) { if(m_FactorsC.empty()) { - assert(cands.size() <= 1); + CHECK(cands.size() <= 1); return (1 == cands.size())?(cands[0].GetScore(0)):(Scores()); } else { std::vector<std::string> cvec; @@ -380,7 +380,7 @@ bool LexicalReorderingTableTree::Create(std::istream& inFile, } } else { //sanity check ALL lines must have same number of tokens - assert(numTokens == tokens.size()); + CHECK(numTokens == tokens.size()); } int phrase = 0; for(; phrase < numKeyTokens; ++phrase) { @@ -424,7 +424,7 @@ bool LexicalReorderingTableTree::Create(std::istream& inFile, if(currKey.empty()) { currKey = key; //insert key into tree - assert(psa); + CHECK(psa); PSA::Data& d = psa->insert(key); if(d == InvalidOffT) { d = fTell(ot); @@ -454,7 +454,7 @@ bool LexicalReorderingTableTree::Create(std::istream& inFile, currFirstWord = key[0]; } //c) insert key into tree - assert(psa); + CHECK(psa); PSA::Data& d = psa->insert(key); if(d == InvalidOffT) { d = fTell(ot); @@ -571,8 +571,8 @@ void LexicalReorderingTableTree::auxCacheForSrcPhrase(const Phrase& f) if(m_FactorsE.empty()) { //f is all of key... Candidates cands; - m_Table->GetCandidates(MakeTableKey(f,Phrase(Output, ARRAY_SIZE_INCR)),&cands); - m_Cache[MakeCacheKey(f,Phrase(Output, ARRAY_SIZE_INCR))] = cands; + m_Table->GetCandidates(MakeTableKey(f,Phrase(ARRAY_SIZE_INCR)),&cands); + m_Cache[MakeCacheKey(f,Phrase(ARRAY_SIZE_INCR))] = cands; } else { ObjectPool<PPimp> pool; PPimp* pPos = m_Table->GetRoot(); diff --git a/moses/src/Manager.cpp b/moses/src/Manager.cpp index c9fa34307..8d4f306e6 100644 --- a/moses/src/Manager.cpp +++ b/moses/src/Manager.cpp @@ -232,7 +232,7 @@ void Manager::CalcNBest(size_t count, TrellisPathList &ret,bool onlyDistinct) co for (size_t iteration = 0 ; (onlyDistinct ? distinctHyps.size() : ret.GetSize()) < count && contenders.GetSize() > 0 && (iteration < count * nBestFactor) ; iteration++) { // get next best from list of contenders TrellisPath *path = contenders.pop(); - assert(path); + CHECK(path); // create deviations from current best path->CreateDeviantPaths(contenders); if(onlyDistinct) { @@ -304,11 +304,11 @@ void Manager::CalcLatticeSamples(size_t count, TrellisPathList &ret) const { //forward from current if (i->forward >= 0) { map<int,const Hypothesis*>::const_iterator idToHypIter = idToHyp.find(i->forward); - assert(idToHypIter != idToHyp.end()); + CHECK(idToHypIter != idToHyp.end()); const Hypothesis* nextHypo = idToHypIter->second; outgoingHyps[hypo].insert(nextHypo); map<int,float>::const_iterator fscoreIter = fscores.find(nextHypo->GetId()); - assert(fscoreIter != fscores.end()); + CHECK(fscoreIter != fscores.end()); edgeScores[Edge(hypo->GetId(),nextHypo->GetId())] = i->fscore - fscoreIter->second; } @@ -325,15 +325,15 @@ void Manager::CalcLatticeSamples(size_t count, TrellisPathList &ret) const { map<const Hypothesis*, set<const Hypothesis*> >::const_iterator outIter = outgoingHyps.find(i->hypo); - assert(outIter != outgoingHyps.end()); + CHECK(outIter != outgoingHyps.end()); float sigma = 0; for (set<const Hypothesis*>::const_iterator j = outIter->second.begin(); j != outIter->second.end(); ++j) { map<const Hypothesis*, float>::const_iterator succIter = sigmas.find(*j); - assert(succIter != sigmas.end()); + CHECK(succIter != sigmas.end()); map<Edge,float>::const_iterator edgeScoreIter = edgeScores.find(Edge(i->hypo->GetId(),(*j)->GetId())); - assert(edgeScoreIter != edgeScores.end()); + CHECK(edgeScoreIter != edgeScores.end()); float term = edgeScoreIter->second + succIter->second; // Add sigma(*j) if (sigma == 0) { sigma = term; @@ -347,7 +347,7 @@ void Manager::CalcLatticeSamples(size_t count, TrellisPathList &ret) const { //The actual sampling! const Hypothesis* startHypo = searchGraph.back().hypo; - assert(startHypo->GetId() == 0); + CHECK(startHypo->GetId() == 0); for (size_t i = 0; i < count; ++i) { vector<const Hypothesis*> path; path.push_back(startHypo); @@ -365,9 +365,9 @@ void Manager::CalcLatticeSamples(size_t count, TrellisPathList &ret) const { for (set<const Hypothesis*>::const_iterator j = outIter->second.begin(); j != outIter->second.end(); ++j) { candidates.push_back(*j); - assert(sigmas.find(*j) != sigmas.end()); + CHECK(sigmas.find(*j) != sigmas.end()); Edge edge(path.back()->GetId(),(*j)->GetId()); - assert(edgeScores.find(edge) != edgeScores.end()); + CHECK(edgeScores.find(edge) != edgeScores.end()); candidateScores.push_back(sigmas[*j] + edgeScores[edge]); if (scoreTotal == 0) { scoreTotal = candidateScores.back(); @@ -874,7 +874,7 @@ void Manager::SerializeSearchGraphPB( ArcList::const_iterator iterArcList; for (iterArcList = arcList->begin() ; iterArcList != arcList->end() ; ++iterArcList) { const Hypothesis *loserHypo = *iterArcList; - assert(connected[loserHypo->GetId()]); + CHECK(connected[loserHypo->GetId()]); Hypergraph_Edge* edge = hg.add_edges(); SerializeEdgeInfo(loserHypo, edge); edge->set_head_node(headNodeIdx); diff --git a/moses/src/MockHypothesis.cpp b/moses/src/MockHypothesis.cpp new file mode 100644 index 000000000..0afd3b071 --- /dev/null +++ b/moses/src/MockHypothesis.cpp @@ -0,0 +1,102 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2010 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + + + +#include "MockHypothesis.h" + +#include <boost/test/unit_test.hpp> + +#include "TranslationOption.h" + +using namespace Moses; +using namespace std; + +namespace MosesTest { + + +MockHypothesisGuard::MockHypothesisGuard( + const string& sourceSentence, + const vector<Alignment>& alignments, + const vector<string>& targetSegments) +: m_emptyTarget(), + m_sentence(), + m_system("mock",&m_wp,&m_uwp,&m_dist), + m_manager(m_sentence,Normal,&m_system) +{ + BOOST_CHECK_EQUAL(alignments.size(), targetSegments.size()); + + std::vector<Moses::FactorType> factors; + factors.push_back(0); + + stringstream in(sourceSentence + "\n"); + m_sentence.Read(in,factors); + + + //Initial empty hypothesis + m_manager.ResetSentenceStats(m_sentence); + m_hypothesis = Hypothesis::Create(m_manager, m_sentence, m_emptyTarget); + + //create the chain + vector<Alignment>::const_iterator ai = alignments.begin(); + vector<string>::const_iterator ti = targetSegments.begin(); + for (; ti != targetSegments.end() && ai != alignments.end(); ++ti,++ai) + { + Hypothesis* prevHypo = m_hypothesis; + WordsRange wordsRange(ai->first,ai->second); + m_targetPhrases.push_back(TargetPhrase()); + m_targetPhrases.back().CreateFromString(factors,*ti,"|"); + m_toptions.push_back(new TranslationOption + (wordsRange,m_targetPhrases.back(),m_sentence)); + m_hypothesis = Hypothesis::Create(*prevHypo,*m_toptions.back(),NULL); + } + + +} + +MockHypothesisGuard::~MockHypothesisGuard() +{ + RemoveAllInColl(m_toptions); + while (m_hypothesis) { + Hypothesis* prevHypo = const_cast<Hypothesis*>(m_hypothesis->GetPrevHypo()); + delete m_hypothesis; + m_hypothesis = prevHypo; + } +} + +HypothesisFixture::HypothesisFixture() +{ + string source = "je ne sais pas . "; + vector<string> target; + vector<Alignment> alignments; + m_empty.reset(new MockHypothesisGuard(source,alignments,target)); + target.push_back("i"); + target.push_back("do not"); + alignments.push_back(Alignment(0,0)); + alignments.push_back(Alignment(3,3)); + m_partial.reset(new MockHypothesisGuard(source,alignments,target)); + target.push_back("know"); + target.push_back("."); + alignments.push_back(Alignment(1,2)); + alignments.push_back(Alignment(4,4)); + m_full.reset(new MockHypothesisGuard(source,alignments,target)); +} + +} + diff --git a/moses/src/MockHypothesis.h b/moses/src/MockHypothesis.h new file mode 100644 index 000000000..41f118f40 --- /dev/null +++ b/moses/src/MockHypothesis.h @@ -0,0 +1,83 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2010 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + +#ifndef _MOCK_HYPOTHESIS_ +#define _MOCK_HYPOTHESIS_ + +#include <memory> +#include <vector> + + +#include "DummyScoreProducers.h" +#include "Hypothesis.h" +#include "Manager.h" +#include "TranslationSystem.h" + +namespace MosesTest { + +// +// Construct a hypothesis with arbitrary source and target phrase +// sequences. Useful for testing feature functions. +// + +typedef std::pair<size_t,size_t> Alignment; //(first,last) in source + +class MockHypothesisGuard { + public: + /** Creates a phrase-based hypothesis. + */ + MockHypothesisGuard( + const std::string& sourceSentence, + const std::vector<Alignment>& alignments, + const std::vector<std::string>& targetSegments); + Moses::Hypothesis* operator*() const {return m_hypothesis;} + + /** Destroy the hypothesis chain */ + ~MockHypothesisGuard(); + + private: + Moses::TargetPhrase m_emptyTarget; + Moses::Sentence m_sentence; + Moses::WordPenaltyProducer m_wp; + Moses::UnknownWordPenaltyProducer m_uwp; + Moses::DistortionScoreProducer m_dist; + Moses::TranslationSystem m_system; + Moses::Manager m_manager; + Moses::Hypothesis* m_hypothesis; + std::vector<Moses::TargetPhrase> m_targetPhrases; + std::vector<Moses::TranslationOption*> m_toptions; +}; + +class HypothesisFixture { + public: + HypothesisFixture(); + const Moses::Hypothesis* empty() {return **m_empty;} + const Moses::Hypothesis* partial() {return **m_partial;} + const Moses::Hypothesis* full() {return **m_full;} + + private: + std::auto_ptr<MockHypothesisGuard> m_empty; + std::auto_ptr<MockHypothesisGuard> m_partial; + std::auto_ptr<MockHypothesisGuard> m_full; +}; + + +} + +#endif diff --git a/moses/src/MosesTest.cpp b/moses/src/MosesTest.cpp new file mode 100644 index 000000000..45f5bdba4 --- /dev/null +++ b/moses/src/MosesTest.cpp @@ -0,0 +1,24 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2010 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + + +//Supplies the main for the moses test module +#define BOOST_TEST_MODULE moses +#include <boost/test/unit_test.hpp> + diff --git a/moses/src/PDTAimp.h b/moses/src/PDTAimp.h index ca540d285..5ded31408 100644 --- a/moses/src/PDTAimp.h +++ b/moses/src/PDTAimp.h @@ -101,7 +101,7 @@ public: } void CleanUp() { - assert(m_dict); + CHECK(m_dict); m_dict->FreeMemory(); for(size_t i=0; i<m_tgtColls.size(); ++i) delete m_tgtColls[i]; m_tgtColls.clear(); @@ -110,25 +110,10 @@ public: uniqSrcPhr.clear(); } - void AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase) { - std::cerr << "AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase)" << std::endl; - assert(GetTargetPhraseCollection(source)==0); - - VERBOSE(2, "adding unk source phrase "<<source<<"\n"); - std::pair<MapSrc2Tgt::iterator,bool> p - =m_cache.insert(std::make_pair(source,static_cast<TargetPhraseCollection const*>(0))); - if(p.second || p.first->second==0) { - TargetPhraseCollection *ptr=new TargetPhraseCollection; - ptr->Add(new TargetPhrase(targetPhrase)); - p.first->second=ptr; - m_tgtColls.push_back(ptr); - } else VERBOSE(2, "WARNING: you added an already existing phrase!\n"); - } - TargetPhraseCollection const* GetTargetPhraseCollection(Phrase const &src) const { - assert(m_dict); + CHECK(m_dict); if(src.GetSize()==0) return 0; std::pair<MapSrc2Tgt::iterator,bool> piter; @@ -245,11 +230,11 @@ public: std::vector<float> scores; Phrase src; - State() : range(0,0),scores(0),src(Input, ARRAY_SIZE_INCR) {} + State() : range(0,0),scores(0),src(ARRAY_SIZE_INCR) {} State(Position b,Position e,const PPtr& v,const std::vector<float>& sv=std::vector<float>(0)) - : ptr(v),range(b,e),scores(sv),src(Input, ARRAY_SIZE_INCR) {} + : ptr(v),range(b,e),scores(sv),src(ARRAY_SIZE_INCR) {} State(Range const& r,const PPtr& v,const std::vector<float>& sv=std::vector<float>(0)) - : ptr(v),range(r),scores(sv),src(Input, ARRAY_SIZE_INCR) {} + : ptr(v),range(r),scores(sv),src(ARRAY_SIZE_INCR) {} Position begin() const { return range.first; @@ -292,7 +277,7 @@ public: for(size_t k=0; k<factorStrings.size(); ++k) { std::vector<std::string> factors=TokenizeMultiCharSeparator(*factorStrings[k],StaticData::Instance().GetFactorDelimiter()); - assert(factors.size()==m_output.size()); + CHECK(factors.size()==m_output.size()); Word& w=targetPhrase.AddWord(); for(size_t l=0; l<m_output.size(); ++l) { w[m_output[l]]= factorCollection.AddFactor(Output, m_output[l], factors[l]); @@ -338,7 +323,7 @@ public: }; void CacheSource(ConfusionNet const& src) { - assert(m_dict); + CHECK(m_dict); const size_t srcSize=src.GetSize(); std::vector<size_t> exploredPaths(srcSize+1,0); @@ -385,7 +370,7 @@ public: State curr(stack.back()); stack.pop_back(); - assert(curr.end()<srcSize); + CHECK(curr.end()<srcSize); const ConfusionNet::Column &currCol=src[curr.end()]; // in a given column, loop over all possibilities for(size_t colidx=0; colidx<currCol.size(); ++colidx) { @@ -395,7 +380,7 @@ public: bool isEpsilon=(s=="" || s==EPSILON); //assert that we have the right number of link params in this CN option - assert(currCol[colidx].second.size() >= m_numInputScores); + CHECK(currCol[colidx].second.size() >= m_numInputScores); // do not start with epsilon (except at first position) if(isEpsilon && curr.begin()==curr.end() && curr.begin()>0) continue; @@ -456,7 +441,7 @@ public: //put in phrase table scores, logging as we insert std::transform(tcands[i].scores.begin(),tcands[i].scores.end(),nscores.begin() + m_numInputScores,TransformScore); - assert(nscores.size()==m_weights.size()); + CHECK(nscores.size()==m_weights.size()); //tally up float score=std::inner_product(nscores.begin(), nscores.end(), m_weights.begin(), 0.0f); @@ -497,10 +482,10 @@ public: m_rangeCache.resize(src.GetSize(),vTPC(src.GetSize(),0)); for(std::map<Range,E2Costs>::const_iterator i=cov2cand.begin(); i!=cov2cand.end(); ++i) { - assert(i->first.first<m_rangeCache.size()); - assert(i->first.second>0); - assert(static_cast<size_t>(i->first.second-1)<m_rangeCache[i->first.first].size()); - assert(m_rangeCache[i->first.first][i->first.second-1]==0); + CHECK(i->first.first<m_rangeCache.size()); + CHECK(i->first.second>0); + CHECK(static_cast<size_t>(i->first.second-1)<m_rangeCache[i->first.first].size()); + CHECK(m_rangeCache[i->first.first][i->first.second-1]==0); std::vector<TargetPhrase> tCands; tCands.reserve(i->second.size()); diff --git a/moses/src/Parameter.cpp b/moses/src/Parameter.cpp index a0c8b6872..0815f6f2d 100644 --- a/moses/src/Parameter.cpp +++ b/moses/src/Parameter.cpp @@ -627,7 +627,7 @@ void Parameter::OverwriteParam(const string ¶mName, PARAM_VEC values) m_setting[paramName]; // defines the parameter, important for boolean switches if (m_setting[paramName].size() > 1){ VERBOSE(2," (the parameter had " << m_setting[paramName].size() << " previous values)"); - assert(m_setting[paramName].size() == values.size()); + CHECK(m_setting[paramName].size() == values.size()); }else{ VERBOSE(2," (the parameter does not have previous values)"); m_setting[paramName].resize(values.size()); diff --git a/moses/src/Phrase.cpp b/moses/src/Phrase.cpp index 4d33023c5..db808390c 100644 --- a/moses/src/Phrase.cpp +++ b/moses/src/Phrase.cpp @@ -20,7 +20,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> +#include "util/check.hh" #include <algorithm> #include <sstream> #include <string> @@ -36,31 +36,13 @@ using namespace std; namespace Moses { -Phrase::Phrase(const Phrase ©) - :m_direction(copy.m_direction) - ,m_words(copy.m_words) -{ -} - -Phrase& Phrase::operator=(const Phrase& x) -{ - if(this!=&x) { - - m_direction=x.m_direction; - m_words = x.m_words; - } - return *this; -} - -Phrase::Phrase(FactorDirection direction, size_t reserveSize) - : m_direction(direction) +Phrase::Phrase(size_t reserveSize) { m_words.reserve(reserveSize); } -Phrase::Phrase(FactorDirection direction, const vector< const Word* > &mergeWords) - :m_direction(direction) +Phrase::Phrase(const vector< const Word* > &mergeWords) { m_words.reserve(mergeWords.size()); for (size_t currPos = 0 ; currPos < mergeWords.size() ; currPos++) { @@ -74,9 +56,9 @@ Phrase::~Phrase() void Phrase::MergeFactors(const Phrase ©) { - assert(GetSize() == copy.GetSize()); + CHECK(GetSize() == copy.GetSize()); size_t size = GetSize(); - const size_t maxNumFactors = StaticData::Instance().GetMaxNumFactors(this->GetDirection()); + const size_t maxNumFactors = MAX_NUM_FACTORS; for (size_t currPos = 0 ; currPos < size ; currPos++) { for (unsigned int currFactor = 0 ; currFactor < maxNumFactors ; currFactor++) { FactorType factorType = static_cast<FactorType>(currFactor); @@ -89,14 +71,14 @@ void Phrase::MergeFactors(const Phrase ©) void Phrase::MergeFactors(const Phrase ©, FactorType factorType) { - assert(GetSize() == copy.GetSize()); + CHECK(GetSize() == copy.GetSize()); for (size_t currPos = 0 ; currPos < GetSize() ; currPos++) SetFactor(currPos, factorType, copy.GetFactor(currPos, factorType)); } void Phrase::MergeFactors(const Phrase ©, const std::vector<FactorType>& factorVec) { - assert(GetSize() == copy.GetSize()); + CHECK(GetSize() == copy.GetSize()); for (size_t currPos = 0 ; currPos < GetSize() ; currPos++) for (std::vector<FactorType>::const_iterator i = factorVec.begin(); i != factorVec.end(); ++i) { @@ -107,7 +89,7 @@ void Phrase::MergeFactors(const Phrase ©, const std::vector<FactorType>& fac Phrase Phrase::GetSubString(const WordsRange &wordsRange) const { - Phrase retPhrase(m_direction, wordsRange.GetNumWordsCovered()); + Phrase retPhrase(wordsRange.GetNumWordsCovered()); for (size_t currPos = wordsRange.GetStartPos() ; currPos <= wordsRange.GetEndPos() ; currPos++) { Word &word = retPhrase.AddWord(); @@ -119,7 +101,7 @@ Phrase Phrase::GetSubString(const WordsRange &wordsRange) const Phrase Phrase::GetSubString(const WordsRange &wordsRange, FactorType factorType) const { - Phrase retPhrase(m_direction, wordsRange.GetNumWordsCovered()); + Phrase retPhrase(wordsRange.GetNumWordsCovered()); for (size_t currPos = wordsRange.GetStartPos() ; currPos <= wordsRange.GetEndPos() ; currPos++) { @@ -213,7 +195,7 @@ void Phrase::CreateFromStringNewFormat(FactorDirection direction isNonTerminal = true; size_t nextPos = annotatedWord.find("[", 1); - assert(nextPos != string::npos); + CHECK(nextPos != string::npos); if (direction == Input) annotatedWord = annotatedWord.substr(1, nextPos - 2); @@ -230,11 +212,11 @@ void Phrase::CreateFromStringNewFormat(FactorDirection direction // lhs string &annotatedWord = annotatedWordVector.back(); - assert(annotatedWord.substr(0, 1) == "[" && annotatedWord.substr(annotatedWord.size()-1, 1) == "]"); + CHECK(annotatedWord.substr(0, 1) == "[" && annotatedWord.substr(annotatedWord.size()-1, 1) == "]"); annotatedWord = annotatedWord.substr(1, annotatedWord.size() - 2); lhs.CreateFromString(direction, factorOrder, annotatedWord, true); - assert(lhs.IsNonTerminal()); + CHECK(lhs.IsNonTerminal()); } int Phrase::Compare(const Phrase &other) const @@ -302,7 +284,7 @@ bool Phrase::IsCompatible(const Phrase &inputPhrase) const const size_t size = GetSize(); - const size_t maxNumFactors = StaticData::Instance().GetMaxNumFactors(this->GetDirection()); + const size_t maxNumFactors = MAX_NUM_FACTORS; for (size_t currPos = 0 ; currPos < size ; currPos++) { for (unsigned int currFactor = 0 ; currFactor < maxNumFactors ; currFactor++) { FactorType factorType = static_cast<FactorType>(currFactor); diff --git a/moses/src/Phrase.h b/moses/src/Phrase.h index 6c775d66f..b64a84a25 100644 --- a/moses/src/Phrase.h +++ b/moses/src/Phrase.h @@ -45,10 +45,6 @@ class Phrase friend std::ostream& operator<<(std::ostream&, const Phrase&); private: - FactorDirection m_direction; /** Reusing Direction enum to really mean which language - Input = Source, Output = Target. - Not really used, but nice to know for debugging purposes - */ std::vector<Word> m_words; public: @@ -56,16 +52,11 @@ public: static void InitializeMemPool(); static void FinalizeMemPool(); - /** copy constructor */ - Phrase(const Phrase ©); - Phrase& operator=(const Phrase&); - /** create empty phrase - * \param direction = language (Input = Source, Output = Target) */ - Phrase(FactorDirection direction, size_t reserveSize); + Phrase(size_t reserveSize); /** create phrase from vectors of words */ - Phrase(FactorDirection direction, const std::vector< const Word* > &mergeWords); + Phrase(const std::vector< const Word* > &mergeWords); /** destructor */ virtual ~Phrase(); @@ -99,11 +90,6 @@ public: bool IsCompatible(const Phrase &inputPhrase, FactorType factorType) const; bool IsCompatible(const Phrase &inputPhrase, const std::vector<FactorType>& factorVec) const; - //! really means what language. Input = Source, Output = Target - inline FactorDirection GetDirection() const { - return m_direction; - } - //! number of words inline size_t GetSize() const { return m_words.size(); @@ -150,13 +136,13 @@ public: void RemoveWord(size_t pos) { - assert(pos < m_words.size()); + CHECK(pos < m_words.size()); m_words.erase(m_words.begin() + pos); } //! create new phrase class that is a substring of this phrase Phrase GetSubString(const WordsRange &wordsRange) const; - Phrase GetSubString(const WordsRange &wordsRange, FactorType factorType) const; + Phrase GetSubString(const WordsRange &wordsRange, FactorType factorType) const; //! return a string rep of the phrase. Each factor is separated by the factor delimiter as specified in StaticData class std::string GetStringRep(const std::vector<FactorType> factorsToPrint) const; diff --git a/moses/src/PhraseBoundaryFeature.h b/moses/src/PhraseBoundaryFeature.h index 13e08c376..4167ab9b2 100644 --- a/moses/src/PhraseBoundaryFeature.h +++ b/moses/src/PhraseBoundaryFeature.h @@ -46,8 +46,7 @@ public: int /* featureID */, ScoreComponentCollection* ) const { - /* Not implemented */ - assert(0); + abort(); } void SetSparseProducerWeight(float weight) { m_sparseProducerWeight = weight; } diff --git a/moses/src/PhraseDictionary.cpp b/moses/src/PhraseDictionary.cpp index 42c217dab..d337da83e 100644 --- a/moses/src/PhraseDictionary.cpp +++ b/moses/src/PhraseDictionary.cpp @@ -87,7 +87,7 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst } if (staticData.GetInputType() != SentenceInput) { UserMessage::Add("Must use binary phrase table for this input type"); - assert(false); + CHECK(false); } PhraseDictionaryMemory* pdm = new PhraseDictionaryMemory(GetNumScoreComponents(),this); @@ -97,7 +97,7 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst , m_tableLimit , system->GetLanguageModels() , system->GetWeightWordPenalty()); - assert(ret); + CHECK(ret); return pdm; } else if (m_implementation == Binary) { PhraseDictionaryTreeAdaptor* pdta = new PhraseDictionaryTreeAdaptor(GetNumScoreComponents(), m_numInputScores,this); @@ -108,7 +108,7 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst , m_tableLimit , system->GetLanguageModels() , system->GetWeightWordPenalty()); - assert(ret); + CHECK(ret); return pdta; } else if (m_implementation == SCFG) { // memory phrase table @@ -126,7 +126,7 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst , m_tableLimit , system->GetLanguageModels() , system->GetWordPenaltyProducer()); - assert(ret); + CHECK(ret); return pdm; } else if (m_implementation == Hiero) { // memory phrase table @@ -144,7 +144,7 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst , m_tableLimit , system->GetLanguageModels() , system->GetWordPenaltyProducer()); - assert(ret); + CHECK(ret); return pdm; } else if (m_implementation == ALSuffixArray) { // memory phrase table @@ -162,7 +162,7 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst , m_tableLimit , system->GetLanguageModels() , system->GetWordPenaltyProducer()); - assert(ret); + CHECK(ret); return pdm; } else if (m_implementation == OnDisk) { @@ -174,7 +174,7 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst , m_tableLimit , system->GetLanguageModels() , system->GetWordPenaltyProducer()); - assert(ret); + CHECK(ret); return pdta; } else if (m_implementation == SuffixArray) { #ifndef WIN32 @@ -195,11 +195,11 @@ PhraseDictionary* PhraseDictionaryFeature::LoadPhraseTable(const TranslationSyst std::cerr << "Suffix array phrase table loaded" << std::endl; return pd; #else - assert(false); + CHECK(false); #endif } else { std::cerr << "Unknown phrase table type " << m_implementation << endl; - assert(false); + CHECK(false); } } @@ -230,7 +230,7 @@ void PhraseDictionaryFeature::InitDictionary(const TranslationSystem* system, co } dict = m_threadUnsafePhraseDictionary.get(); } - assert(dict); + CHECK(dict); dict->InitializeForInput(source); } @@ -242,7 +242,7 @@ const PhraseDictionary* PhraseDictionaryFeature::GetDictionary() const } else { dict = m_threadUnsafePhraseDictionary.get(); } - assert(dict); + CHECK(dict); return dict; } @@ -254,7 +254,7 @@ PhraseDictionary* PhraseDictionaryFeature::GetDictionary() } else { dict = m_threadUnsafePhraseDictionary.get(); } - assert(dict); + CHECK(dict); return dict; } diff --git a/moses/src/PhraseDictionary.h b/moses/src/PhraseDictionary.h index 2362f525e..e8f478079 100644 --- a/moses/src/PhraseDictionary.h +++ b/moses/src/PhraseDictionary.h @@ -76,7 +76,6 @@ public: //! find list of translations that can translates a portion of src. Used by confusion network decoding virtual const TargetPhraseCollection *GetTargetPhraseCollection(InputType const& src,WordsRange const& range) const; //! Create entry for translation of source to targetPhrase - virtual void AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase)=0; virtual void InitializeForInput(InputType const& source) = 0; //! Create a sentence-specific manager for SCFG rule lookup. diff --git a/moses/src/PhraseDictionaryALSuffixArray.cpp b/moses/src/PhraseDictionaryALSuffixArray.cpp index 693a4ce66..26a9d2a31 100644 --- a/moses/src/PhraseDictionaryALSuffixArray.cpp +++ b/moses/src/PhraseDictionaryALSuffixArray.cpp @@ -58,7 +58,7 @@ void PhraseDictionaryALSuffixArray::InitializeForInput(InputType const& source) bool ret = loader->Load(*m_input, *m_output, inFile, *m_weight, m_tableLimit, *m_languageModels, m_wpProducer, *this); - assert(ret); + CHECK(ret); } } diff --git a/moses/src/PhraseDictionaryDynSuffixArray.cpp b/moses/src/PhraseDictionaryDynSuffixArray.cpp index 72b1fe479..d4f0161db 100644 --- a/moses/src/PhraseDictionaryDynSuffixArray.cpp +++ b/moses/src/PhraseDictionaryDynSuffixArray.cpp @@ -40,7 +40,7 @@ bool PhraseDictionaryDynSuffixArray::Load(const std::vector<FactorType>& input, void PhraseDictionaryDynSuffixArray::InitializeForInput(const InputType& input) { - assert(&input == &input); + CHECK(&input == &input); } void PhraseDictionaryDynSuffixArray::CleanUp() @@ -81,7 +81,7 @@ void PhraseDictionaryDynSuffixArray::deleteSnt(unsigned /* idx */, unsigned /* n ChartRuleLookupManager *PhraseDictionaryDynSuffixArray::CreateRuleLookupManager(const InputType&, const ChartCellCollection&) { - assert(false); + CHECK(false); return 0; } diff --git a/moses/src/PhraseDictionaryDynSuffixArray.h b/moses/src/PhraseDictionaryDynSuffixArray.h index 1bd16fc34..0d6be08dd 100644 --- a/moses/src/PhraseDictionaryDynSuffixArray.h +++ b/moses/src/PhraseDictionaryDynSuffixArray.h @@ -26,7 +26,6 @@ public: // functions below required by base class const TargetPhraseCollection* GetTargetPhraseCollection(const Phrase& src) const; void InitializeForInput(const InputType& i); - void AddEquivPhrase(const Phrase &, const TargetPhrase &) {} void CleanUp(); void insertSnt(string&, string&, string&); void deleteSnt(unsigned, unsigned); diff --git a/moses/src/PhraseDictionaryMemory.cpp b/moses/src/PhraseDictionaryMemory.cpp index 8e653326e..1ee449172 100644 --- a/moses/src/PhraseDictionaryMemory.cpp +++ b/moses/src/PhraseDictionaryMemory.cpp @@ -76,7 +76,7 @@ bool PhraseDictionaryMemory::Load(const std::vector<FactorType> &input size_t numElement = NOT_FOUND; // 3=old format, 5=async format which include word alignment info const std::string& factorDelimiter = staticData.GetFactorDelimiter(); - Phrase sourcePhrase(Input, 0); + Phrase sourcePhrase(0); std::vector<float> scv; scv.reserve(m_numScoreComponent); @@ -196,12 +196,6 @@ TargetPhraseCollection *PhraseDictionaryMemory::CreateTargetPhraseCollection(con return currNode->CreateTargetPhraseCollection(); } -void PhraseDictionaryMemory::AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase) -{ - TargetPhraseCollection &phraseColl = *CreateTargetPhraseCollection(source); - phraseColl.Add(new TargetPhrase(targetPhrase)); -} - const TargetPhraseCollection *PhraseDictionaryMemory::GetTargetPhraseCollection(const Phrase &source) const { // exactly like CreateTargetPhraseCollection, but don't create diff --git a/moses/src/PhraseDictionaryMemory.h b/moses/src/PhraseDictionaryMemory.h index a38d9c842..dad7f4a9b 100644 --- a/moses/src/PhraseDictionaryMemory.h +++ b/moses/src/PhraseDictionaryMemory.h @@ -57,8 +57,6 @@ public: const TargetPhraseCollection *GetTargetPhraseCollection(const Phrase &source) const; - void AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase); - // for mert virtual void InitializeForInput(InputType const&) { /* Don't do anything source specific here as this object is shared between threads.*/ @@ -67,7 +65,7 @@ public: virtual ChartRuleLookupManager *CreateRuleLookupManager( const InputType &, const ChartCellCollection &) { - assert(false); + CHECK(false); return 0; } diff --git a/moses/src/PhraseDictionaryNodeSCFG.cpp b/moses/src/PhraseDictionaryNodeSCFG.cpp index 5c5ab3d84..91f5f7acd 100644 --- a/moses/src/PhraseDictionaryNodeSCFG.cpp +++ b/moses/src/PhraseDictionaryNodeSCFG.cpp @@ -64,7 +64,7 @@ void PhraseDictionaryNodeSCFG::Sort(size_t tableLimit) PhraseDictionaryNodeSCFG *PhraseDictionaryNodeSCFG::GetOrCreateChild(const Word &sourceTerm) { - //assert(!sourceTerm.IsNonTerminal()); + //CHECK(!sourceTerm.IsNonTerminal()); std::pair <TerminalMap::iterator,bool> insResult; insResult = m_sourceTermMap.insert( std::make_pair(sourceTerm, PhraseDictionaryNodeSCFG()) ); @@ -75,8 +75,8 @@ PhraseDictionaryNodeSCFG *PhraseDictionaryNodeSCFG::GetOrCreateChild(const Word PhraseDictionaryNodeSCFG *PhraseDictionaryNodeSCFG::GetOrCreateChild(const Word &sourceNonTerm, const Word &targetNonTerm) { - assert(sourceNonTerm.IsNonTerminal()); - assert(targetNonTerm.IsNonTerminal()); + CHECK(sourceNonTerm.IsNonTerminal()); + CHECK(targetNonTerm.IsNonTerminal()); NonTerminalMapKey key(sourceNonTerm, targetNonTerm); std::pair <NonTerminalMap::iterator,bool> insResult; @@ -88,7 +88,7 @@ PhraseDictionaryNodeSCFG *PhraseDictionaryNodeSCFG::GetOrCreateChild(const Word const PhraseDictionaryNodeSCFG *PhraseDictionaryNodeSCFG::GetChild(const Word &sourceTerm) const { - assert(!sourceTerm.IsNonTerminal()); + CHECK(!sourceTerm.IsNonTerminal()); TerminalMap::const_iterator p = m_sourceTermMap.find(sourceTerm); return (p == m_sourceTermMap.end()) ? NULL : &p->second; @@ -96,8 +96,8 @@ const PhraseDictionaryNodeSCFG *PhraseDictionaryNodeSCFG::GetChild(const Word &s const PhraseDictionaryNodeSCFG *PhraseDictionaryNodeSCFG::GetChild(const Word &sourceNonTerm, const Word &targetNonTerm) const { - assert(sourceNonTerm.IsNonTerminal()); - assert(targetNonTerm.IsNonTerminal()); + CHECK(sourceNonTerm.IsNonTerminal()); + CHECK(targetNonTerm.IsNonTerminal()); NonTerminalMapKey key(sourceNonTerm, targetNonTerm); NonTerminalMap::const_iterator p = m_nonTermMap.find(key); diff --git a/moses/src/PhraseDictionaryOnDisk.cpp b/moses/src/PhraseDictionaryOnDisk.cpp index 410ee1ba1..04c29c449 100644 --- a/moses/src/PhraseDictionaryOnDisk.cpp +++ b/moses/src/PhraseDictionaryOnDisk.cpp @@ -58,10 +58,10 @@ bool PhraseDictionaryOnDisk::Load(const std::vector<FactorType> &input if (!m_dbWrapper.BeginLoad(filePath)) return false; - assert(m_dbWrapper.GetMisc("Version") == 3); - assert(m_dbWrapper.GetMisc("NumSourceFactors") == input.size()); - assert(m_dbWrapper.GetMisc("NumTargetFactors") == output.size()); - assert(m_dbWrapper.GetMisc("NumScores") == weight.size()); + CHECK(m_dbWrapper.GetMisc("Version") == 3); + CHECK(m_dbWrapper.GetMisc("NumSourceFactors") == input.size()); + CHECK(m_dbWrapper.GetMisc("NumTargetFactors") == output.size()); + CHECK(m_dbWrapper.GetMisc("NumScores") == weight.size()); return true; } @@ -71,21 +71,10 @@ bool PhraseDictionaryOnDisk::Load(const std::vector<FactorType> &input //! find list of translations that can translates src. Only for phrase input const TargetPhraseCollection *PhraseDictionaryOnDisk::GetTargetPhraseCollection(const Phrase& /* src */) const { - assert(false); + CHECK(false); return NULL; } -void PhraseDictionaryOnDisk::AddEquivPhrase(const Phrase& /* source */, const TargetPhrase& /*targetPhrase */) -{ - assert(false); // TODO -} - - -//! Create entry for translation of source to targetPhrase -void PhraseDictionaryOnDisk::AddEquivPhrase(const Phrase& /* source */, TargetPhrase * /* targetPhrase */) -{ -} - void PhraseDictionaryOnDisk::InitializeForInput(const InputType& /* input */) { // Nothing to do: sentence-specific state is stored in ChartRuleLookupManager diff --git a/moses/src/PhraseDictionaryOnDisk.h b/moses/src/PhraseDictionaryOnDisk.h index 44192dfdf..0a8dfc808 100644 --- a/moses/src/PhraseDictionaryOnDisk.h +++ b/moses/src/PhraseDictionaryOnDisk.h @@ -25,9 +25,9 @@ #include <vector> #include <string> #include "PhraseDictionary.h" -#include "../../OnDiskPt/src/OnDiskWrapper.h" -#include "../../OnDiskPt/src/Word.h" -#include "../../OnDiskPt/src/PhraseNode.h" +#include "../../OnDiskPt/OnDiskWrapper.h" +#include "../../OnDiskPt/Word.h" +#include "../../OnDiskPt/PhraseNode.h" namespace Moses { @@ -76,11 +76,6 @@ public: //! find list of translations that can translates src. Only for phrase input virtual const TargetPhraseCollection *GetTargetPhraseCollection(const Phrase& src) const; - void AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase); - - //! Create entry for translation of source to targetPhrase - virtual void AddEquivPhrase(const Phrase &source, TargetPhrase *targetPhrase); - void InitializeForInput(const InputType& input); void CleanUp(); diff --git a/moses/src/PhraseDictionarySCFG.cpp b/moses/src/PhraseDictionarySCFG.cpp index becd86155..c3a243990 100644 --- a/moses/src/PhraseDictionarySCFG.cpp +++ b/moses/src/PhraseDictionarySCFG.cpp @@ -89,8 +89,8 @@ PhraseDictionaryNodeSCFG &PhraseDictionarySCFG::GetOrCreateNode(const Phrase &so // indexed by source label 1st const Word &sourceNonTerm = word; - assert(iterAlign != target.GetAlignmentInfo().end()); - assert(iterAlign->first == pos); + CHECK(iterAlign != target.GetAlignmentInfo().end()); + CHECK(iterAlign->first == pos); size_t targetNonTermInd = iterAlign->second; ++iterAlign; const Word &targetNonTerm = target.GetWord(targetNonTermInd); @@ -100,12 +100,12 @@ PhraseDictionaryNodeSCFG &PhraseDictionarySCFG::GetOrCreateNode(const Phrase &so currNode = currNode->GetOrCreateChild(word); } - assert(currNode != NULL); + CHECK(currNode != NULL); } // finally, the source LHS //currNode = currNode->GetOrCreateChild(sourceLHS); - //assert(currNode != NULL); + //CHECK(currNode != NULL); return *currNode; diff --git a/moses/src/PhraseDictionarySCFG.h b/moses/src/PhraseDictionarySCFG.h index bfc476cc4..e338dac50 100644 --- a/moses/src/PhraseDictionarySCFG.h +++ b/moses/src/PhraseDictionarySCFG.h @@ -56,16 +56,10 @@ class PhraseDictionarySCFG : public PhraseDictionary // Required by PhraseDictionary. const TargetPhraseCollection *GetTargetPhraseCollection(const Phrase &) const { - assert(false); + CHECK(false); return NULL; } - // Required by PhraseDictionary. - void AddEquivPhrase(const Phrase &, const TargetPhrase &) - { - assert(false); - } - void InitializeForInput(const InputType& i); void CleanUp(); diff --git a/moses/src/PhraseDictionaryTree.cpp b/moses/src/PhraseDictionaryTree.cpp index 8f1cfdfe9..13b404724 100644 --- a/moses/src/PhraseDictionaryTree.cpp +++ b/moses/src/PhraseDictionaryTree.cpp @@ -3,7 +3,7 @@ #include "FeatureVector.h" #include "PhraseDictionaryTree.h" #include <map> -#include <cassert> +#include "util/check.hh" #include <sstream> #include <iostream> #include <fstream> @@ -106,7 +106,7 @@ public: } void SetFeatures(const IPhrase& names, const std::vector<FValue>& values) { - assert(names.size() == values.size()); + CHECK(names.size() == values.size()); fnames = names; fvalues = values; } @@ -227,7 +227,7 @@ public: if(f.empty()) return; if(f[0]>=data.size()) return; if(!data[f[0]]) return; - assert(data[f[0]]->findKey(f[0])<data[f[0]]->size()); + CHECK(data[f[0]]->findKey(f[0])<data[f[0]]->size()); OFF_T tCandOffset=data[f[0]]->find(f); if(tCandOffset==InvalidOffT) return; fSeek(ot,tCandOffset); @@ -239,7 +239,7 @@ public: typedef PhraseDictionaryTree::PrefixPtr PPtr; void GetTargetCandidates(PPtr p,TgtCands& tgtCands) { - assert(p); + CHECK(p); if(p.imp->isRoot()) return; OFF_T tCandOffset=p.imp->ptr()->getData(p.imp->idx); if(tCandOffset==InvalidOffT) return; @@ -276,7 +276,7 @@ public: } PPtr Extend(PPtr p,const std::string& w) { - assert(p); + CHECK(p); if(w.empty() || w==EPSILON) return p; LabelId wi=sv->index(w); @@ -285,7 +285,7 @@ public: else if(p.imp->isRoot()) { if(wi<data.size() && data[wi]) { const void* ptr = data[wi]->findKeyPtr(wi); - assert(ptr); + CHECK(ptr); return PPtr(pPool.get(PPimp(data[wi],data[wi]->findKey(wi),0))); } } else if(PTF const* nextP=p.imp->ptr()->getPtr(p.imp->idx)) { @@ -510,7 +510,7 @@ int PhraseDictionaryTree::Create(std::istream& inFile,const std::string& out) if (numElement == NOT_FOUND) { // init numElement numElement = tokens.size(); - assert(numElement >= 3); + CHECK(numElement >= 3); } if (tokens.size() != numElement) { @@ -555,7 +555,7 @@ int PhraseDictionaryTree::Create(std::istream& inFile,const std::string& out) ++count; currF=f; // insert src phrase in prefix tree - assert(psa); + CHECK(psa); PSA::Data& d=psa->insert(f); if(d==InvalidOffT) d=fTell(ot); else { @@ -608,7 +608,7 @@ int PhraseDictionaryTree::Create(std::istream& inFile,const std::string& out) } // insert src phrase in prefix tree - assert(psa); + CHECK(psa); PSA::Data& d=psa->insert(f); if(d==InvalidOffT) d=fTell(ot); else { @@ -618,7 +618,7 @@ int PhraseDictionaryTree::Create(std::istream& inFile,const std::string& out) } } tgtCands.push_back(TgtCand(e,sc, alignmentString)); - assert(currFirstWord!=InvalidLabelId); + CHECK(currFirstWord!=InvalidLabelId); tgtCands.back().SetFeatures(fnames, fvalues); } if (PrintWordAlignment()) diff --git a/moses/src/PhraseDictionaryTreeAdaptor.cpp b/moses/src/PhraseDictionaryTreeAdaptor.cpp index aa90bde81..cce4a2ee4 100644 --- a/moses/src/PhraseDictionaryTreeAdaptor.cpp +++ b/moses/src/PhraseDictionaryTreeAdaptor.cpp @@ -84,11 +84,6 @@ PhraseDictionaryTreeAdaptor::GetTargetPhraseCollection(InputType const& src,Word } } -void PhraseDictionaryTreeAdaptor:: -AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase) -{ - imp->AddEquivPhrase(source,targetPhrase); -} void PhraseDictionaryTreeAdaptor::EnableCache() { imp->useCache=1; diff --git a/moses/src/PhraseDictionaryTreeAdaptor.h b/moses/src/PhraseDictionaryTreeAdaptor.h index 5e834acb3..c38e234fb 100644 --- a/moses/src/PhraseDictionaryTreeAdaptor.h +++ b/moses/src/PhraseDictionaryTreeAdaptor.h @@ -4,7 +4,7 @@ #define moses_PhraseDictionaryTreeAdaptor_h #include <vector> -#include <cassert> +#include "util/check.hh" #include "TypeDef.h" #include "PhraseDictionaryMemory.h" #include "TargetPhraseCollection.h" @@ -56,10 +56,6 @@ public: TargetPhraseCollection const* GetTargetPhraseCollection(Phrase const &src) const; TargetPhraseCollection const* GetTargetPhraseCollection(InputType const& src,WordsRange const & srcRange) const; - - // this function can be only used for UNKNOWN source phrases - void AddEquivPhrase(const Phrase &source, const TargetPhrase &targetPhrase); - std::string GetScoreProducerDescription(unsigned idx=0) const; std::string GetScoreProducerWeightShortName(unsigned idx=0) const; @@ -69,7 +65,7 @@ public: virtual ChartRuleLookupManager *CreateRuleLookupManager( const InputType &, const ChartCellCollection &) { - assert(false); + CHECK(false); return 0; } }; diff --git a/moses/src/PrefixTree.h b/moses/src/PrefixTree.h index c6eafb4ce..3215fb834 100644 --- a/moses/src/PrefixTree.h +++ b/moses/src/PrefixTree.h @@ -9,7 +9,7 @@ #include <vector> #include <algorithm> -#include <cassert> +#include "util/check.hh" #include <deque> #include "Util.h" #include "FilePtr.h" diff --git a/moses/src/PrefixTreeMap.cpp b/moses/src/PrefixTreeMap.cpp index d4527aae4..7e5512a05 100644 --- a/moses/src/PrefixTreeMap.cpp +++ b/moses/src/PrefixTreeMap.cpp @@ -1,6 +1,10 @@ #include "PrefixTreeMap.h" #include "TypeDef.h" +#ifdef WITH_THREADS +#include <boost/thread.hpp> +#endif + namespace Moses { void GenericCandidate::readBin(FILE* f) @@ -143,7 +147,7 @@ void PrefixTreeMap::GetCandidates(const IPhrase& key, Candidates* cands) if(key.empty() || key[0] >= m_Data.size() || !m_Data[key[0]]) { return; } - assert(m_Data[key[0]]->findKey(key[0])<m_Data[key[0]]->size()); + CHECK(m_Data[key[0]]->findKey(key[0])<m_Data[key[0]]->size()); OFF_T candOffset = m_Data[key[0]]->find(key); if(candOffset == InvalidOffT) { @@ -155,7 +159,7 @@ void PrefixTreeMap::GetCandidates(const IPhrase& key, Candidates* cands) void PrefixTreeMap::GetCandidates(const PPimp& p, Candidates* cands) { - assert(p.isValid()); + CHECK(p.isValid()); if(p.isRoot()) { return; }; @@ -169,7 +173,7 @@ void PrefixTreeMap::GetCandidates(const PPimp& p, Candidates* cands) std::vector< std::string const * > PrefixTreeMap::ConvertPhrase(const IPhrase& p, unsigned int voc) const { - assert(voc < m_Voc.size() && m_Voc[voc] != 0); + CHECK(voc < m_Voc.size() && m_Voc[voc] != 0); std::vector< std::string const * > result; result.reserve(p.size()); for(IPhrase::const_iterator i = p.begin(); i != p.end(); ++i) { @@ -180,7 +184,7 @@ std::vector< std::string const * > PrefixTreeMap::ConvertPhrase(const IPhrase& p IPhrase PrefixTreeMap::ConvertPhrase(const std::vector< std::string >& p, unsigned int voc) const { - assert(voc < m_Voc.size() && m_Voc[voc] != 0); + CHECK(voc < m_Voc.size() && m_Voc[voc] != 0); IPhrase result; result.reserve(p.size()); for(size_t i = 0; i < p.size(); ++i) { @@ -191,13 +195,13 @@ IPhrase PrefixTreeMap::ConvertPhrase(const std::vector< std::string >& p, unsign LabelId PrefixTreeMap::ConvertWord(const std::string& w, unsigned int voc) const { - assert(voc < m_Voc.size() && m_Voc[voc] != 0); + CHECK(voc < m_Voc.size() && m_Voc[voc] != 0); return m_Voc[voc]->index(w); } std::string PrefixTreeMap::ConvertWord(LabelId w, unsigned int voc) const { - assert(voc < m_Voc.size() && m_Voc[voc] != 0); + CHECK(voc < m_Voc.size() && m_Voc[voc] != 0); if(w == PrefixTreeMap::MagicWord) { return "|||"; } else if (w == InvalidLabelId) { @@ -214,7 +218,7 @@ PPimp* PrefixTreeMap::GetRoot() PPimp* PrefixTreeMap::Extend(PPimp* p, LabelId wi) { - assert(p->isValid()); + CHECK(p->isValid()); if(wi == InvalidLabelId) { return 0; // unknown word, return invalid pointer @@ -222,7 +226,7 @@ PPimp* PrefixTreeMap::Extend(PPimp* p, LabelId wi) } else if(p->isRoot()) { if(wi < m_Data.size() && m_Data[wi]) { const void* ptr = m_Data[wi]->findKeyPtr(wi); - assert(ptr); + CHECK(ptr); return m_PtrPool.get(PPimp(m_Data[wi],m_Data[wi]->findKey(wi),0)); } } else if(PTF const* nextP = p->ptr()->getPtr(p->idx)) { diff --git a/moses/src/PrefixTreeMap.h b/moses/src/PrefixTreeMap.h index faa851037..6bb6b769f 100644 --- a/moses/src/PrefixTreeMap.h +++ b/moses/src/PrefixTreeMap.h @@ -6,10 +6,6 @@ #include<iostream> #include <map> -#ifdef WITH_THREADS -#include <boost/thread/mutex.hpp> -#endif - #include "PrefixTree.h" #include "File.h" diff --git a/moses/src/RuleCube.h b/moses/src/RuleCube.h index 2917c195b..5d6aabe46 100644 --- a/moses/src/RuleCube.h +++ b/moses/src/RuleCube.h @@ -31,7 +31,7 @@ #include <boost/unordered_set.hpp> #include <boost/version.hpp> -#include <cassert> +#include "util/check.hh" #include <queue> #include <set> #include <vector> @@ -93,7 +93,7 @@ class RuleCube ~RuleCube(); float GetTopScore() const { - assert(!m_queue.empty()); + CHECK(!m_queue.empty()); RuleCubeItem *item = m_queue.top(); return item->GetScore(); } diff --git a/moses/src/RuleCubeItem.cpp b/moses/src/RuleCubeItem.cpp index 84c00fc42..fa4b4c51e 100644 --- a/moses/src/RuleCubeItem.cpp +++ b/moses/src/RuleCubeItem.cpp @@ -86,7 +86,7 @@ void RuleCubeItem::CreateHypothesis(const ChartTranslationOption &transOpt, ChartHypothesis *RuleCubeItem::ReleaseHypothesis() { - assert(m_hypothesis); + CHECK(m_hypothesis); ChartHypothesis *hypo = m_hypothesis; m_hypothesis = 0; return hypo; @@ -98,7 +98,7 @@ void RuleCubeItem::CreateHypothesisDimensions( const DottedRule &dottedRule, const ChartCellCollection &allChartCells) { - assert(!dottedRule.IsRoot()); + CHECK(!dottedRule.IsRoot()); const DottedRule *prev = dottedRule.GetPrev(); if (!prev->IsRoot()) { @@ -110,12 +110,12 @@ void RuleCubeItem::CreateHypothesisDimensions( // get a sorted list of the underlying hypotheses const ChartCellLabel &cellLabel = dottedRule.GetChartCellLabel(); const ChartHypothesisCollection *hypoColl = cellLabel.GetStack(); - assert(hypoColl); + CHECK(hypoColl); const HypoList &hypoList = hypoColl->GetSortedHypotheses(); // there have to be hypothesis with the desired non-terminal // (otherwise the rule would not be considered) - assert(!hypoList.empty()); + CHECK(!hypoList.empty()); // create a list of hypotheses that match the non-terminal HypothesisDimension dimension(0, hypoList); diff --git a/moses/src/RuleTableLoaderCompact.cpp b/moses/src/RuleTableLoaderCompact.cpp index 39d437b80..21d146bec 100644 --- a/moses/src/RuleTableLoaderCompact.cpp +++ b/moses/src/RuleTableLoaderCompact.cpp @@ -63,12 +63,12 @@ bool RuleTableLoaderCompact::Load(const std::vector<FactorType> &input, // Load source phrases. std::vector<Phrase> sourcePhrases; std::vector<size_t> sourceLhsIds; - LoadPhraseSection(reader, Input, vocab, sourcePhrases, sourceLhsIds); + LoadPhraseSection(reader, vocab, sourcePhrases, sourceLhsIds); // Load target phrases. std::vector<Phrase> targetPhrases; std::vector<size_t> targetLhsIds; - LoadPhraseSection(reader, Output, vocab, targetPhrases, targetLhsIds); + LoadPhraseSection(reader, vocab, targetPhrases, targetLhsIds); // Load alignments. std::vector<const AlignmentInfo *> alignmentSets; @@ -111,7 +111,6 @@ void RuleTableLoaderCompact::LoadVocabularySection( void RuleTableLoaderCompact::LoadPhraseSection( LineReader &reader, - FactorDirection direction, const std::vector<Word> &vocab, std::vector<Phrase> &rhsPhrases, std::vector<size_t> &lhsIds) @@ -121,7 +120,7 @@ void RuleTableLoaderCompact::LoadPhraseSection( const size_t phraseCount = std::atoi(reader.m_line.c_str()); // Reads lines, storing Phrase object for each RHS and vocab ID for each LHS. - rhsPhrases.resize(phraseCount, Phrase(direction, 0)); + rhsPhrases.resize(phraseCount, Phrase(0)); lhsIds.resize(phraseCount); std::vector<size_t> tokenPositions; for (size_t i = 0; i < phraseCount; ++i) { diff --git a/moses/src/RuleTableLoaderCompact.h b/moses/src/RuleTableLoaderCompact.h index 9f960683d..add082291 100644 --- a/moses/src/RuleTableLoaderCompact.h +++ b/moses/src/RuleTableLoaderCompact.h @@ -65,7 +65,6 @@ class RuleTableLoaderCompact : public RuleTableLoader std::vector<Word> &); void LoadPhraseSection(LineReader &, - FactorDirection, const std::vector<Word> &, std::vector<Phrase> &, std::vector<size_t> &); diff --git a/moses/src/RuleTableLoaderStandard.cpp b/moses/src/RuleTableLoaderStandard.cpp index 8a83bf7b4..190241a13 100644 --- a/moses/src/RuleTableLoaderStandard.cpp +++ b/moses/src/RuleTableLoaderStandard.cpp @@ -70,7 +70,7 @@ void ReformatHieroRule(int sourceTarget, string &phrase, map<size_t, pair<size_t if (tok.substr(0, 1) == "[" && tok.substr(tokLen - 1, 1) == "]") { // no-term vector<string> split = Tokenize(tok, ","); - assert(split.size() == 2); + CHECK(split.size() == 2); tok = "[X]" + split[0] + "]"; size_t coIndex = Scan<size_t>(split[1]); @@ -202,7 +202,7 @@ bool RuleTableLoaderStandard::Load(FormatType format UserMessage::Add(strme.str()); abort(); } - assert(scoreVector.size() == numScoreComponents); + CHECK(scoreVector.size() == numScoreComponents); // parse source & find pt node @@ -210,7 +210,7 @@ bool RuleTableLoaderStandard::Load(FormatType format Word sourceLHS, targetLHS; // source - Phrase sourcePhrase(Input, 0); + Phrase sourcePhrase( 0); sourcePhrase.CreateFromStringNewFormat(Input, input, sourcePhraseString, factorDelimiter, sourceLHS); // create target phrase obj diff --git a/moses/src/ScoreComponentCollection.cpp b/moses/src/ScoreComponentCollection.cpp index 39b94b20c..58fed3a00 100644 --- a/moses/src/ScoreComponentCollection.cpp +++ b/moses/src/ScoreComponentCollection.cpp @@ -19,7 +19,7 @@ ScoreComponentCollection::ScoreComponentCollection() : m_scores(s_denseVectorSiz void ScoreComponentCollection::RegisterScoreProducer (const ScoreProducer* scoreProducer) { - assert(scoreProducer->GetNumScoreComponents() != ScoreProducer::unlimited); + CHECK(scoreProducer->GetNumScoreComponents() != ScoreProducer::unlimited); size_t start = s_denseVectorSize; size_t end = start + scoreProducer->GetNumScoreComponents(); VERBOSE(1, "ScoreProducer: " << scoreProducer->GetScoreProducerDescription() << " start: " << start << " end: " << end << endl); @@ -30,9 +30,9 @@ void ScoreComponentCollection::RegisterScoreProducer void ScoreComponentCollection::UnregisterScoreProducer (const ScoreProducer* scoreProducer) { - assert(scoreProducer->GetNumScoreComponents() != ScoreProducer::unlimited); + CHECK(scoreProducer->GetNumScoreComponents() != ScoreProducer::unlimited); ScoreIndexMap::iterator iter = s_scoreIndexes.find(scoreProducer); - assert(iter != s_scoreIndexes.end()); + CHECK(iter != s_scoreIndexes.end()); s_scoreIndexes.erase(iter); } @@ -160,7 +160,7 @@ void ScoreComponentCollection::Save(const string& filename) const { } void ScoreComponentCollection::Assign(const ScoreProducer* sp, const string line) { - assert(sp->GetNumScoreComponents() == ScoreProducer::unlimited); + CHECK(sp->GetNumScoreComponents() == ScoreProducer::unlimited); istringstream istr(line); while(istr) { string namestring; diff --git a/moses/src/ScoreComponentCollection.h b/moses/src/ScoreComponentCollection.h index 94e320780..3c2186d90 100644 --- a/moses/src/ScoreComponentCollection.h +++ b/moses/src/ScoreComponentCollection.h @@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #define moses_ScoreComponentCollection_h #include <numeric> -#include <cassert> #include <sstream> #ifdef MPI_ENABLE @@ -31,6 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <boost/serialization/split_member.hpp> #endif +#include "util/check.hh" + #include "LMList.h" #include "ScoreProducer.h" #include "FeatureVector.h" @@ -72,7 +73,7 @@ private: static IndexPair GetIndexes(const ScoreProducer* sp) { ScoreIndexMap::const_iterator indexIter = s_scoreIndexes.find(sp); - assert(indexIter != s_scoreIndexes.end()); + CHECK(indexIter != s_scoreIndexes.end()); return indexIter->second; } @@ -196,7 +197,7 @@ public: void PlusEquals(const ScoreProducer* sp, const std::vector<float>& scores) { IndexPair indexes = GetIndexes(sp); - assert(scores.size() == indexes.second - indexes.first); + CHECK(scores.size() == indexes.second - indexes.first); for (size_t i = 0; i < scores.size(); ++i) { m_scores[i + indexes.first] += scores[i]; } @@ -208,14 +209,14 @@ public: void PlusEquals(const ScoreProducer* sp, float score) { IndexPair indexes = GetIndexes(sp); - assert(1 == indexes.second - indexes.first); + CHECK(1 == indexes.second - indexes.first); m_scores[indexes.first] += score; } //For features which have an unbounded number of components void PlusEquals(const ScoreProducer*sp, const std::string& name, float score) { - assert(sp->GetNumScoreComponents() == ScoreProducer::unlimited); + CHECK(sp->GetNumScoreComponents() == ScoreProducer::unlimited); FName fname(sp->GetScoreProducerDescription(),name); m_scores[fname] += score; } @@ -230,7 +231,7 @@ public: void Assign(const ScoreProducer* sp, const std::vector<float>& scores) { IndexPair indexes = GetIndexes(sp); - assert(scores.size() == indexes.second - indexes.first); + CHECK(scores.size() == indexes.second - indexes.first); for (size_t i = 0; i < scores.size(); ++i) { m_scores[i + indexes.first] = scores[i]; } @@ -242,18 +243,20 @@ public: void Assign(const ScoreProducer* sp, float score) { IndexPair indexes = GetIndexes(sp); - assert(1 == indexes.second - indexes.first); + CHECK(1 == indexes.second - indexes.first); m_scores[indexes.first] = score; } + //For features which have an unbounded number of components - void Assign(const ScoreProducer*sp, const std::string name, float score) + void Assign(const ScoreProducer*sp, const std::string name, float score) { - assert(sp->GetNumScoreComponents() == ScoreProducer::unlimited); + CHECK(sp->GetNumScoreComponents() == ScoreProducer::unlimited); FName fname(sp->GetScoreProducerDescription(),name); m_scores[fname] = score; } + //Read sparse features from string void Assign(const ScoreProducer* sp, const std::string line); @@ -272,7 +275,7 @@ public: float PartialInnerProduct(const ScoreProducer* sp, const std::vector<float>& rhs) const { std::vector<float> lhs = GetScoresForProducer(sp); - assert(lhs.size() == rhs.size()); + CHECK(lhs.size() == rhs.size()); return std::inner_product(lhs.begin(), lhs.end(), rhs.begin(), 0.0f); } @@ -337,7 +340,7 @@ public: float GetScoreForProducer(const ScoreProducer* sp) const { IndexPair indexes = GetIndexes(sp); - assert(indexes.second - indexes.first == 1); + CHECK(indexes.second - indexes.first == 1); return m_scores[indexes.first]; } @@ -345,7 +348,7 @@ public: float GetScoreForProducer (const ScoreProducer* sp, const std::string& name) const { - assert(sp->GetNumScoreComponents() == ScoreProducer::unlimited); + CHECK(sp->GetNumScoreComponents() == ScoreProducer::unlimited); FName fname(sp->GetScoreProducerDescription(),name); return m_scores[fname]; } diff --git a/moses/src/ScoreComponentCollectionTest.cpp b/moses/src/ScoreComponentCollectionTest.cpp new file mode 100644 index 000000000..10e96a017 --- /dev/null +++ b/moses/src/ScoreComponentCollectionTest.cpp @@ -0,0 +1,141 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2010 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + +#include <stdexcept> + +#include <boost/test/unit_test.hpp> + +#include "DummyScoreProducers.h" +#include "FeatureFunction.h" +#include "ScoreComponentCollection.h" + +using namespace Moses; +using namespace std; + +BOOST_AUTO_TEST_SUITE(scc) + +class MockSingleFeature : public StatelessFeatureFunction { + public: + MockSingleFeature(): StatelessFeatureFunction("MockSingle",1) {} + std::string GetScoreProducerWeightShortName(unsigned) const {return "sf";} +}; + +class MockMultiFeature : public StatelessFeatureFunction { + public: + MockMultiFeature(): StatelessFeatureFunction("MockMulti", 5) {} + std::string GetScoreProducerWeightShortName(unsigned) const {return "mf";} +}; + +class MockSparseFeature : public StatelessFeatureFunction { + public: + MockSparseFeature(): StatelessFeatureFunction("MockSparse", ScoreProducer::unlimited) {} + std::string GetScoreProducerWeightShortName(unsigned) const {return "sf";} +}; + + +struct MockProducers { + MockProducers() {} + + MockSingleFeature single; + MockMultiFeature multi; + MockSparseFeature sparse; +}; + +BOOST_FIXTURE_TEST_CASE(ctor, MockProducers) +{ + ScoreComponentCollection scc; + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&single),0); + float expected[] = {0,0,0,0,0}; + std::vector<float> actual= scc.GetScoresForProducer(&multi); + BOOST_CHECK_EQUAL_COLLECTIONS(expected, expected+5, actual.begin(), actual.begin()+5); +} + +BOOST_FIXTURE_TEST_CASE(plusequals, MockProducers) +{ + float arr1[] = {1,2,3,4,5}; + float arr2[] = {2,4,6,8,10}; + std::vector<float> vec1(arr1,arr1+5); + std::vector<float> vec2(arr2,arr2+5); + + ScoreComponentCollection scc; + scc.PlusEquals(&single, 3.4f); + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&single), 3.4f); + scc.PlusEquals(&multi,vec1); + std::vector<float> actual = scc.GetScoresForProducer(&multi); + BOOST_CHECK_EQUAL_COLLECTIONS(vec1.begin(),vec1.end() + ,actual.begin(), actual.end()); + scc.PlusEquals(&multi,vec1); + actual = scc.GetScoresForProducer(&multi); + BOOST_CHECK_EQUAL_COLLECTIONS(vec2.begin(),vec2.end(), + actual.begin(), actual.end()); + + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&single), 3.4f); +} + +BOOST_FIXTURE_TEST_CASE(sparse_feature, MockProducers) +{ + ScoreComponentCollection scc; + scc.Assign(&sparse, "first", 1.3f); + scc.Assign(&sparse, "second", 2.1f); + BOOST_CHECK_EQUAL( scc.GetScoreForProducer(&sparse,"first"), 1.3f); + BOOST_CHECK_EQUAL( scc.GetScoreForProducer(&sparse,"second"), 2.1f); + BOOST_CHECK_EQUAL( scc.GetScoreForProducer(&sparse,"third"), 0.0f); + scc.Assign(&sparse, "first", -1.9f); + BOOST_CHECK_EQUAL( scc.GetScoreForProducer(&sparse,"first"), -1.9f); + scc.PlusEquals(&sparse, "first", -1.9f); + BOOST_CHECK_EQUAL( scc.GetScoreForProducer(&sparse,"first"), -3.8f); +} + +/* + Doesn't work because of the static registration of ScoreProducers + in ScoreComponentCollection. +BOOST_FIXTURE_TEST_CASE(save, MockProducers) +{ + ScoreComponentCollection scc; + scc.Assign(&sparse, "first", 1.1f); + scc.Assign(&single, 0.25f); + float arr[] = {1,2.1,3,4,5}; + std::vector<float> vec1(arr,arr+5); + scc.Assign(&multi,vec1); + ostringstream out; + scc.Save(out); + cerr << out.str() << endl; + istringstream in (out.str()); + string line; + getline(in,line); + BOOST_CHECK_EQUAL(line, "MockSingle:4_1 0.25"); + getline(in,line); + BOOST_CHECK_EQUAL(line, "MockMulti:4_1 1"); + getline(in,line); + BOOST_CHECK_EQUAL(line, "MockMulti:4_2 2.1"); + getline(in,line); + BOOST_CHECK_EQUAL(line, "MockMulti:4_3 3"); + getline(in,line); + BOOST_CHECK_EQUAL(line, "MockMulti:4_4 4"); + getline(in,line); + BOOST_CHECK_EQUAL(line, "MockMulti:4_5 5"); + getline(in,line); + BOOST_CHECK_EQUAL(line,"MockSparse:4_first 1.1"); + BOOST_CHECK(!getline(in,line)); +} +*/ + + +BOOST_AUTO_TEST_SUITE_END() + diff --git a/moses/src/SearchCubePruning.cpp b/moses/src/SearchCubePruning.cpp index 452e9ff61..4f98208bb 100644 --- a/moses/src/SearchCubePruning.cpp +++ b/moses/src/SearchCubePruning.cpp @@ -41,7 +41,7 @@ SearchCubePruning::SearchCubePruning(Manager& manager, const InputType &source, :Search(manager) ,m_source(source) ,m_hypoStackColl(source.GetSize() + 1) - ,m_initialTargetPhrase(Output, source.m_initialTargetPhrase) + ,m_initialTargetPhrase(source.m_initialTargetPhrase) ,m_start(clock()) ,m_transOptColl(transOptColl) { diff --git a/moses/src/SearchNormal.cpp b/moses/src/SearchNormal.cpp index 334a73bcd..9f26270e9 100644 --- a/moses/src/SearchNormal.cpp +++ b/moses/src/SearchNormal.cpp @@ -16,7 +16,7 @@ SearchNormal::SearchNormal(Manager& manager, const InputType &source, const Tran :Search(manager) ,m_source(source) ,m_hypoStackColl(source.GetSize() + 1) - ,m_initialTargetPhrase(Output, source.m_initialTargetPhrase) + ,m_initialTargetPhrase(source.m_initialTargetPhrase) ,m_start(clock()) ,interrupted_flag(0) ,m_transOptColl(transOptColl) diff --git a/moses/src/Sentence.cpp b/moses/src/Sentence.cpp index 1b53aedf7..87ede7c7a 100644 --- a/moses/src/Sentence.cpp +++ b/moses/src/Sentence.cpp @@ -33,11 +33,10 @@ using namespace std; namespace Moses { -Sentence::Sentence(FactorDirection direction) - : Phrase(direction, 0) +Sentence::Sentence() + : Phrase(0) , InputType() { - assert(direction == Input); const StaticData& staticData = StaticData::Instance(); if (staticData.GetSearchAlgorithm() == ChartDecoding) { m_defaultLabelSet.insert(StaticData::Instance().GetInputDefaultNonTerminal()); @@ -176,7 +175,7 @@ Sentence::CreateTranslationOptionCollection(const TranslationSystem* system) con size_t maxNoTransOptPerCoverage = StaticData::Instance().GetMaxNoTransOptPerCoverage(); float transOptThreshold = StaticData::Instance().GetTranslationOptionThreshold(); TranslationOptionCollection *rv= new TranslationOptionCollectionText(system, *this, maxNoTransOptPerCoverage, transOptThreshold); - assert(rv); + CHECK(rv); return rv; } void Sentence::Print(std::ostream& out) const diff --git a/moses/src/Sentence.h b/moses/src/Sentence.h index 20b34c4c7..b1c25f9dd 100644 --- a/moses/src/Sentence.h +++ b/moses/src/Sentence.h @@ -60,7 +60,7 @@ private: public: - Sentence(FactorDirection direction); + Sentence(); InputTypeEnum GetType() const { return SentenceInput; diff --git a/moses/src/SourceWordDeletionFeature.cpp b/moses/src/SourceWordDeletionFeature.cpp index 04033c225..3b851cdc7 100644 --- a/moses/src/SourceWordDeletionFeature.cpp +++ b/moses/src/SourceWordDeletionFeature.cpp @@ -41,7 +41,7 @@ void SourceWordDeletionFeature::Evaluate(const TargetPhrase& targetPhrase, // flag aligned words const AlignmentInfo &alignment = targetPhrase.GetAlignmentInfo(); bool aligned[16]; - assert(sourceLength < 16); + CHECK(sourceLength < 16); for(size_t i=0; i<sourceLength; i++) { aligned[i] = false; } diff --git a/moses/src/StaticData.cpp b/moses/src/StaticData.cpp index 5e747e5c9..33160d841 100644 --- a/moses/src/StaticData.cpp +++ b/moses/src/StaticData.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ #include <string> -#include <cassert> +#include "util/check.hh" #include "PhraseDictionaryMemory.h" #include "DecodeStepTranslation.h" #include "DecodeStepGeneration.h" @@ -483,16 +483,16 @@ bool StaticData::LoadData(Parameter *parameter) if (vecStr.size() == 1) { sentenceID++; - Phrase phrase(Output, 0); + Phrase phrase(0); phrase.CreateFromString(GetOutputFactorOrder(), vecStr[0], GetFactorDelimiter()); m_constraints.insert(make_pair(sentenceID,phrase)); } else if (vecStr.size() == 2) { sentenceID = Scan<long>(vecStr[0]); - Phrase phrase(Output, 0); + Phrase phrase(0); phrase.CreateFromString(GetOutputFactorOrder(), vecStr[1], GetFactorDelimiter()); m_constraints.insert(make_pair(sentenceID,phrase)); } else { - assert(false); + CHECK(false); } } } @@ -1166,14 +1166,14 @@ bool StaticData::LoadGenerationTables() VERBOSE(1, filePath << endl); m_generationDictionary.push_back(new GenerationDictionary(numFeatures, input,output)); - assert(m_generationDictionary.back() && "could not create GenerationDictionary"); + CHECK(m_generationDictionary.back() && "could not create GenerationDictionary"); if (!m_generationDictionary.back()->Load(filePath, Output)) { delete m_generationDictionary.back(); return false; } vector<float> gdWeights; for(size_t i = 0; i < numFeatures; i++) { - assert(currWeightNum < weight.size()); + CHECK(currWeightNum < weight.size()); gdWeights.push_back(weight[currWeightNum++]); } SetWeights(m_generationDictionary.back(), gdWeights); @@ -1192,7 +1192,7 @@ bool StaticData::LoadPhraseTables() VERBOSE(2,"Creating phrase table features" << endl); // language models must be loaded prior to loading phrase tables - assert(m_fLMsLoaded); + CHECK(m_fLMsLoaded); // load phrase translation tables if (m_parameter->GetParam("ttable-file").size() > 0) { // weights @@ -1239,7 +1239,7 @@ bool StaticData::LoadPhraseTables() } else implementation = (PhraseTableImplementation) Scan<int>(token[0]); - assert(token.size() >= 5); + CHECK(token.size() >= 5); //characteristics of the phrase table vector<FactorType> input = Tokenize<FactorType>(token[1], ",") @@ -1250,7 +1250,7 @@ bool StaticData::LoadPhraseTables() size_t numScoreComponent = Scan<size_t>(token[3]); string filePath= token[4]; - assert(weightAll.size() >= weightAllOffset + numScoreComponent); + CHECK(weightAll.size() >= weightAllOffset + numScoreComponent); // weights for this phrase dictionary // first InputScores (if any), then translation scores @@ -1314,7 +1314,7 @@ bool StaticData::LoadPhraseTables() alignmentsFile= token[6]; } - assert(numScoreComponent==weight.size()); + CHECK(numScoreComponent==weight.size()); //This is needed for regression testing, but the phrase table @@ -1391,7 +1391,7 @@ void StaticData::LoadNonTerminals() string line; while(getline(inStream, line)) { vector<string> tokens = Tokenize(line); - assert(tokens.size() == 2); + CHECK(tokens.size() == 2); UnknownLHSEntry entry(tokens[0], Scan<float>(tokens[1])); m_unknownLHS.push_back(entry); } @@ -1451,7 +1451,7 @@ bool StaticData::LoadDecodeGraphs() // For specifying multiple translation model decodeGraphInd = Scan<size_t>(token[0]); //the vectorList index can only increment by one - assert(decodeGraphInd == prevDecodeGraphInd || decodeGraphInd == prevDecodeGraphInd + 1); + CHECK(decodeGraphInd == prevDecodeGraphInd || decodeGraphInd == prevDecodeGraphInd + 1); if (decodeGraphInd > prevDecodeGraphInd) { prev = NULL; } @@ -1459,7 +1459,7 @@ bool StaticData::LoadDecodeGraphs() index = Scan<size_t>(token[2]); } else { UserMessage::Add("Malformed mapping!"); - assert(false); + CHECK(false); } DecodeStep* decodeStep = NULL; @@ -1470,7 +1470,7 @@ bool StaticData::LoadDecodeGraphs() strme << "No phrase dictionary with index " << index << " available!"; UserMessage::Add(strme.str()); - assert(false); + CHECK(false); } decodeStep = new DecodeStepTranslation(m_phraseDictionary[index], prev); break; @@ -1480,16 +1480,16 @@ bool StaticData::LoadDecodeGraphs() strme << "No generation dictionary with index " << index << " available!"; UserMessage::Add(strme.str()); - assert(false); + CHECK(false); } decodeStep = new DecodeStepGeneration(m_generationDictionary[index], prev); break; case InsertNullFertilityWord: - assert(!"Please implement NullFertilityInsertion."); + CHECK(!"Please implement NullFertilityInsertion."); break; } - assert(decodeStep); + CHECK(decodeStep); if (m_decodeGraphs.size() < decodeGraphInd + 1) { DecodeGraph *decodeGraph; if (m_searchAlgorithm == ChartDecoding) { diff --git a/moses/src/SyntacticLanguageModelFiles.h b/moses/src/SyntacticLanguageModelFiles.h index 318e22636..c6533c424 100644 --- a/moses/src/SyntacticLanguageModelFiles.h +++ b/moses/src/SyntacticLanguageModelFiles.h @@ -37,7 +37,7 @@ template <class MH, class MO> std::cerr << "Reading syntactic language model files...\n"; // For each model file... for ( int a=0, n=filePaths.size(); a<n; a++ ) { // read models - FILE* pf = fopen(filePaths[a].c_str(),"r"); //assert(pf); // Read model file + FILE* pf = fopen(filePaths[a].c_str(),"r"); //CHECK(pf); // Read model file if(!pf){ std::cerr << "Error loading model file " << filePaths[a] << std::endl; return; diff --git a/moses/src/TargetBigramFeature.cpp b/moses/src/TargetBigramFeature.cpp index 9f5078b26..a9ad2216b 100644 --- a/moses/src/TargetBigramFeature.cpp +++ b/moses/src/TargetBigramFeature.cpp @@ -54,7 +54,7 @@ FFState* TargetBigramFeature::Evaluate(const Hypothesis& cur_hypo, ScoreComponentCollection* accumulator) const { const TargetBigramState* tbState = dynamic_cast<const TargetBigramState*>(prev_state); - assert(tbState); + CHECK(tbState); // current hypothesis target phrase const Phrase& targetPhrase = cur_hypo.GetCurrTargetPhrase(); diff --git a/moses/src/TargetBigramFeature.h b/moses/src/TargetBigramFeature.h index c9d7cf22f..76b4f6ef7 100644 --- a/moses/src/TargetBigramFeature.h +++ b/moses/src/TargetBigramFeature.h @@ -51,8 +51,7 @@ public: int /* featureID */, ScoreComponentCollection* ) const { - /* Not implemented */ - assert(0); + abort(); } private: FactorType m_factorType; diff --git a/moses/src/TargetBigramFeatureTest.cpp b/moses/src/TargetBigramFeatureTest.cpp new file mode 100644 index 000000000..2ee7243bb --- /dev/null +++ b/moses/src/TargetBigramFeatureTest.cpp @@ -0,0 +1,189 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2010 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + +#include <cstdio> +#include <cstdlib> +#include <string> + +#include <boost/test/unit_test.hpp> + +#include "FactorCollection.h" +#include "Sentence.h" +#include "TargetBigramFeature.h" +#include "Word.h" + +#include "MockHypothesis.h" + +using namespace std; +using namespace Moses; + +namespace MosesTest +{ + +BOOST_AUTO_TEST_SUITE(target_bigram) + +static Word MakeWord(string text) { + FactorCollection &factorCollection = FactorCollection::Instance(); + const Factor* f = factorCollection.AddFactor(Input,0,text); + Word w; + w.SetFactor(0,f); + return w; +} + +class VocabFileFixture { + public: + template<class I> + VocabFileFixture(I begin, I end) + { + filename = string(tmpnam(NULL)); + ofstream out(filename.c_str()); + BOOST_CHECK(out); + for (I i = begin; i != end; ++i) + { + out << *i << endl; + } + out.close(); + } + + ~VocabFileFixture() + { + BOOST_CHECK(!remove(filename.c_str())); + } + + string filename; +}; + +/* +BOOST_AUTO_TEST_CASE(Test2) +{ + HypothesisFixture hypos; + cerr << hypos.empty() << ", " << *hypos.empty() << endl; + cerr << hypos.partial() << ", " << *hypos.partial() << endl; + cerr << hypos.full() << ", " << *hypos.full() << endl; + BOOST_CHECK(true); +} */ + +BOOST_AUTO_TEST_CASE(state_compare) +{ + Word w1 = MakeWord("w1"); + Word w2 = MakeWord("w2"); + TargetBigramState s1(w1); + TargetBigramState s2(w2); + BOOST_CHECK_EQUAL(s1.Compare(s1),0); + BOOST_CHECK_EQUAL(s2.Compare(s2),0); + BOOST_CHECK_NE(s1.Compare(s2),0); + BOOST_CHECK_NE(s2.Compare(s1),0); + +} + +BOOST_AUTO_TEST_CASE(load) +{ + TargetBigramFeature tbf; + string vocab[] = {"je", "ne", "pas"}; + VocabFileFixture vocabFixture(vocab,vocab+3); + BOOST_CHECK(tbf.Load(vocabFixture.filename)); + BOOST_CHECK(!tbf.Load("/gweugegyiegy")); +} + +BOOST_AUTO_TEST_CASE(score_components) +{ + TargetBigramFeature tbf; + BOOST_CHECK_EQUAL( + tbf.GetNumScoreComponents(), + ScoreProducer::unlimited); +} + +BOOST_AUTO_TEST_CASE(empty_hypo) +{ + Sentence s; + TargetBigramFeature tbf; + auto_ptr<const FFState> ffs(tbf.EmptyHypothesisState(s)); + BOOST_CHECK(ffs.get()); + TargetBigramState expected(MakeWord(BOS_)); + BOOST_CHECK_EQUAL(ffs->Compare(expected),0); +} + +//Test of evaluate() where a vocab is specified +BOOST_AUTO_TEST_CASE(evaluate_vocab) +{ + string vocab[] = {"i", "do"}; + VocabFileFixture vocabFile(vocab,vocab+2); + HypothesisFixture hypos; + TargetBigramFeature tbf; + BOOST_CHECK(tbf.Load(vocabFile.filename)); + TargetBigramState prevState(MakeWord("i")); + ScoreComponentCollection scc; + auto_ptr<FFState> currState( + tbf.Evaluate(*hypos.partial(), &prevState, &scc)); + + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&tbf, "i:do"),1); + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&tbf, "do:not"),0); + BOOST_CHECK(! currState->Compare(TargetBigramState(MakeWord("not")))); +} + +//Test of evaluate() where no vocab file is specified +BOOST_AUTO_TEST_CASE(evaluate_all) +{ + HypothesisFixture hypos; + TargetBigramFeature tbf; + BOOST_CHECK(tbf.Load("*")); + TargetBigramState prevState(MakeWord("i")); + ScoreComponentCollection scc; + auto_ptr<FFState> currState( + tbf.Evaluate(*hypos.partial(),&prevState,&scc)); + + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&tbf, "i:do"),1); + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&tbf, "do:not"),1); + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&tbf, "not:</s>"),0); + BOOST_CHECK(! currState->Compare(TargetBigramState(MakeWord("not")))); + +} + +BOOST_AUTO_TEST_CASE(evaluate_empty) +{ + HypothesisFixture hypos; + TargetBigramFeature tbf; + BOOST_CHECK(tbf.Load("*")); + auto_ptr<const FFState> prevState(tbf.EmptyHypothesisState(Sentence())); + ScoreComponentCollection scc; + auto_ptr<const FFState> currState( + tbf.Evaluate(*hypos.empty(),prevState.get(),&scc)); + BOOST_CHECK(! currState->Compare(*prevState)); +} + +BOOST_AUTO_TEST_CASE(evaluate_eos) +{ + HypothesisFixture hypos; + TargetBigramFeature tbf; + BOOST_CHECK(tbf.Load("*")); + TargetBigramState prevState(MakeWord("know")); + ScoreComponentCollection scc; + auto_ptr<const FFState> currState( + tbf.Evaluate(*hypos.full(),&prevState,&scc)); + + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&tbf, ".:</s>"),1); + BOOST_CHECK_EQUAL(scc.GetScoreForProducer(&tbf, "know:."),1); + + BOOST_CHECK(! currState.get()); +} + +BOOST_AUTO_TEST_SUITE_END() + +} + diff --git a/moses/src/TargetNgramFeature.h b/moses/src/TargetNgramFeature.h index bc6d5ba66..681e7d6aa 100644 --- a/moses/src/TargetNgramFeature.h +++ b/moses/src/TargetNgramFeature.h @@ -124,8 +124,8 @@ private: public: TargetNgramChartState(const ChartHypothesis &hypo, int featureId, size_t order) - :m_contextPrefix(Output, order - 1), - m_contextSuffix(Output, order - 1) + :m_contextPrefix(order - 1), + m_contextSuffix(order - 1) { m_numTargetTerminals = hypo.GetCurrTargetPhrase().GetNumTerminals(); const WordsRange range = hypo.GetCurrSourceRange(); diff --git a/moses/src/TargetPhrase.cpp b/moses/src/TargetPhrase.cpp index 8aef3e855..8dae1c694 100644 --- a/moses/src/TargetPhrase.cpp +++ b/moses/src/TargetPhrase.cpp @@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include <cassert> +#include "util/check.hh" #include <algorithm> #include <boost/lexical_cast.hpp> #include "util/tokenize_piece.hh" @@ -39,8 +39,8 @@ using namespace std; namespace Moses { -TargetPhrase::TargetPhrase(FactorDirection direction, std::string out_string) - :Phrase(direction, 0),m_transScore(0.0), m_fullScore(0.0), m_sourcePhrase(direction,0) +TargetPhrase::TargetPhrase(std::string out_string) + :Phrase(0),m_transScore(0.0), m_fullScore(0.0), m_sourcePhrase(0) , m_alignmentInfo(&AlignmentInfoCollection::Instance().GetEmptyAlignmentInfo()) { @@ -50,11 +50,11 @@ TargetPhrase::TargetPhrase(FactorDirection direction, std::string out_string) } -TargetPhrase::TargetPhrase(FactorDirection direction) - :Phrase(direction, ARRAY_SIZE_INCR) +TargetPhrase::TargetPhrase() + :Phrase(ARRAY_SIZE_INCR) , m_transScore(0.0) , m_fullScore(0.0) - ,m_sourcePhrase(direction, 0) + ,m_sourcePhrase(0) , m_alignmentInfo(&AlignmentInfoCollection::Instance().GetEmptyAlignmentInfo()) { } @@ -63,7 +63,7 @@ TargetPhrase::TargetPhrase(const Phrase &phrase) : Phrase(phrase) , m_transScore(0.0) , m_fullScore(0.0) - , m_sourcePhrase(phrase.GetDirection(),0) + , m_sourcePhrase(0) , m_alignmentInfo(&AlignmentInfoCollection::Instance().GetEmptyAlignmentInfo()) { } @@ -124,7 +124,7 @@ void TargetPhrase::SetScore(const TranslationSystem* system, const Scores &score vector<float> weights = StaticData::Instance().GetWeights(prod); //expand the input weight vector - assert(scoreVector.size() <= prod->GetNumScoreComponents()); + CHECK(scoreVector.size() <= prod->GetNumScoreComponents()); Scores sizedScoreVector = scoreVector; sizedScoreVector.resize(prod->GetNumScoreComponents(),0.0f); @@ -137,7 +137,7 @@ void TargetPhrase::SetScore(const ScoreProducer* translationScoreProducer, const vector<float> &weightT, float weightWP, const LMList &languageModels) { - assert(weightT.size() == scoreVector.size()); + CHECK(weightT.size() == scoreVector.size()); // calc average score if non-best m_transScore = std::inner_product(scoreVector.begin(), scoreVector.end(), weightT.begin(), 0.0f); @@ -191,7 +191,7 @@ void TargetPhrase::SetScoreChart(const ScoreProducer* translationScoreProducer, ,const WordPenaltyProducer* wpProducer) { - assert(weightT.size() == scoreVector.size()); + CHECK(weightT.size() == scoreVector.size()); // calc average score if non-best m_transScore = std::inner_product(scoreVector.begin(), scoreVector.end(), weightT.begin(), 0.0f); @@ -252,7 +252,7 @@ void TargetPhrase::SetScore(const ScoreProducer* producer, const Scores &scoreVe void TargetPhrase::SetWeights(const ScoreProducer* translationScoreProducer, const vector<float> &weightT) { // calling this function in case of confusion net input is undefined - assert(StaticData::Instance().GetInputType()==SentenceInput); + CHECK(StaticData::Instance().GetInputType()==SentenceInput); /* one way to fix this, you have to make sure the weightT contains (in addition to the usual phrase translation scaling factors) the input diff --git a/moses/src/TargetPhrase.h b/moses/src/TargetPhrase.h index 3971b42d4..f5e20271c 100644 --- a/moses/src/TargetPhrase.h +++ b/moses/src/TargetPhrase.h @@ -61,8 +61,8 @@ protected: Word m_lhsTarget; public: - TargetPhrase(FactorDirection direction=Output); - TargetPhrase(FactorDirection direction, std::string out_string); + TargetPhrase(); + TargetPhrase(std::string out_string); TargetPhrase(const Phrase &); ~TargetPhrase(); diff --git a/moses/src/TargetWordInsertionFeature.cpp b/moses/src/TargetWordInsertionFeature.cpp index 7f98794ab..88baf8779 100644 --- a/moses/src/TargetWordInsertionFeature.cpp +++ b/moses/src/TargetWordInsertionFeature.cpp @@ -41,7 +41,7 @@ void TargetWordInsertionFeature::Evaluate(const TargetPhrase& targetPhrase, // flag aligned words const AlignmentInfo &alignment = targetPhrase.GetAlignmentInfo(); bool aligned[16]; - assert(targetLength < 16); + CHECK(targetLength < 16); for(size_t i=0; i<targetLength; i++) { aligned[i] = false; } diff --git a/moses/src/TranslationOption.cpp b/moses/src/TranslationOption.cpp index e2e875af3..c823dadb8 100644 --- a/moses/src/TranslationOption.cpp +++ b/moses/src/TranslationOption.cpp @@ -88,7 +88,7 @@ TranslationOption::TranslationOption(const WordsRange &wordsRange TranslationOption::TranslationOption(const TranslationOption ©) : m_targetPhrase(copy.m_targetPhrase) //, m_sourcePhrase(new Phrase(*copy.m_sourcePhrase)) // TODO use when confusion network trans opt for confusion net properly implemented - , m_sourcePhrase( (copy.m_sourcePhrase == NULL) ? new Phrase(Input, ARRAY_SIZE_INCR) : new Phrase(*copy.m_sourcePhrase)) + , m_sourcePhrase( (copy.m_sourcePhrase == NULL) ? new Phrase(ARRAY_SIZE_INCR) : new Phrase(*copy.m_sourcePhrase)) , m_sourceWordsRange(copy.m_sourceWordsRange) , m_futureScore(copy.m_futureScore) , m_scoreBreakdown(copy.m_scoreBreakdown) @@ -98,7 +98,7 @@ TranslationOption::TranslationOption(const TranslationOption ©) TranslationOption::TranslationOption(const TranslationOption ©, const WordsRange &sourceWordsRange) : m_targetPhrase(copy.m_targetPhrase) //, m_sourcePhrase(new Phrase(*copy.m_sourcePhrase)) // TODO use when confusion network trans opt for confusion net properly implemented - , m_sourcePhrase( (copy.m_sourcePhrase == NULL) ? new Phrase(Input, ARRAY_SIZE_INCR) : new Phrase(*copy.m_sourcePhrase)) + , m_sourcePhrase( (copy.m_sourcePhrase == NULL) ? new Phrase(ARRAY_SIZE_INCR) : new Phrase(*copy.m_sourcePhrase)) , m_sourceWordsRange(sourceWordsRange) , m_futureScore(copy.m_futureScore) , m_scoreBreakdown(copy.m_scoreBreakdown) @@ -107,7 +107,7 @@ TranslationOption::TranslationOption(const TranslationOption ©, const WordsR void TranslationOption::MergeNewFeatures(const Phrase& phrase, const ScoreComponentCollection& score, const std::vector<FactorType>& featuresToAdd) { - assert(phrase.GetSize() == m_targetPhrase.GetSize()); + CHECK(phrase.GetSize() == m_targetPhrase.GetSize()); if (featuresToAdd.size() == 1) { m_targetPhrase.MergeFactors(phrase, featuresToAdd[0]); } else if (featuresToAdd.empty()) { diff --git a/moses/src/TranslationOptionCollection.cpp b/moses/src/TranslationOptionCollection.cpp index 826234e2e..d9eefc9d6 100644 --- a/moses/src/TranslationOptionCollection.cpp +++ b/moses/src/TranslationOptionCollection.cpp @@ -221,7 +221,7 @@ void TranslationOptionCollection::ProcessOneUnknownWord(const Word &sourceWord,s // modify the starting bitmap } - Phrase* m_unksrc = new Phrase(Input,1); + Phrase* m_unksrc = new Phrase(1); m_unksrc->AddWord() = sourceWord; m_unksrcs.push_back(m_unksrc); @@ -572,7 +572,7 @@ void TranslationOptionCollection::CreateXmlOptionsForRange(size_t, size_t) void TranslationOptionCollection::Add(TranslationOption *translationOption) { const WordsRange &coverage = translationOption->GetSourceWordsRange(); - assert(coverage.GetEndPos() - coverage.GetStartPos() < m_collection[coverage.GetStartPos()].size()); + CHECK(coverage.GetEndPos() - coverage.GetStartPos() < m_collection[coverage.GetStartPos()].size()); m_collection[coverage.GetStartPos()][coverage.GetEndPos() - coverage.GetStartPos()].Add(translationOption); } @@ -643,7 +643,7 @@ TranslationOptionList &TranslationOptionCollection::GetTranslationOptionList(siz size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength(); maxSize = std::min(maxSize, maxSizePhrase); - assert(maxSize < m_collection[startPos].size()); + CHECK(maxSize < m_collection[startPos].size()); return m_collection[startPos][maxSize]; } const TranslationOptionList &TranslationOptionCollection::GetTranslationOptionList(size_t startPos, size_t endPos) const @@ -652,7 +652,7 @@ const TranslationOptionList &TranslationOptionCollection::GetTranslationOptionLi size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength(); maxSize = std::min(maxSize, maxSizePhrase); - assert(maxSize < m_collection[startPos].size()); + CHECK(maxSize < m_collection[startPos].size()); return m_collection[startPos][maxSize]; } diff --git a/moses/src/TranslationOptionList.h b/moses/src/TranslationOptionList.h index 926f5c13a..d56578029 100644 --- a/moses/src/TranslationOptionList.h +++ b/moses/src/TranslationOptionList.h @@ -2,7 +2,7 @@ #define moses_TranslationOptionList_h #include <vector> -#include <cassert> +#include "util/check.hh" #include <iostream> #include "Util.h" @@ -48,11 +48,11 @@ public: } const TranslationOption *Get(size_t ind) const { - assert(ind < m_coll.size()); + CHECK(ind < m_coll.size()); return m_coll[ind]; } void Remove( size_t ind ) { - assert(ind < m_coll.size()); + CHECK(ind < m_coll.size()); m_coll.erase( m_coll.begin()+ind ); } void Add(TranslationOption *transOpt) { diff --git a/moses/src/TranslationSystem.cpp b/moses/src/TranslationSystem.cpp index b50bd6211..f5dc13b8d 100644 --- a/moses/src/TranslationSystem.cpp +++ b/moses/src/TranslationSystem.cpp @@ -169,7 +169,7 @@ namespace Moses { } float TranslationSystem::GetWeightDistortion() const { - assert(m_distortionScoreProducer); + CHECK(m_distortionScoreProducer); return StaticData::Instance().GetWeight(m_distortionScoreProducer); } diff --git a/moses/src/TreeInput.cpp b/moses/src/TreeInput.cpp index a46d8409c..d6e0f1e78 100644 --- a/moses/src/TreeInput.cpp +++ b/moses/src/TreeInput.cpp @@ -149,7 +149,7 @@ bool TreeInput::ProcessAndStripXMLTags(string &line, std::vector<XMLParseOutput> // specified translations -> vector of phrases // multiple translations may be specified, separated by "||" vector<string> altTexts = TokenizeMultiCharSeparator(ParseXmlTagAttribute(tagContent,"label"), "||"); - assert(altTexts.size() == 1); + CHECK(altTexts.size() == 1); XMLParseOutput item(altTexts[0], range); sourceLabels.push_back(item); @@ -230,7 +230,7 @@ TranslationOptionCollection* TreeInput::CreateTranslationOptionCollection() cons void TreeInput::AddChartLabel(size_t startPos, size_t endPos, const Word &label , const std::vector<FactorType>& /* factorOrder */) { - assert(label.IsNonTerminal()); + CHECK(label.IsNonTerminal()); SourceLabelOverlap overlapType = StaticData::Instance().GetSourceLabelOverlap(); NonTerminalSet &list = GetLabelSet(startPos, endPos); @@ -273,7 +273,7 @@ std::ostream& operator<<(std::ostream &out, const TreeInput &input) const Word &word = *iter; out << "[" << startPos <<"," << endPos << "]=" << word << "(" << word.IsNonTerminal() << ") "; - assert(word.IsNonTerminal()); + CHECK(word.IsNonTerminal()); } } } diff --git a/moses/src/TreeInput.h b/moses/src/TreeInput.h index f621ef0bd..a6242d97e 100644 --- a/moses/src/TreeInput.h +++ b/moses/src/TreeInput.h @@ -37,8 +37,7 @@ protected: bool ProcessAndStripXMLTags(std::string &line, std::vector<XMLParseOutput> &sourceLabels); public: - TreeInput(FactorDirection direction) - : Sentence(direction) + TreeInput() {} InputTypeEnum GetType() const { diff --git a/moses/src/TrellisPath.cpp b/moses/src/TrellisPath.cpp index f50d57af4..c73575b2c 100644 --- a/moses/src/TrellisPath.cpp +++ b/moses/src/TrellisPath.cpp @@ -173,7 +173,7 @@ void TrellisPath::CreateDeviantPaths(TrellisPathList &pathColl) const Phrase TrellisPath::GetTargetPhrase() const { - Phrase targetPhrase(Output, ARRAY_SIZE_INCR); + Phrase targetPhrase(ARRAY_SIZE_INCR); int numHypo = (int) m_path.size(); for (int node = numHypo - 2 ; node >= 0 ; --node) { @@ -191,14 +191,14 @@ Phrase TrellisPath::GetSurfacePhrase() const { const std::vector<FactorType> &outputFactor = StaticData::Instance().GetOutputFactorOrder(); Phrase targetPhrase = GetTargetPhrase() - ,ret(Output, targetPhrase.GetSize()); + ,ret(targetPhrase.GetSize()); for (size_t pos = 0 ; pos < targetPhrase.GetSize() ; ++pos) { Word &newWord = ret.AddWord(); for (size_t i = 0 ; i < outputFactor.size() ; i++) { FactorType factorType = outputFactor[i]; const Factor *factor = targetPhrase.GetFactor(pos, factorType); - assert(factor); + CHECK(factor); newWord[factorType] = factor; } } @@ -221,7 +221,7 @@ WordsRange TrellisPath::GetTargetWordsRange(const Hypothesis &hypo) const } // have to give a hypo in the trellis path, but u didn't. - assert(false); + CHECK(false); return WordsRange(NOT_FOUND, NOT_FOUND); } diff --git a/moses/src/TypeDef.h b/moses/src/TypeDef.h index 859fc115a..bb439f5c9 100644 --- a/moses/src/TypeDef.h +++ b/moses/src/TypeDef.h @@ -72,36 +72,6 @@ const size_t DEFAULT_VERBOSE_LEVEL = 1; // for those using autoconf/automake #if HAVE_CONFIG_H #include "config.h" - -//#define TRACE_ENABLE 1 // REMOVE after we figure this out - -#define LM_INTERNAL 1 -#define LM_REMOTE 1 - -# ifdef HAVE_SRILM -# define LM_SRI 1 -# else -# undef LM_SRI -# endif - -# ifdef HAVE_IRSTLM -# define LM_IRST 1 -# endif - -# ifdef HAVE_RANDLM -# define LM_RAND 1 -# endif - -# ifdef HAVE_ORLM -# define LM_ORLM 1 -# endif - -# define LM_KEN 1 - -# ifdef HAVE_DMAPLM -# define LM_DMAP -# endif - #endif ///////////////////////////////////////////////// diff --git a/moses/src/Util.h b/moses/src/Util.h index 2dce299b4..1b0638ec2 100644 --- a/moses/src/Util.h +++ b/moses/src/Util.h @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #define moses_Util_h #include <iostream> -#include <cassert> +#include "util/check.hh" #include <fstream> #include <sstream> #include <string> @@ -285,7 +285,7 @@ inline float FloorScore(float logScore) inline float CalcTranslationScore(const std::vector<float> &probVector, const std::vector<float> &weightT) { - assert(weightT.size()==probVector.size()); + CHECK(weightT.size()==probVector.size()); float rv=0.0; for(float const *sb=&probVector[0],*se=sb+probVector.size(),*wb=&weightT[0]; sb!=se; ++sb, ++wb) @@ -333,7 +333,7 @@ inline void ShrinkToFit(T& v) { if(v.capacity()>v.size()) T(v).swap(v); - assert(v.capacity()==v.size()); + CHECK(v.capacity()==v.size()); } bool FileExists(const std::string& filePath); diff --git a/moses/src/Word.cpp b/moses/src/Word.cpp index 43629e033..1ff5df496 100644 --- a/moses/src/Word.cpp +++ b/moses/src/Word.cpp @@ -67,7 +67,7 @@ void Word::Merge(const Word &sourceWord) std::string Word::GetString(const vector<FactorType> factorType,bool endWithBlank) const { stringstream strme; - assert(factorType.size() <= MAX_NUM_FACTORS); + CHECK(factorType.size() <= MAX_NUM_FACTORS); const std::string& factorDelimiter = StaticData::Instance().GetFactorDelimiter(); bool firstPass = true; for (unsigned int i = 0 ; i < factorType.size() ; i++) { diff --git a/moses/src/WordLattice.h b/moses/src/WordLattice.h index c10d7d54b..21df48054 100644 --- a/moses/src/WordLattice.h +++ b/moses/src/WordLattice.h @@ -39,7 +39,7 @@ public: void GetAsEdgeMatrix(std::vector<std::vector<bool> >& edges) const; const NonTerminalSet &GetLabelSet(size_t /*startPos*/, size_t /*endPos*/) const { - assert(false); + CHECK(false); return *(new NonTerminalSet()); } diff --git a/moses/src/WordsBitmap.cpp b/moses/src/WordsBitmap.cpp index 6351ec006..b3203145f 100644 --- a/moses/src/WordsBitmap.cpp +++ b/moses/src/WordsBitmap.cpp @@ -37,9 +37,9 @@ int WordsBitmap::GetFutureCosts(int lastPos) const aip1 = (i+1==m_size || m_bitmap[i+1]); #ifndef NDEBUG - if( i>0 ) assert( aim1==(i==0||m_bitmap[i-1]==1)); - //assert( ai==a[i] ); - if( i+1<m_size ) assert( aip1==m_bitmap[i+1]); + if( i>0 ) CHECK( aim1==(i==0||m_bitmap[i-1]==1)); + //CHECK( ai==a[i] ); + if( i+1<m_size ) CHECK( aip1==m_bitmap[i+1]); #endif if((i==0||aim1)&&ai==0) { sum+=abs(lastPos-static_cast<int>(i)+1); @@ -52,7 +52,7 @@ int WordsBitmap::GetFutureCosts(int lastPos) const // sum+=getJumpCosts(lastPos,as,maxJumpWidth); sum+=abs(lastPos-static_cast<int>(m_size)+1); //getCosts(lastPos,as); - assert(sum>=0); + CHECK(sum>=0); // TRACE_ERR(sum<<"\n"); diff --git a/moses/src/WordsBitmap.h b/moses/src/WordsBitmap.h index 0364c8f28..370120571 100644 --- a/moses/src/WordsBitmap.h +++ b/moses/src/WordsBitmap.h @@ -204,7 +204,7 @@ public: //! converts bitmap into an integer ID: it consists of two parts: the first 16 bit are the pattern between the first gap and the last word-1, the second 16 bit are the number of filled positions. enforces a sentence length limit of 65535 and a max distortion of 16 WordsBitmapID GetID() const { - assert(m_size < (1<<16)); + CHECK(m_size < (1<<16)); size_t start = GetFirstGapPos(); if (start == NOT_FOUND) start = m_size; // nothing left @@ -212,7 +212,7 @@ public: size_t end = GetLastPos(); if (end == NOT_FOUND) end = 0; // nothing translated yet - assert(end < start || end-start <= 16); + CHECK(end < start || end-start <= 16); WordsBitmapID id = 0; for(size_t pos = end; pos > start; pos--) { id = id*2 + (int) GetValue(pos); @@ -222,7 +222,7 @@ public: //! converts bitmap into an integer ID, with an additional span covered WordsBitmapID GetIDPlus( size_t startPos, size_t endPos ) const { - assert(m_size < (1<<16)); + CHECK(m_size < (1<<16)); size_t start = GetFirstGapPos(); if (start == NOT_FOUND) start = m_size; // nothing left @@ -233,7 +233,7 @@ public: if (start == startPos) start = endPos+1; if (end < endPos) end = endPos; - assert(end < start || end-start <= 16); + CHECK(end < start || end-start <= 16); WordsBitmapID id = 0; for(size_t pos = end; pos > start; pos--) { id = id*2; diff --git a/moses/src/WordsRange.h b/moses/src/WordsRange.h index 51667093d..7191d259e 100644 --- a/moses/src/WordsRange.h +++ b/moses/src/WordsRange.h @@ -75,7 +75,7 @@ public: } inline size_t GetNumWordsBetween(const WordsRange& x) const { - assert(!Overlap(x)); + CHECK(!Overlap(x)); if (x.m_endPos < m_startPos) { return m_startPos - x.m_endPos; diff --git a/moses/src/XmlOption.cpp b/moses/src/XmlOption.cpp index ad56dd353..3e5c20689 100644 --- a/moses/src/XmlOption.cpp +++ b/moses/src/XmlOption.cpp @@ -344,7 +344,7 @@ bool ProcessAndStripXMLTags(string &line, vector<XmlOption*> &res, ReorderingCon targetPhrase.SetScore(scoreValue); XmlOption *option = new XmlOption(range,targetPhrase); - assert(option); + CHECK(option); res.push_back(option); } |