mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-17 07:20:48 +03:00
merge
This commit is contained in:
commit
7dd812180e
100
azure-pipelines.yml
Normal file
100
azure-pipelines.yml
Normal file
@ -0,0 +1,100 @@
|
||||
# Starter pipeline
|
||||
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||
# Add steps that build, run tests, deploy, and more:
|
||||
# https://aka.ms/yaml
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
#vmImage: 'ubuntu-latest'
|
||||
vmImage: 'ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
|
||||
- script: |
|
||||
echo Printing some environment information
|
||||
echo HOME: $HOME
|
||||
echo
|
||||
echo UBUNTU VERSION:
|
||||
cat /etc/lsb-release
|
||||
echo
|
||||
echo CPU INFO
|
||||
cat /proc/cpuinfo
|
||||
echo
|
||||
echo MEM INFO
|
||||
cat /proc/meminfo
|
||||
echo
|
||||
echo DISK INFO
|
||||
df -h
|
||||
echo
|
||||
echo PWD: $PWD
|
||||
echo
|
||||
ls
|
||||
displayName: 'Printing some environment information'
|
||||
|
||||
|
||||
## Installation commands for Ubuntu
|
||||
- script: |
|
||||
sudo apt-get install \
|
||||
g++ \
|
||||
git \
|
||||
subversion \
|
||||
automake \
|
||||
libtool \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
libboost-all-dev \
|
||||
libssl-dev \
|
||||
libbz2-dev \
|
||||
liblzma-dev \
|
||||
python-dev \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
make \
|
||||
cmake \
|
||||
libgoogle-perftools-dev \
|
||||
autoconf \
|
||||
doxygen
|
||||
displayName: 'Install Ubuntu packages'
|
||||
|
||||
- script: |
|
||||
wget "https://sourceforge.net/projects/cmph/files/v2.0.2/cmph-2.0.2.tar.gz/download"
|
||||
mv download cmph-2.0.2.tar.gz
|
||||
tar xvzf cmph-2.0.2.tar.gz
|
||||
cd cmph-2.0.2
|
||||
./configure --prefix=$PWD
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
displayName: 'Build and Install cmph'
|
||||
|
||||
- script: |
|
||||
wget "https://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/1.51.06/xmlrpc-c-1.51.06.tgz/download"
|
||||
mv download xmlrpc-c-1.51.06.tgz
|
||||
tar xvzf xmlrpc-c-1.51.06.tgz
|
||||
cd xmlrpc-c-1.51.06
|
||||
./configure --prefix=$PWD
|
||||
make
|
||||
make install
|
||||
sudo ldconfig
|
||||
cd ..
|
||||
displayName: 'Build and Install xmlrpc-c'
|
||||
|
||||
- script: |
|
||||
./bjam \
|
||||
--with-cmph=$PWD/cmph-2.0.2 \
|
||||
--with-xmlrpc-c=$PWD/xmlrpc-c-1.51.06 \
|
||||
-j2
|
||||
displayName: 'Build Moses'
|
||||
|
||||
# - script: |
|
||||
# ./bjam \
|
||||
# -j2
|
||||
# displayName: 'Build Moses'
|
||||
|
||||
# - task: ComponentGovernanceComponentDetection@0
|
||||
# inputs:
|
||||
# scanType: 'Register'
|
||||
# verbosity: 'Verbose'
|
||||
# alertWarningLevel: 'High'
|
33
cgmanifest.json
Normal file
33
cgmanifest.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"Registrations":[
|
||||
{
|
||||
"component": {
|
||||
"type": "git",
|
||||
"git": {
|
||||
"repositoryUrl": "https://github.com/moses-smt/mosesdecoder",
|
||||
"commitHash": "78ca5f3cc5aa671a8a5d36c56452e217e6f00828"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
"type": "git",
|
||||
"git": {
|
||||
"repositoryUrl": "https://git.code.sf.net/p/cmph/git",
|
||||
"commitHash": "a250982ade093f4eed0552bbdd22dd7b0432007f"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Component": {
|
||||
"Type": "other",
|
||||
"Other": {
|
||||
"Name": "xml-rpc-c",
|
||||
"Version": "1.51.06",
|
||||
"DownloadUrl": "https://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/1.51.06/xmlrpc-c-1.51.06.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
28
contrib/other-builds/MosesManagedDLL/ManagedMoses.cpp
Normal file
28
contrib/other-builds/MosesManagedDLL/ManagedMoses.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include <msclr/marshal_cppstd.h>
|
||||
#include "Moses2Wrapper.h"
|
||||
|
||||
using namespace System;
|
||||
using namespace msclr::interop;
|
||||
|
||||
//TODO: include headers as per the build process
|
||||
namespace Moses {
|
||||
public ref class Moses2Wrapper
|
||||
{
|
||||
public:
|
||||
Moses2Wrapper(String^ filePath) {
|
||||
const std::string standardString = marshal_as<std::string>(filePath);
|
||||
m_pWrapper = new Moses2::Moses2Wrapper(standardString);
|
||||
}
|
||||
~Moses2Wrapper() { this->!Moses2Wrapper(); }
|
||||
String^ Translate(String^ input, long requestId) {
|
||||
const std::string standardString = marshal_as<std::string>(input);
|
||||
std::string output = m_pWrapper->Translate(standardString, requestId);
|
||||
String^ str = gcnew String(output.c_str());
|
||||
return str;
|
||||
}
|
||||
protected:
|
||||
!Moses2Wrapper() { delete m_pWrapper; m_pWrapper = nullptr; }
|
||||
private:
|
||||
Moses2::Moses2Wrapper *m_pWrapper;
|
||||
};
|
||||
}
|
170
contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj
Normal file
170
contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" 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>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{5fb67144-27c9-4993-a084-e2097ffcc4fe}</ProjectGuid>
|
||||
<RootNamespace>MosesManagedDLL</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;MOSESMANAGEDDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;MOSESMANAGEDDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;MOSESMANAGEDDLL_EXPORTS;NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>F:\boost_1_72_0;D:\moses-mstranslator;D:\xmlrpc-c-1.51.06\include;D:\moses-mstranslator\moses2</AdditionalIncludeDirectories>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalLibraryDirectories>D:\zlib-1.2.8\contrib\vstudio\vc11\x64\ZlibDllRelease;D:\xmlrpc-c-1.51.06\bin\Debug-Static-x64;C:\Users\sija\Downloads\2.0.2\bonitao-cmph-e5f83da\Debug;D:\zlib_1_2_8_msvc2015_64\msvc2015_64\lib\zlib;D:\mman-win32-master\x64\Release;F:\boost_1_72_0\lib64-msvc-14.2;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libxmlrpc.lib;libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;zlibwapi.lib;mman.lib;cmph.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;MOSESMANAGEDDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ManagedMoses.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\moses2\moses2.vcxproj">
|
||||
<Project>{b4304e97-d37f-4022-bd03-841a4faee398}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ManagedMoses.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A2B603DB-F52E-4A83-BB61-F23D212E6482}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>MosesWrapperTest</RootNamespace>
|
||||
<AssemblyName>MosesWrapperTest</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>2</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MosesManagedDLL\MosesManagedDLL.vcxproj">
|
||||
<Project>{5fb67144-27c9-4993-a084-e2097ffcc4fe}</Project>
|
||||
<Name>MosesManagedDLL</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
19
contrib/other-builds/MosesWrapperTest/Program.cs
Normal file
19
contrib/other-builds/MosesWrapperTest/Program.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Moses;
|
||||
namespace MosesWrapperTest
|
||||
{
|
||||
class Program {
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Moses2Wrapper e = new Moses2Wrapper("D:/moses-mstranslator/test_sentence_with_candidates/moses_mspt.ini");
|
||||
string mystring = e.Translate("फ ो ट ो ं @@@ ट ||| a ||| 0.5338410658500136 $$$ ट ||| c ||| 0.10587171128910133 $$$ ट ||| m ||| 0.7056508746775306 $$$ ं ||| l ||| 0.29237797398236876 $$$ ं ||| o ||| 0.4026301817948226 $$$ ं ||| r ||| 0.20594041196734436 $$$ फ ||| c ||| 0.46792456587433573 $$$ फ ||| g ||| 0.43855815762641204 $$$ फ ||| x ||| 0.7077570324853759 $$$ ो ||| h ||| 0.9869239425073358 $$$ ो ||| i ||| 0.6660016809625412 $$$ ो ||| h ||| 0.8425506301302961", 123456789);
|
||||
Console.WriteLine(mystring);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
36
contrib/other-builds/dllImpCheck/Program.cs
Normal file
36
contrib/other-builds/dllImpCheck/Program.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace dllImpCheck
|
||||
{
|
||||
class Program
|
||||
{
|
||||
|
||||
[DllImport("../../../moses2/x64/Debug/moses2.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetMosesSystem")]
|
||||
private static extern int GetMosesSystem(string s, ref IntPtr system);
|
||||
[DllImport("../../../moses2/x64/Debug/moses2.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "MosesTranslate")]
|
||||
private static extern int MosesTranslate(IntPtr model, int id, string input, StringBuilder output, int output_len);
|
||||
[DllImport("../../../moses2/x64/Debug/moses2.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "ReleaseSystem")]
|
||||
private static extern int ReleaseSystem(ref IntPtr model);
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string config = "D:\\src\\moses-mstranslator\\test_sentence_with_candidates\\moses_mspt.ini";
|
||||
string cand = "aaj din main chaand nikla @@@ aaj ||| आज ||| 0.23034750595193718 $$$ aaj ||| अाज ||| 0.2036812076840512 $$$ aaj ||| एएजे ||| 0.1806033272478164 $$$ aaj ||| आज़ ||| 0.1550204531642581 $$$ din ||| दिन ||| 0.23292194982342979 $$$ din ||| दीन ||| 0.20844420805170855 $$$ din ||| दिं ||| 0.16399885041729953 $$$ din ||| डिन ||| 0.16171304188413235 $$$ chaand ||| चांद ||| 0.2374591084461087 $$$ chaand ||| चाँद ||| 0.217932729237165 $$$ chaand ||| चंद ||| 0.15435859487004985 $$$ chaand ||| चांड ||| 0.15279045900056767 $$$ nikla ||| निकला ||| 0.2727953350543125 $$$ nikla ||| निक्ला ||| 0.15350986400512082 $$$ nikla ||| नीकला ||| 0.1533410959941387 $$$ nikla ||| निकल़ा ||| 0.1475583698921154 $$$ main ||| मैं ||| 0.20812875019912347 $$$ main ||| में ||| 0.2042153102272697 $$$ main ||| मैन ||| 0.1933505532706236 $$$ main ||| मेन ||| 0.18617663610385968";
|
||||
IntPtr system = IntPtr.Zero;
|
||||
int v = GetMosesSystem(config, ref system);
|
||||
StringBuilder output = new StringBuilder();
|
||||
var ret = MosesTranslate(system, 1234678, cand, output, 50);
|
||||
Console.WriteLine(output);
|
||||
ReleaseSystem(ref system);
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.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="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
@ -22,31 +14,23 @@
|
||||
<ProjectGuid>{B4304E97-D37F-4022-BD03-841A4FAEE398}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>moses2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<TargetFrameworkVersion>
|
||||
</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@ -66,32 +50,14 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)decoder</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)decoder</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\..\;$(SolutionDir)\..\..\..\..\xmlrpc-c\include\;$(SolutionDir)\..\..\..\..\boost_1_55_0\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
@ -99,34 +65,26 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\..\..\cmph-2.0\src;$(SolutionDir)\..\..\..\..\zlib-1.2.8;$(SolutionDir)\..\..\..\..\xmlrpc-c\include\;$(SolutionDir)\..\..\..\..\mman-win32\;$(SolutionDir)\..\..\..\..\boost_1_56_0\;$(SolutionDir)\..\..\..\moses2\;$(SolutionDir)\..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>D:\src\mtmain\private\mt\zlib\src;D:\src\moses-mstranslator;D:\src\moses-mstranslator\moses2;D:\boost_1_74_0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<ObjectFileName>$(IntDir)\%(RelativeDir)\%(Filename).obj</ObjectFileName>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<ShowIncludes>false</ShowIncludes>
|
||||
<LanguageStandard>Default</LanguageStandard>
|
||||
<LanguageStandard_C>
|
||||
</LanguageStandard_C>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\..\..\..\..\xmlrpc-c\bin\Release-Static-x64;$(SolutionDir)\..\..\..\..\zlib-1.2.8\contrib\vstudio\vc11\x64\ZlibDllRelease;$(SolutionDir)\..\..\..\..\mman-win32\x64\Release;$(SolutionDir)\..\..\..\..\cmph-2.0\visualstudio2013\x64\Release;$(SolutionDir)\..\..\..\..\boost_1_56_0\lib64-msvc-12.0\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libxmlrpc.lib;libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;zlibwapi.lib;mman.lib;cmph.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>D:\boost_1_74_0\lib64-msvc-14.2;D:\src\mtmain\private\mt\zlib\src\dll\bin\x64\Debug</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerbose</ShowProgress>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@ -138,188 +96,190 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\..\..\cmph-2.0\src;$(SolutionDir)\..\..\..\..\zlib-1.2.8;$(SolutionDir)\..\..\..\..\xmlrpc-c\include\;$(SolutionDir)\..\..\..\..\mman-win32\;$(SolutionDir)\..\..\..\..\boost_1_56_0\;$(SolutionDir)\..\..\..\moses2\;$(SolutionDir)\..\..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>D:\src\mtmain\private\mt\zlib\src;D:\boost_1_74_0\;D:\src\moses-mstranslator;D:\src\moses-mstranslator\moses2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<ObjectFileName>$(IntDir)\%(RelativeDir)\%(Filename).obj</ObjectFileName>
|
||||
<ShowIncludes>false</ShowIncludes>
|
||||
<LanguageStandard>Default</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\..\..\..\..\xmlrpc-c\bin\Release-Static-x64;$(SolutionDir)\..\..\..\..\zlib-1.2.8\contrib\vstudio\vc11\x64\ZlibDllRelease;$(SolutionDir)\..\..\..\..\mman-win32\x64\Release;$(SolutionDir)\..\..\..\..\cmph-2.0\visualstudio2013\x64\Release;$(SolutionDir)\..\..\..\..\boost_1_56_0\lib64-msvc-12.0\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>libxmlrpc.lib;libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;zlibwapi.lib;mman.lib;cmph.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>D:\boost_1_74_0\lib64-msvc-14.2;D:\src\mtmain\private\mt\zlib\src\dll\bin\x64\Debug</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\lm\bhiksha.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\binary_format.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\config.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\lm_exception.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\model.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\quantize.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\read_arpa.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\search_hashed.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\search_trie.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\sizes.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\trie.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\trie_sort.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\value_build.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\virtual_interface.cc" />
|
||||
<ClCompile Include="..\..\..\..\lm\vocab.cc" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\ExampleStatefulFF.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\ExampleStatelessFF.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\BidirectionalReorderingState.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\HReorderingBackwardState.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\HReorderingForwardState.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\LexicalReordering.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\LRModel.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\LRState.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\PhraseBasedReorderingState.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\ReorderingStack.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\OSM\KenOSM.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\OSM\OpSequenceModel.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\OSM\osmHyp.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\GPULM.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\KENLM.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\KENLMBatch.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\LanguageModel.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\CubePruningMiniStack\Misc.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\CubePruningMiniStack\Search.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\CubePruningMiniStack\Stack.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Hypothesis.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\InputPath.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\InputPaths.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Manager.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Normal\Search.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Normal\Stack.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Normal\Stacks.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\PhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\ReorderingConstraint.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Search.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Sentence.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\TargetPhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\TargetPhrases.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\TrellisPath.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\KBestExtractor.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\NBest.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\NBestColl.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\NBests.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\Memory\PhraseTableMemory.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\PhraseTable.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\ProbingPT.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\Transliteration.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\UnknownWordPenalty.cpp" />
|
||||
<ClCompile Include="..\..\..\..\probingpt\hash.cpp" />
|
||||
<ClCompile Include="..\..\..\..\probingpt\InputFileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\..\probingpt\probing_hash_utils.cpp" />
|
||||
<ClCompile Include="..\..\..\..\probingpt\querying.cpp" />
|
||||
<ClCompile Include="..\..\..\..\probingpt\storing.cpp" />
|
||||
<ClCompile Include="..\..\..\..\probingpt\util.cpp" />
|
||||
<ClCompile Include="..\..\..\..\probingpt\vocabid.cpp" />
|
||||
<ClCompile Include="..\..\..\..\util\bit_packing.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\bignum-dtoa.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\bignum.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\cached-powers.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\diy-fp.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\double-conversion.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\fast-dtoa.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\fixed-dtoa.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\strtod.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\ersatz_progress.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\exception.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\file.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\file_piece.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\float_to_string.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\integer_to_string.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\mmap.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\murmur_hash.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\parallel_read.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\pool.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\random.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\read_compressed.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\scoped.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\string_piece.cc" />
|
||||
<ClCompile Include="..\..\..\..\util\usage.cc" />
|
||||
<ClCompile Include="..\..\..\..\moses2\AlignmentInfo.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\AlignmentInfoCollection.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\ArcLists.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\EstimatedScores.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\Distortion.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FeatureFunction.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FeatureFunctions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FeatureRegistry.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FFState.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\PhrasePenalty.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\PointerState.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\StatefulFeatureFunction.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\StatelessFeatureFunction.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\WordPenalty.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\HypothesisBase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\HypothesisColl.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\InputPathBase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\InputPathsBase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\InputType.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Bitmap.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Bitmaps.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Factor.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\FactorCollection.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\InputFileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Matrix.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\OutputFileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Parameter.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Range.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\ThreadPool.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Timer.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Util2.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\Main.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\ManagerBase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\MemPool.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\AllOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\BookkeepingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ContextParameters.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\CubePruningOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\InputOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\LMBR_Options.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\MBR_Options.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\NBestOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\OOVHandlingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\OptionsBaseClass.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ReorderingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ReportingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\SearchOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ServerOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\SyntaxOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\Phrase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\pugixml.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\Recycler.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\ActiveChart.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Hypothesis.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\InputPath.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\InputPaths.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Manager.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Misc.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\PhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Sentence.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Stack.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Stacks.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\TargetPhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\TargetPhrases.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Word.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\Scores.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\server\Server.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\server\TranslationRequest.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\server\Translator.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\SubPhrase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\System.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TargetPhrase.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationTask.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TrellisPaths.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\TypeDef.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\Vector.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\Weights.cpp" />
|
||||
<ClCompile Include="..\..\..\..\moses2\Word.cpp" />
|
||||
<ClCompile Include="..\..\..\lm\bhiksha.cc" />
|
||||
<ClCompile Include="..\..\..\lm\binary_format.cc" />
|
||||
<ClCompile Include="..\..\..\lm\config.cc" />
|
||||
<ClCompile Include="..\..\..\lm\lm_exception.cc" />
|
||||
<ClCompile Include="..\..\..\lm\model.cc" />
|
||||
<ClCompile Include="..\..\..\lm\quantize.cc" />
|
||||
<ClCompile Include="..\..\..\lm\read_arpa.cc" />
|
||||
<ClCompile Include="..\..\..\lm\search_hashed.cc" />
|
||||
<ClCompile Include="..\..\..\lm\search_trie.cc" />
|
||||
<ClCompile Include="..\..\..\lm\sizes.cc" />
|
||||
<ClCompile Include="..\..\..\lm\trie.cc" />
|
||||
<ClCompile Include="..\..\..\lm\trie_sort.cc" />
|
||||
<ClCompile Include="..\..\..\lm\value_build.cc" />
|
||||
<ClCompile Include="..\..\..\lm\virtual_interface.cc" />
|
||||
<ClCompile Include="..\..\..\lm\vocab.cc" />
|
||||
<ClCompile Include="..\..\..\moses2\DLLEntryApi.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\ExampleStatefulFF.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\ExampleStatelessFF.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\BidirectionalReorderingState.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\HReorderingBackwardState.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\HReorderingForwardState.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\LexicalReordering.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\LRModel.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\LRState.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\PhraseBasedReorderingState.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\ReorderingStack.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\OSM\KenOSM.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\OSM\OpSequenceModel.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\OSM\osmHyp.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\LM\GPULM.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\LM\KENLM.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\LM\KENLMBatch.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\LM\LanguageModel.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Moses2Wrapper.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\CubePruningMiniStack\Misc.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\CubePruningMiniStack\Search.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\CubePruningMiniStack\Stack.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Hypothesis.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\InputPath.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\InputPaths.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Manager.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Normal\Search.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Normal\Stack.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Normal\Stacks.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\PhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\ReorderingConstraint.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Search.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Sentence.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\SentenceWithCandidates.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\TargetPhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\TargetPhrases.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\TrellisPath.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\KBestExtractor.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\NBest.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\NBestColl.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\NBests.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\Dynamic\DynamicPhraseTable.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\Memory\PhraseTableMemory.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\PhraseTable.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\ProbingPT.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\Transliteration.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\UnknownWordPenalty.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TranslationTask.cpp" />
|
||||
<ClCompile Include="..\..\..\probingpt\hash.cpp" />
|
||||
<ClCompile Include="..\..\..\probingpt\InputFileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\probingpt\probing_hash_utils.cpp" />
|
||||
<ClCompile Include="..\..\..\probingpt\querying.cpp" />
|
||||
<ClCompile Include="..\..\..\probingpt\storing.cpp" />
|
||||
<ClCompile Include="..\..\..\probingpt\util.cpp" />
|
||||
<ClCompile Include="..\..\..\probingpt\vocabid.cpp" />
|
||||
<ClCompile Include="..\..\..\util\bit_packing.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\bignum-dtoa.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\bignum.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\cached-powers.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\diy-fp.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\double-conversion.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\fast-dtoa.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\fixed-dtoa.cc" />
|
||||
<ClCompile Include="..\..\..\util\double-conversion\strtod.cc" />
|
||||
<ClCompile Include="..\..\..\util\ersatz_progress.cc" />
|
||||
<ClCompile Include="..\..\..\util\exception.cc" />
|
||||
<ClCompile Include="..\..\..\util\file.cc" />
|
||||
<ClCompile Include="..\..\..\util\file_piece.cc" />
|
||||
<ClCompile Include="..\..\..\util\float_to_string.cc" />
|
||||
<ClCompile Include="..\..\..\util\integer_to_string.cc" />
|
||||
<ClCompile Include="..\..\..\util\mmap.cc" />
|
||||
<ClCompile Include="..\..\..\util\murmur_hash.cc" />
|
||||
<ClCompile Include="..\..\..\util\parallel_read.cc" />
|
||||
<ClCompile Include="..\..\..\util\pool.cc" />
|
||||
<ClCompile Include="..\..\..\util\random.cc" />
|
||||
<ClCompile Include="..\..\..\util\read_compressed.cc" />
|
||||
<ClCompile Include="..\..\..\util\scoped.cc" />
|
||||
<ClCompile Include="..\..\..\util\string_piece.cc" />
|
||||
<ClCompile Include="..\..\..\util\usage.cc" />
|
||||
<ClCompile Include="..\..\..\moses2\AlignmentInfo.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\AlignmentInfoCollection.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\ArcLists.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\EstimatedScores.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\Distortion.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\FeatureFunction.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\FeatureFunctions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\FeatureRegistry.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\FFState.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\PhrasePenalty.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\PointerState.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\StatefulFeatureFunction.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\StatelessFeatureFunction.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\FF\WordPenalty.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\HypothesisBase.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\HypothesisColl.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\InputPathBase.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\InputPathsBase.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\InputType.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Bitmap.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Bitmaps.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Factor.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\FactorCollection.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\InputFileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Matrix.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\OutputFileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Parameter.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Range.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\ThreadPool.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Timer.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Util2.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Main.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\ManagerBase.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\MemPool.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\AllOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\BookkeepingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ContextParameters.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\CubePruningOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\InputOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\LMBR_Options.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\MBR_Options.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\NBestOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\OOVHandlingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\OptionsBaseClass.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ReorderingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ReportingOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\SearchOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ServerOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\parameters\SyntaxOptions.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Phrase.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\pugixml.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Recycler.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\ActiveChart.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Hypothesis.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\InputPath.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\InputPaths.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Manager.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Misc.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\PhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Sentence.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Stack.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Stacks.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\TargetPhraseImpl.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\TargetPhrases.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Word.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Scores.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\SubPhrase.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\System.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TargetPhrase.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TrellisPaths.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\TypeDef.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Vector.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Weights.cpp" />
|
||||
<ClCompile Include="..\..\..\moses2\Word.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -67,508 +67,516 @@
|
||||
<Filter Include="Source Files\ProbingPT">
|
||||
<UniqueIdentifier>{8f10d9c1-66d4-4490-b310-d3f4973bad29}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\TranslationModel\Dynamic">
|
||||
<UniqueIdentifier>{8f2f68ba-2b5e-4d2c-92a7-6ece71df74ba}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\util\exception.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\float_to_string.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\integer_to_string.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\bignum.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\bignum-dtoa.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\cached-powers.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\diy-fp.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\double-conversion.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\fast-dtoa.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\fixed-dtoa.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\double-conversion\strtod.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\murmur_hash.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\pool.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\random.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\usage.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\Distortion.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\Distortion.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FeatureFunction.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\ExampleStatefulFF.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FeatureFunctions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\ExampleStatelessFF.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FeatureRegistry.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\FeatureFunction.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\FFState.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\FeatureFunctions.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\PhrasePenalty.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\FeatureRegistry.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\PointerState.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\FFState.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\StatefulFeatureFunction.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\PhrasePenalty.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\StatelessFeatureFunction.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\PointerState.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\WordPenalty.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\StatefulFeatureFunction.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Bitmap.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\FF\StatelessFeatureFunction.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\WordPenalty.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\OSM\KenOSM.cpp">
|
||||
<Filter>Source Files\FF\OSM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\OSM\OpSequenceModel.cpp">
|
||||
<Filter>Source Files\FF\OSM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\OSM\osmHyp.cpp">
|
||||
<Filter>Source Files\FF\OSM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\BidirectionalReorderingState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\HReorderingBackwardState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\HReorderingForwardState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\LexicalReordering.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\LRModel.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\LRState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\PhraseBasedReorderingState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\FF\LexicalReordering\ReorderingStack.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Util2.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Bitmaps.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Timer.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Factor.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\ThreadPool.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\FactorCollection.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Range.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\InputFileStream.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Parameter.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Matrix.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\OutputFileStream.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\OutputFileStream.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Matrix.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Parameter.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\InputFileStream.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Range.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\FactorCollection.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\ThreadPool.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Factor.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Timer.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Bitmaps.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\legacy\Util2.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\legacy\Bitmap.cpp">
|
||||
<Filter>Source Files\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\AllOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\LM\GPULM.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\LM\KENLM.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\LM\KENLMBatch.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\LM\LanguageModel.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\parameters\AllOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\BookkeepingOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\BookkeepingOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ContextParameters.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ContextParameters.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\CubePruningOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\CubePruningOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\InputOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\InputOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\LMBR_Options.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\LMBR_Options.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\MBR_Options.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\MBR_Options.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\NBestOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\NBestOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\OOVHandlingOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\OOVHandlingOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\OptionsBaseClass.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\OptionsBaseClass.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ReorderingOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ReorderingOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ReportingOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ReportingOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\SearchOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\SearchOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\ServerOptions.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\parameters\SyntaxOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\parameters\SyntaxOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\InputPaths.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\ActiveChart.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Hypothesis.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\InputPath.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Manager.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\PhraseImpl.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\ReorderingConstraint.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Search.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Sentence.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\SentenceWithCandidates.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\TargetPhraseImpl.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\TargetPhrases.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\TrellisPath.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Normal\Search.cpp">
|
||||
<Filter>Source Files\PhraseBased\Normal</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Normal\Stack.cpp">
|
||||
<Filter>Source Files\PhraseBased\Normal</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\Normal\Stacks.cpp">
|
||||
<Filter>Source Files\PhraseBased\Normal</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\CubePruningMiniStack\Misc.cpp">
|
||||
<Filter>Source Files\PhraseBased\CubePruningMiniStack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\CubePruningMiniStack\Search.cpp">
|
||||
<Filter>Source Files\PhraseBased\CubePruningMiniStack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\PhraseBased\CubePruningMiniStack\Stack.cpp">
|
||||
<Filter>Source Files\PhraseBased\CubePruningMiniStack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\probingpt\hash.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\probingpt\InputFileStream.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\probingpt\probing_hash_utils.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\probingpt\querying.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\probingpt\storing.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\probingpt\util.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\probingpt\vocabid.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\ActiveChart.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Hypothesis.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Hypothesis.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\InputPath.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\InputPath.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\InputPaths.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\InputPaths.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Manager.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Manager.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Misc.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Misc.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\PhraseImpl.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\PhraseImpl.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Sentence.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Sentence.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Stack.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Stack.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Stacks.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Stacks.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\TargetPhraseImpl.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\TargetPhraseImpl.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\TargetPhrases.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\TargetPhrases.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\Word.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\Word.cpp">
|
||||
<Filter>Source Files\SCFG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\server\Server.cpp">
|
||||
<Filter>Source Files\server</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\KBestExtractor.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\server\TranslationRequest.cpp">
|
||||
<Filter>Source Files\server</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\NBest.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\server\Translator.cpp">
|
||||
<Filter>Source Files\server</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\NBestColl.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\AlignmentInfo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\SCFG\nbest\NBests.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\AlignmentInfoCollection.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\PhraseTable.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\ArcLists.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\ProbingPT.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\EstimatedScores.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\UnknownWordPenalty.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\HypothesisBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\Transliteration.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\HypothesisColl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\InputPathBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\InputPathsBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\InputType.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\Main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\ManagerBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\MemPool.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\Phrase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\pugixml.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\Recycler.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\Scores.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SubPhrase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\System.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TargetPhrase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationTask.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TrellisPaths.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TypeDef.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\Vector.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\Weights.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\Word.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\scoped.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\Memory\PhraseTableMemory.cpp">
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\Memory\PhraseTableMemory.cpp">
|
||||
<Filter>Source Files\TranslationModel\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\PhraseTable.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\bignum.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\Transliteration.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\bignum-dtoa.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\UnknownWordPenalty.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\cached-powers.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\BidirectionalReorderingState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\diy-fp.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\HReorderingBackwardState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\fast-dtoa.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\HReorderingForwardState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\fixed-dtoa.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\LexicalReordering.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\strtod.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\LRModel.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
<ClCompile Include="..\..\..\util\double-conversion\double-conversion.cc">
|
||||
<Filter>Source Files\util\double-conversion</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\LRState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\PhraseBasedReorderingState.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\LexicalReordering\ReorderingStack.cpp">
|
||||
<Filter>Source Files\FF\LexicalReordering</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\OSM\KenOSM.cpp">
|
||||
<Filter>Source Files\FF\OSM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\OSM\OpSequenceModel.cpp">
|
||||
<Filter>Source Files\FF\OSM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\OSM\osmHyp.cpp">
|
||||
<Filter>Source Files\FF\OSM</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\file.cc">
|
||||
<ClCompile Include="..\..\..\util\bit_packing.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\file_piece.cc">
|
||||
<ClCompile Include="..\..\..\util\ersatz_progress.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\mmap.cc">
|
||||
<ClCompile Include="..\..\..\util\exception.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\parallel_read.cc">
|
||||
<ClCompile Include="..\..\..\util\file.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\read_compressed.cc">
|
||||
<ClCompile Include="..\..\..\util\file_piece.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\string_piece.cc">
|
||||
<ClCompile Include="..\..\..\util\float_to_string.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Hypothesis.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\InputPath.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\InputPaths.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Manager.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\PhraseImpl.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\ReorderingConstraint.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Search.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Sentence.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\TargetPhraseImpl.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\TargetPhrases.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\TrellisPath.cpp">
|
||||
<Filter>Source Files\PhraseBased</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\bhiksha.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\binary_format.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\config.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\lm_exception.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\model.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\quantize.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\read_arpa.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\search_hashed.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\search_trie.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\sizes.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\trie.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\trie_sort.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\value_build.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\virtual_interface.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\lm\vocab.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\ersatz_progress.cc">
|
||||
<ClCompile Include="..\..\..\util\integer_to_string.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\util\bit_packing.cc">
|
||||
<ClCompile Include="..\..\..\util\mmap.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Normal\Search.cpp">
|
||||
<Filter>Source Files\PhraseBased\Normal</Filter>
|
||||
<ClCompile Include="..\..\..\util\murmur_hash.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Normal\Stack.cpp">
|
||||
<Filter>Source Files\PhraseBased\Normal</Filter>
|
||||
<ClCompile Include="..\..\..\util\parallel_read.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\Normal\Stacks.cpp">
|
||||
<Filter>Source Files\PhraseBased\Normal</Filter>
|
||||
<ClCompile Include="..\..\..\util\pool.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\CubePruningMiniStack\Misc.cpp">
|
||||
<Filter>Source Files\PhraseBased\CubePruningMiniStack</Filter>
|
||||
<ClCompile Include="..\..\..\util\random.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\CubePruningMiniStack\Search.cpp">
|
||||
<Filter>Source Files\PhraseBased\CubePruningMiniStack</Filter>
|
||||
<ClCompile Include="..\..\..\util\read_compressed.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\PhraseBased\CubePruningMiniStack\Stack.cpp">
|
||||
<Filter>Source Files\PhraseBased\CubePruningMiniStack</Filter>
|
||||
<ClCompile Include="..\..\..\util\scoped.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\GPULM.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
<ClCompile Include="..\..\..\util\string_piece.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\KENLM.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
<ClCompile Include="..\..\..\util\usage.cc">
|
||||
<Filter>Source Files\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\KENLMBatch.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\AlignmentInfo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\LM\LanguageModel.cpp">
|
||||
<Filter>Source Files\Moses2LM</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\AlignmentInfoCollection.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\KBestExtractor.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\ArcLists.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\NBest.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\EstimatedScores.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\NBestColl.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\HypothesisBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\SCFG\nbest\NBests.cpp">
|
||||
<Filter>Source Files\SCFG\nbest</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\HypothesisColl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\TranslationModel\ProbingPT.cpp">
|
||||
<Filter>Source Files\TranslationModel</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\InputPathBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\probingpt\querying.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\InputPathsBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\probingpt\storing.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\InputType.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\probingpt\vocabid.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\Main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\probingpt\util.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\ManagerBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\probingpt\probing_hash_utils.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\MemPool.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\probingpt\InputFileStream.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\Phrase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\probingpt\hash.cpp">
|
||||
<Filter>Source Files\ProbingPT</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\pugixml.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\ExampleStatefulFF.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\Recycler.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\moses2\FF\ExampleStatelessFF.cpp">
|
||||
<Filter>Source Files\FF</Filter>
|
||||
<ClCompile Include="..\..\..\moses2\Scores.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\System.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\TargetPhrase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\TranslationTask.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\TrellisPaths.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\TypeDef.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\Vector.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\Weights.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\Word.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\SubPhrase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\bhiksha.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\binary_format.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\config.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\lm_exception.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\model.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\quantize.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\read_arpa.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\search_hashed.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\search_trie.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\sizes.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\trie.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\trie_sort.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\value_build.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\virtual_interface.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\lm\vocab.cc">
|
||||
<Filter>Source Files\lm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\Moses2Wrapper.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\parameters\ServerOptions.cpp">
|
||||
<Filter>Source Files\parameters</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\moses2\TranslationModel\Dynamic\DynamicPhraseTable.cpp">
|
||||
<Filter>Source Files\TranslationModel\Dynamic</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\moses2\Moses2Wrapper.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
34
env-check.yml
Normal file
34
env-check.yml
Normal file
@ -0,0 +1,34 @@
|
||||
# Starter pipeline
|
||||
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||
# Add steps that build, run tests, deploy, and more:
|
||||
# https://aka.ms/yaml
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
#vmImage: 'ubuntu-latest'
|
||||
vmImage: 'ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
|
||||
- script: |
|
||||
echo Printing some environment information
|
||||
echo HOME: $HOME
|
||||
echo
|
||||
echo UBUNTU VERSION:
|
||||
cat /etc/lsb-release
|
||||
echo
|
||||
echo CPU INFO
|
||||
cat /proc/cpuinfo
|
||||
echo
|
||||
echo MEM INFO
|
||||
cat /proc/meminfo
|
||||
echo
|
||||
echo DISK INFO
|
||||
df -h
|
||||
echo
|
||||
echo PWD: $PWD
|
||||
echo
|
||||
ls
|
||||
displayName: 'Printing some environment information'
|
74
moses2/DLLEntryApi.cpp
Normal file
74
moses2/DLLEntryApi.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
#include "Moses2Wrapper.h"
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
// Generic helper definitions for shared library support
|
||||
#if defined _WIN32
|
||||
#define IMPORT __declspec(dllimport)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
#else // !(defined _WIN32 || defined __CYGWIN__) -- i.e., not Windows
|
||||
#define __stdcall
|
||||
#if __GNUC__ >= 4
|
||||
#define IMPORT __attribute__ ((visibility ("default")))
|
||||
#define EXPORT __attribute__ ((visibility ("default")))
|
||||
#else // __GNUC__ < 4, which does not support the __attribute__ tag
|
||||
#define IMPORT
|
||||
#define EXPORT
|
||||
#endif // __GNUC__ >= 4
|
||||
#endif
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace Moses2;
|
||||
|
||||
extern "C" EXPORT MosesApiErrorCode __stdcall GetMosesSystem(const char* filePath, Moses2::Moses2Wrapper * *pObject) {
|
||||
|
||||
if (*pObject == NULL) {
|
||||
*pObject = new Moses2::Moses2Wrapper(filePath);
|
||||
return MS_API_OK;
|
||||
}
|
||||
else {
|
||||
return MS_API_E_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" EXPORT MosesApiErrorCode __stdcall Translate(Moses2::Moses2Wrapper * pObject, long id, const char* input, char** output) {
|
||||
if (pObject != NULL)
|
||||
{
|
||||
std::string tr = pObject->Translate(input, id);
|
||||
*output = Moses2Wrapper::CopyString(tr.c_str());
|
||||
return MS_API_OK;
|
||||
}
|
||||
else {
|
||||
return MS_API_E_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" EXPORT MosesApiErrorCode __stdcall FreeMemory(char* output) {
|
||||
if (output != nullptr) {
|
||||
Moses2Wrapper::Free(output);
|
||||
return MS_API_OK;
|
||||
}
|
||||
else {
|
||||
return MS_API_E_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" EXPORT MosesApiErrorCode __stdcall ReleaseSystem(Moses2::Moses2Wrapper **pObject) {
|
||||
if (*pObject != NULL)
|
||||
{
|
||||
delete* pObject;
|
||||
*pObject = NULL;
|
||||
return MS_API_OK;
|
||||
}
|
||||
else {
|
||||
return MS_API_E_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" EXPORT MosesApiErrorCode __stdcall EngineVersion() {
|
||||
//std::cout << "windows build on v1142/ msvc 14.27.29110"<< std::endl;
|
||||
std::cout << "0.0.1" << std::endl;
|
||||
return MS_API_OK;
|
||||
}
|
@ -25,6 +25,7 @@ class TargetPhraseImpl;
|
||||
class Scores;
|
||||
class ManagerBase;
|
||||
class MemPool;
|
||||
class InputType;
|
||||
|
||||
namespace SCFG
|
||||
{
|
||||
@ -95,8 +96,10 @@ public:
|
||||
const SCFG::TargetPhrases &tps, const Phrase<SCFG::Word> &sourcePhrase) const {
|
||||
}
|
||||
|
||||
virtual void InitializeForInput(const ManagerBase &mgr, const InputType &input) { };
|
||||
|
||||
// clean up temporary memory, called after processing each sentence
|
||||
virtual void CleanUpAfterSentenceProcessing() const {
|
||||
virtual void CleanUpAfterSentenceProcessing(const System &system, const InputType &input) const {
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -67,7 +67,6 @@ void FeatureFunctions::Create()
|
||||
UTIL_THROW_IF2(ffParams == NULL, "Must have [feature] section");
|
||||
|
||||
BOOST_FOREACH(const std::string &line, *ffParams) {
|
||||
//cerr << "line=" << line << endl;
|
||||
FeatureFunction *ff = Create(line);
|
||||
|
||||
m_featureFunctions.push_back(ff);
|
||||
@ -229,10 +228,17 @@ void FeatureFunctions::EvaluateWhenAppliedBatch(const Batch &batch) const
|
||||
}
|
||||
}
|
||||
|
||||
void FeatureFunctions::CleanUpAfterSentenceProcessing() const
|
||||
void FeatureFunctions::InitializeForInput(const ManagerBase &mgr, const InputType &input)
|
||||
{
|
||||
BOOST_FOREACH(FeatureFunction *ff, m_featureFunctions) {
|
||||
ff->InitializeForInput(mgr, input);
|
||||
}
|
||||
}
|
||||
|
||||
void FeatureFunctions::CleanUpAfterSentenceProcessing(const InputType &input) const
|
||||
{
|
||||
BOOST_FOREACH(const FeatureFunction *ff, m_featureFunctions) {
|
||||
ff->CleanUpAfterSentenceProcessing();
|
||||
ff->CleanUpAfterSentenceProcessing(m_system, input);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ class Scores;
|
||||
class Hypothesis;
|
||||
class UnknownWordPenalty;
|
||||
class Weights;
|
||||
class InputType;
|
||||
|
||||
namespace SCFG
|
||||
{
|
||||
@ -47,7 +48,7 @@ public:
|
||||
FeatureFunctions(System &system);
|
||||
virtual ~FeatureFunctions();
|
||||
|
||||
const std::vector<const FeatureFunction*> &GetFeatureFunctions() const {
|
||||
const std::vector<FeatureFunction*> &GetFeatureFunctions() const {
|
||||
return m_featureFunctions;
|
||||
}
|
||||
|
||||
@ -86,12 +87,13 @@ public:
|
||||
|
||||
void EvaluateWhenAppliedBatch(const Batch &batch) const;
|
||||
|
||||
void CleanUpAfterSentenceProcessing() const;
|
||||
void InitializeForInput(const ManagerBase &mgr, const InputType &input);
|
||||
void CleanUpAfterSentenceProcessing(const InputType &input) const;
|
||||
|
||||
void ShowWeights(const Weights &allWeights);
|
||||
|
||||
protected:
|
||||
std::vector<const FeatureFunction*> m_featureFunctions;
|
||||
std::vector<FeatureFunction*> m_featureFunctions;
|
||||
std::vector<const StatefulFeatureFunction*> m_statefulFeatureFunctions;
|
||||
std::vector<const FeatureFunction*> m_withPhraseTableInd;
|
||||
const UnknownWordPenalty *m_unkWP;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "../TranslationModel/ProbingPT.h"
|
||||
#include "../TranslationModel/UnknownWordPenalty.h"
|
||||
#include "../TranslationModel/Transliteration.h"
|
||||
#include "../TranslationModel/MSPT/MSPT.h"
|
||||
#include "../TranslationModel/Dynamic/DynamicPhraseTable.h"
|
||||
|
||||
#include "../LM/KENLM.h"
|
||||
#include "../LM/KENLMBatch.h"
|
||||
@ -57,7 +57,7 @@ FeatureRegistry::FeatureRegistry()
|
||||
MOSES_FNAME(ProbingPT);
|
||||
MOSES_FNAME2("PhraseDictionaryTransliteration", Transliteration);
|
||||
MOSES_FNAME(UnknownWordPenalty);
|
||||
MOSES_FNAME(MSPT);
|
||||
MOSES_FNAME(DynamicPhraseTable);
|
||||
|
||||
Add("KENLM", new KenFactory());
|
||||
|
||||
|
@ -7,6 +7,9 @@
|
||||
|
||||
#include "InputType.h"
|
||||
#include "System.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
@ -89,4 +92,10 @@ bool InputType::XmlOverlap(size_t startPos, size_t endPos) const
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string InputType::Debug(const System &system) const
|
||||
{
|
||||
cerr << "InputType::Debug" << endl;
|
||||
return "";
|
||||
}
|
||||
|
||||
} /* namespace Moses2 */
|
||||
|
@ -73,6 +73,8 @@ public:
|
||||
//! Returns true if there were any XML tags parsed that at least partially covered the range passed
|
||||
bool XmlOverlap(size_t startPos, size_t endPos) const;
|
||||
|
||||
virtual std::string Debug(const System &system) const;
|
||||
|
||||
protected:
|
||||
ReorderingConstraint m_reorderingConstraint; /**< limits on reordering specified either by "-mp" switch or xml tags */
|
||||
Vector<const XMLOption*> m_xmlOptions;
|
||||
|
@ -9,6 +9,17 @@ else {
|
||||
alias cmph ;
|
||||
}
|
||||
|
||||
if [ xmlrpc ]
|
||||
{
|
||||
echo "BUILDING MOSES2 SERVER!" ;
|
||||
alias mserver2 : [ glob server/*.cpp ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "NOT BUILDING MOSES2 SERVER!" ;
|
||||
alias mserver2 ;
|
||||
}
|
||||
|
||||
max-factors = [ option.get "max-factors" : 4 : 4 ] ;
|
||||
max-factors = <define>MAX_NUM_FACTORS=$(max-factors) <dependency>$(FACTOR-LOG) ;
|
||||
|
||||
@ -41,7 +52,7 @@ alias deps : ..//z ..//boost_iostreams ..//boost_filesystem : : : $(max-factors
|
||||
TypeDef.cpp
|
||||
Vector.cpp
|
||||
Weights.cpp
|
||||
Word.cpp
|
||||
Word.cpp
|
||||
FF/Distortion.cpp
|
||||
FF/FeatureFunction.cpp
|
||||
FF/FeatureFunctions.cpp
|
||||
@ -83,8 +94,7 @@ alias deps : ..//z ..//boost_iostreams ..//boost_filesystem : : : $(max-factors
|
||||
TranslationModel/CompactPT/MurmurHash3.cpp
|
||||
TranslationModel/CompactPT/TargetPhraseCollectionCache.cpp
|
||||
TranslationModel/CompactPT/ThrowingFwrite.cpp
|
||||
|
||||
TranslationModel/MSPT/MSPT.cpp
|
||||
TranslationModel/Dynamic/DynamicPhraseTable.cpp
|
||||
|
||||
parameters/AllOptions.cpp
|
||||
parameters/BookkeepingOptions.cpp
|
||||
@ -110,7 +120,8 @@ alias deps : ..//z ..//boost_iostreams ..//boost_filesystem : : : $(max-factors
|
||||
PhraseBased/ReorderingConstraint.cpp
|
||||
PhraseBased/TargetPhrases.cpp
|
||||
PhraseBased/Search.cpp
|
||||
PhraseBased/Sentence.cpp
|
||||
PhraseBased/Sentence.cpp
|
||||
PhraseBased/SentenceWithCandidates.cpp
|
||||
PhraseBased/TargetPhraseImpl.cpp
|
||||
PhraseBased/TrellisPath.cpp
|
||||
|
||||
@ -169,25 +180,16 @@ alias deps : ..//z ..//boost_iostreams ..//boost_filesystem : : : $(max-factors
|
||||
SCFG/nbest/NBest.cpp
|
||||
SCFG/nbest/NBests.cpp
|
||||
SCFG/nbest/NBestColl.cpp
|
||||
|
||||
server/Server.cpp
|
||||
server/Translator.cpp
|
||||
server/TranslationRequest.cpp
|
||||
|
||||
Moses2Wrapper.cpp
|
||||
DLLEntryApi.cpp
|
||||
deps
|
||||
cmph
|
||||
mserver2
|
||||
:
|
||||
$(includes)
|
||||
;
|
||||
|
||||
exe moses2 : Main.cpp moses2_lib ../probingpt//probingpt ../util//kenutil ../lm//kenlm ;
|
||||
|
||||
if [ xmlrpc ] {
|
||||
echo "Building Moses2" ;
|
||||
alias programs : moses2 ;
|
||||
}
|
||||
else {
|
||||
echo "Not building Moses2" ;
|
||||
alias programs : ;
|
||||
}
|
||||
|
||||
#need to figure out this
|
||||
lib moses2decoder : Main.cpp moses2_lib ../probingpt//probingpt ../util//kenutil ../lm//kenlm ;
|
||||
exe moses2 : moses2decoder ;
|
||||
echo "Building Moses2" ;
|
||||
alias programs : moses2 moses2decoder ;
|
@ -6,7 +6,10 @@
|
||||
#include "Phrase.h"
|
||||
#include "TranslationTask.h"
|
||||
#include "MemPoolAllocator.h"
|
||||
#include "server/Server.h"
|
||||
#ifdef HAVE_XMLRPC_C
|
||||
#include "server/Server.h"
|
||||
#endif // HAVE_XMLRPC_C
|
||||
|
||||
#include "legacy/InputFileStream.h"
|
||||
#include "legacy/Parameter.h"
|
||||
#include "legacy/ThreadPool.h"
|
||||
@ -38,16 +41,16 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
//cerr << "system.numThreads=" << system.options.server.numThreads << endl;
|
||||
|
||||
Moses2::ThreadPool pool(system.options.server.numThreads, system.cpuAffinityOffset, system.cpuAffinityOffsetIncr);
|
||||
//cerr << "CREATED POOL" << endl;
|
||||
|
||||
if (params.GetParam("server")) {
|
||||
std::cerr << "RUN SERVER" << std::endl;
|
||||
run_as_server(system);
|
||||
} else {
|
||||
std::cerr << "RUN BATCH" << std::endl;
|
||||
batch_run(params, system, pool);
|
||||
}
|
||||
else {
|
||||
std::cerr << "RUN BATCH" << std::endl;
|
||||
batch_run(params, system, pool);
|
||||
}
|
||||
|
||||
cerr << "Decoding took " << timer.get_elapsed_time() << endl;
|
||||
@ -57,10 +60,15 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void run_as_server(Moses2::System &system)
|
||||
void run_as_server(Moses2::System& system)
|
||||
{
|
||||
Moses2::Server server(system.options.server, system);
|
||||
server.run(system); // actually: don't return. see Server::run()
|
||||
#ifdef HAVE_XMLRPC_C
|
||||
Moses2::Server server(system.options.server, system);
|
||||
server.run(system); // actually: don't return. see Server::run()
|
||||
#else
|
||||
UTIL_THROW2("Moses2 was compiled without xmlrpc-c. "
|
||||
<< "No server functionality available.");
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -76,31 +84,33 @@ istream &GetInputStream(Moses2::Parameter ¶ms)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void batch_run(Moses2::Parameter ¶ms, Moses2::System &system, Moses2::ThreadPool &pool)
|
||||
|
||||
void batch_run(Moses2::Parameter& params, Moses2::System& system, Moses2::ThreadPool& pool)
|
||||
{
|
||||
istream &inStream = GetInputStream(params);
|
||||
istream& inStream = GetInputStream(params);
|
||||
|
||||
long translationId = 0;
|
||||
string line;
|
||||
while (getline(inStream, line)) {
|
||||
//cerr << "line=" << line << endl;
|
||||
boost::shared_ptr<Moses2::TranslationTask> task(new Moses2::TranslationTask(system, line, translationId));
|
||||
long translationId = 0;
|
||||
string line;
|
||||
while (getline(inStream, line)) {
|
||||
//cerr << "line=" << line << endl;
|
||||
boost::shared_ptr<Moses2::TranslationTask> task(new Moses2::TranslationTask(system, line, translationId));
|
||||
|
||||
//cerr << "START pool.Submit()" << endl;
|
||||
pool.Submit(task);
|
||||
//task->Run();
|
||||
++translationId;
|
||||
}
|
||||
//cerr << "START pool.Submit()" << endl;
|
||||
pool.Submit(task);
|
||||
//task->Run();
|
||||
++translationId;
|
||||
}
|
||||
|
||||
pool.Stop(true);
|
||||
pool.Stop(true);
|
||||
|
||||
if (&inStream != &cin) {
|
||||
delete &inStream;
|
||||
}
|
||||
if (&inStream != &cin) {
|
||||
delete& inStream;
|
||||
}
|
||||
|
||||
//util::PrintUsage(std::cerr);
|
||||
//util::PrintUsage(std::cerr);
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void Temp()
|
||||
{
|
||||
|
@ -29,12 +29,13 @@ ManagerBase::ManagerBase(System &sys, const TranslationTask &task,
|
||||
,m_pool(NULL)
|
||||
,m_systemPool(NULL)
|
||||
,m_hypoRecycle(NULL)
|
||||
,m_input(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
ManagerBase::~ManagerBase()
|
||||
{
|
||||
system.featureFunctions.CleanUpAfterSentenceProcessing();
|
||||
system.featureFunctions.CleanUpAfterSentenceProcessing(*m_input);
|
||||
|
||||
if (m_pool) {
|
||||
GetPool().Reset();
|
||||
|
@ -33,7 +33,7 @@ class HypothesisBase;
|
||||
class ManagerBase
|
||||
{
|
||||
public:
|
||||
const System &system;
|
||||
System &system;
|
||||
const TranslationTask &task;
|
||||
mutable ArcLists arcLists;
|
||||
|
||||
|
55
moses2/Moses2Wrapper.cpp
Normal file
55
moses2/Moses2Wrapper.cpp
Normal file
@ -0,0 +1,55 @@
|
||||
#include "Moses2Wrapper.h"
|
||||
#include "System.h"
|
||||
#include "legacy/Parameter.h"
|
||||
#include "TranslationTask.h"
|
||||
using namespace std;
|
||||
namespace Moses2 {
|
||||
//summary :: need to update the LM path at runtime with complete artifact path.
|
||||
void Moses2Wrapper::UpdateLMPath(const std::string& filePath) {
|
||||
|
||||
char sep = '/';
|
||||
|
||||
#ifdef _WIN32
|
||||
sep = '\\';
|
||||
#endif
|
||||
auto file = filePath.substr(filePath.find_last_of(sep) + 1);
|
||||
auto path = filePath.substr(0, filePath.find_last_of(sep));
|
||||
auto a = m_param->GetParam("feature");
|
||||
std::vector<std::string> feature;
|
||||
for (int i = 0; i < a->size(); i++) {
|
||||
auto abc = Tokenize(a->at(i));
|
||||
if (*abc.begin() == "KENLM") {
|
||||
string s = "";
|
||||
for (int k = 0; k < abc.size(); k++) {
|
||||
if (abc.at(k).find("path=") != string::npos) {
|
||||
auto lm = abc.at(k).substr(abc.at(k).find_last_of("=") + 1);
|
||||
s = s + "path=" + path + sep + lm + " ";
|
||||
}
|
||||
else {
|
||||
s = s + abc.at(k) + " ";
|
||||
}
|
||||
}
|
||||
feature.push_back(s.erase(s.find_last_not_of(" \n\r\t") + 1));
|
||||
}
|
||||
else {
|
||||
feature.push_back(a->at(i));
|
||||
}
|
||||
}
|
||||
m_param->OverwriteParam("feature", feature);
|
||||
}
|
||||
|
||||
Moses2Wrapper::Moses2Wrapper(const std::string &filePath) {
|
||||
m_param = new Parameter();
|
||||
m_param->LoadParam(filePath);
|
||||
UpdateLMPath(filePath);
|
||||
m_system = new System(*m_param);
|
||||
}
|
||||
std::string Moses2Wrapper::Translate(const std::string &input , long id) {
|
||||
TranslationTask task(*m_system, input, id);
|
||||
return task.ReturnTranslation();
|
||||
}
|
||||
Moses2Wrapper::~Moses2Wrapper() {
|
||||
delete m_param;
|
||||
delete m_system;
|
||||
}
|
||||
}
|
39
moses2/Moses2Wrapper.h
Normal file
39
moses2/Moses2Wrapper.h
Normal file
@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
namespace Moses2 {
|
||||
class Parameter;
|
||||
class System;
|
||||
extern "C" {
|
||||
enum MosesApiErrorCode {
|
||||
MS_API_OK,
|
||||
MS_API_E_FAILURE,
|
||||
MS_API_E_INPUT,
|
||||
MS_API_E_TIMEOUT
|
||||
};
|
||||
}
|
||||
class Moses2Wrapper
|
||||
{
|
||||
Parameter* m_param;
|
||||
System* m_system;
|
||||
|
||||
public:
|
||||
Moses2Wrapper(const std::string& filePath);
|
||||
~Moses2Wrapper();
|
||||
std::string Translate(const std::string& input, long id);
|
||||
void UpdateLMPath(const std::string& filePath);
|
||||
int getEngineVersion();
|
||||
|
||||
static char* CopyString(const char* str) {
|
||||
int32_t size = (int32_t)strlen(str);
|
||||
char* obj = (char*)malloc(size + 1);
|
||||
memcpy(obj, str, size);
|
||||
obj[size] = '\0';
|
||||
return obj;
|
||||
}
|
||||
static void Free(void* ptr) {
|
||||
free(ptr);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
@ -13,6 +13,7 @@
|
||||
#include "TargetPhraseImpl.h"
|
||||
#include "InputPath.h"
|
||||
#include "Sentence.h"
|
||||
#include "SentenceWithCandidates.h"
|
||||
|
||||
#include "Normal/Search.h"
|
||||
#include "CubePruningMiniStack/Search.h"
|
||||
@ -59,7 +60,13 @@ void Manager::Init()
|
||||
InitPools();
|
||||
|
||||
FactorCollection &vocab = system.GetVocab();
|
||||
m_input = Moses2::Sentence::CreateFromString(GetPool(), vocab, system, m_inputStr);
|
||||
if (system.options.input.input_type == SentenceInputWithCandidates) {
|
||||
m_input = Moses2::SentenceWithCandidates::CreateFromString(GetPool(), vocab, system, m_inputStr);
|
||||
}
|
||||
else {
|
||||
m_input = Moses2::Sentence::CreateFromString(GetPool(), vocab, system, m_inputStr);
|
||||
}
|
||||
system.featureFunctions.InitializeForInput(*this, *m_input);
|
||||
|
||||
m_bitmaps = new Bitmaps(GetPool());
|
||||
|
||||
@ -88,7 +95,7 @@ void Manager::Init()
|
||||
CalcFutureScore();
|
||||
|
||||
m_bitmaps->Init(sentence.GetSize(), vector<bool>(0));
|
||||
|
||||
|
||||
switch (system.options.search.algo) {
|
||||
case Normal:
|
||||
m_search = new NSNormal::Search(*this);
|
||||
|
97
moses2/PhraseBased/SentenceWithCandidates.cpp
Normal file
97
moses2/PhraseBased/SentenceWithCandidates.cpp
Normal file
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* SentenceWithCandidates.cpp
|
||||
*
|
||||
* Created on: 14 Dec 2015
|
||||
* Author: hieu
|
||||
*/
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/xml_parser.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "SentenceWithCandidates.h"
|
||||
#include "../System.h"
|
||||
#include "../parameters/AllOptions.h"
|
||||
#include "../legacy/Util2.h"
|
||||
#include <unordered_map>
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
|
||||
const string SentenceWithCandidates::INPUT_PART_DELIM = "@@@";
|
||||
const string SentenceWithCandidates::PT_LINE_DELIM = "$$$";
|
||||
|
||||
SentenceWithCandidates *SentenceWithCandidates::CreateFromString(MemPool &pool, FactorCollection &vocab,
|
||||
const System &system, const std::string &str)
|
||||
{
|
||||
SentenceWithCandidates *ret;
|
||||
|
||||
// Break input into two parts: the parts are delimited by
|
||||
typedef split_iterator<string::const_iterator> string_split_iterator;
|
||||
vector<string> input_parts;
|
||||
for(string_split_iterator It= make_split_iterator(str, first_finder(SentenceWithCandidates::INPUT_PART_DELIM, is_iequal()));
|
||||
It!=string_split_iterator();
|
||||
++It)
|
||||
{
|
||||
input_parts.push_back(copy_range<std::string>(*It));
|
||||
}
|
||||
|
||||
//cerr << "Number of subparts: " << input_parts.size() << endl;
|
||||
|
||||
if (input_parts.size() ==2 ) {
|
||||
//cerr << "correct number of parts" << endl ;
|
||||
} else {
|
||||
// TODO: how to handle wrong input format
|
||||
cerr << "INCORRECT number of parts" << endl ;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
trim(input_parts[0]);
|
||||
trim(input_parts[1]);
|
||||
//cerr << "Input String: " << input_parts[0] << endl ;
|
||||
//cerr << "Phrase Table: " << input_parts[1] << endl ;
|
||||
|
||||
///// Process the text part of the input
|
||||
const string partstr = input_parts[0];
|
||||
|
||||
// no xml
|
||||
//cerr << "PB SentenceWithCandidates" << endl;
|
||||
std::vector<std::string> toks = Tokenize(partstr);
|
||||
|
||||
size_t size = toks.size();
|
||||
ret = new (pool.Allocate<SentenceWithCandidates>()) SentenceWithCandidates(pool, size);
|
||||
ret->PhraseImplTemplate<Word>::CreateFromString(vocab, system, toks, false);
|
||||
|
||||
//cerr << "REORDERING CONSTRAINTS:" << ret->GetReorderingConstraint() << endl;
|
||||
//cerr << "ret=" << ret->Debug(system) << endl;
|
||||
|
||||
|
||||
//// Parse the phrase table of the input
|
||||
ret->m_phraseTableString = replace_all_copy(input_parts[1],PT_LINE_DELIM,"\n");
|
||||
// ret->m_phraseTableString="constant phrase table";
|
||||
// cerr << "Extracted Phrase Table String: " << ret->m_phraseTableString << endl;
|
||||
//cerr << "Extracted Phrase Table String: " << ret->getPhraseTableString() << endl;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
SentenceWithCandidates::SentenceWithCandidates(MemPool &pool, size_t size)
|
||||
:Sentence(pool, size)
|
||||
{
|
||||
//cerr << "SentenceWithCandidates::SentenceWithCandidates" << endl;
|
||||
}
|
||||
|
||||
SentenceWithCandidates::~SentenceWithCandidates()
|
||||
{
|
||||
//cerr << "SentenceWithCandidates::~SentenceWithCandidates" << endl;
|
||||
}
|
||||
|
||||
std::string SentenceWithCandidates::Debug(const System &system) const
|
||||
{
|
||||
return "SentenceWithCandidates::Debug";
|
||||
}
|
||||
|
||||
} /* namespace Moses2 */
|
||||
|
46
moses2/PhraseBased/SentenceWithCandidates.h
Normal file
46
moses2/PhraseBased/SentenceWithCandidates.h
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* SentenceWithCandidates.h
|
||||
*
|
||||
* Created on: 14 Dec 2015
|
||||
* Author: hieu
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <string>
|
||||
#include "PhraseImpl.h"
|
||||
#include "Sentence.h"
|
||||
#include "../MemPool.h"
|
||||
#include "../pugixml.hpp"
|
||||
#include "../legacy/Util2.h"
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
class FactorCollection;
|
||||
class System;
|
||||
|
||||
class SentenceWithCandidates: public Sentence
|
||||
{
|
||||
public:
|
||||
|
||||
static const std::string INPUT_PART_DELIM;
|
||||
static const std::string PT_LINE_DELIM;
|
||||
|
||||
static SentenceWithCandidates *CreateFromString(MemPool &pool, FactorCollection &vocab,
|
||||
const System &system, const std::string &str);
|
||||
|
||||
SentenceWithCandidates(MemPool &pool, size_t size);
|
||||
virtual ~SentenceWithCandidates();
|
||||
|
||||
virtual std::string Debug(const System &system) const;
|
||||
std::string virtual getPhraseTableString() const{
|
||||
return m_phraseTableString;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_phraseTableString;
|
||||
|
||||
};
|
||||
|
||||
} /* namespace Moses2 */
|
||||
|
@ -97,7 +97,7 @@ void System::LoadWeights()
|
||||
const WeightMap &allWeights = params.GetAllWeights();
|
||||
|
||||
// check all weights are there for all FF
|
||||
const std::vector<const FeatureFunction*> &ffs = featureFunctions.GetFeatureFunctions();
|
||||
const std::vector<FeatureFunction*> &ffs = featureFunctions.GetFeatureFunctions();
|
||||
BOOST_FOREACH(const FeatureFunction *ff, ffs) {
|
||||
if (ff->IsTuneable()) {
|
||||
const std::string &ffName = ff->GetName();
|
||||
|
180
moses2/TranslationModel/Dynamic/DynamicPhraseTable.cpp
Normal file
180
moses2/TranslationModel/Dynamic/DynamicPhraseTable.cpp
Normal file
@ -0,0 +1,180 @@
|
||||
/*
|
||||
* DynamicPhraseTable.cpp
|
||||
*
|
||||
* Created on: 28 Oct 2015
|
||||
* Author: hieu
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
#include <boost/foreach.hpp>
|
||||
#include "DynamicPhraseTable.h"
|
||||
#include "../../PhraseBased/PhraseImpl.h"
|
||||
#include "../../Phrase.h"
|
||||
#include "../../System.h"
|
||||
#include "../../Scores.h"
|
||||
#include "../../InputPathsBase.h"
|
||||
#include "../../legacy/InputFileStream.h"
|
||||
#include "util/exception.hh"
|
||||
|
||||
#include "../../PhraseBased/InputPath.h"
|
||||
#include "../../PhraseBased/TargetPhraseImpl.h"
|
||||
#include "../../PhraseBased/TargetPhrases.h"
|
||||
#include "../../PhraseBased/SentenceWithCandidates.h"
|
||||
|
||||
#include "../../SCFG/PhraseImpl.h"
|
||||
#include "../../SCFG/TargetPhraseImpl.h"
|
||||
#include "../../SCFG/InputPath.h"
|
||||
#include "../../SCFG/Stack.h"
|
||||
#include "../../SCFG/Stacks.h"
|
||||
#include "../../SCFG/Manager.h"
|
||||
|
||||
#include "../../PhraseBased/SentenceWithCandidates.h"
|
||||
#include "../../PhraseBased/Manager.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
thread_local DynamicPhraseTable::PBNODE DynamicPhraseTable::m_rootPb;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DynamicPhraseTable::DynamicPhraseTable(size_t startInd, const std::string &line)
|
||||
:PhraseTable(startInd, line)
|
||||
{
|
||||
ReadParameters();
|
||||
}
|
||||
|
||||
DynamicPhraseTable::~DynamicPhraseTable()
|
||||
{
|
||||
m_rootPb.CleanNode();
|
||||
}
|
||||
|
||||
void DynamicPhraseTable::CreatePTForInput(const ManagerBase &mgr, string phraseTableString)
|
||||
{
|
||||
//cerr << "In CreatePTForInput" << endl << flush;
|
||||
const System &system = mgr.system;
|
||||
FactorCollection &vocab = system.GetVocab();
|
||||
MemPool &pool = mgr.GetPool();
|
||||
MemPool tmpSourcePool;
|
||||
|
||||
if (system.isPb) {
|
||||
//m_rootPb = new PBNODE();
|
||||
} else {
|
||||
abort();
|
||||
//cerr << "m_rootSCFG=" << m_rootSCFG << endl;
|
||||
}
|
||||
|
||||
vector<string> toks;
|
||||
size_t lineNum = 0;
|
||||
istringstream strme(phraseTableString);
|
||||
string line;
|
||||
while (getline(strme, line)) {
|
||||
if (++lineNum % 1000000 == 0) {
|
||||
cerr << lineNum << " ";
|
||||
}
|
||||
toks.clear();
|
||||
TokenizeMultiCharSeparator(toks, line, "|||");
|
||||
UTIL_THROW_IF2(toks.size() < 3, "Wrong format");
|
||||
//cerr << "line=" << line << endl;
|
||||
//cerr << "system.isPb=" << system.isPb << endl;
|
||||
|
||||
if (system.isPb) {
|
||||
PhraseImpl *source = PhraseImpl::CreateFromString(tmpSourcePool, vocab, system,
|
||||
toks[0]);
|
||||
//cerr << "created soure" << endl;
|
||||
TargetPhraseImpl *target = TargetPhraseImpl::CreateFromString(pool, *this, system,
|
||||
toks[1]);
|
||||
//cerr << "created target" << endl;
|
||||
target->GetScores().CreateFromString(toks[2], *this, system, true);
|
||||
//cerr << "created scores:" << *target << endl;
|
||||
|
||||
if (toks.size() >= 4) {
|
||||
//cerr << "alignstr=" << toks[3] << endl;
|
||||
target->SetAlignmentInfo(toks[3]);
|
||||
}
|
||||
|
||||
// properties
|
||||
if (toks.size() == 7) {
|
||||
//target->properties = (char*) system.systemPool.Allocate(toks[6].size() + 1);
|
||||
//strcpy(target->properties, toks[6].c_str());
|
||||
}
|
||||
|
||||
system.featureFunctions.EvaluateInIsolation(pool, system, *source,
|
||||
*target);
|
||||
//cerr << "EvaluateInIsolation:" << target->Debug(system) << endl;
|
||||
m_rootPb.AddRule(m_input, *source, target);
|
||||
|
||||
//cerr << "target=" << target->Debug(system) << endl;
|
||||
} else {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
if (system.isPb) {
|
||||
m_rootPb.SortAndPrune(m_tableLimit, pool, system);
|
||||
//cerr << "root=" << &m_rootPb << endl;
|
||||
} else {
|
||||
abort();
|
||||
}
|
||||
/*
|
||||
BOOST_FOREACH(const PtMem::Node<Word>::Children::value_type &valPair, m_rootPb.GetChildren()) {
|
||||
const Word &word = valPair.first;
|
||||
cerr << word << " ";
|
||||
}
|
||||
cerr << endl;
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void DynamicPhraseTable::InitializeForInput(const ManagerBase &mgr, const InputType &input)
|
||||
{
|
||||
// downcast to SentenceWithCandidates
|
||||
const SentenceWithCandidates &inputObj = static_cast<const SentenceWithCandidates&>(input);
|
||||
CreatePTForInput(mgr, inputObj.getPhraseTableString());
|
||||
}
|
||||
|
||||
TargetPhrases* DynamicPhraseTable::Lookup(const Manager &mgr, MemPool &pool,
|
||||
InputPath &inputPath) const
|
||||
{
|
||||
const SubPhrase<Moses2::Word> &phrase = inputPath.subPhrase;
|
||||
TargetPhrases *tps = m_rootPb.Find(m_input, phrase);
|
||||
return tps;
|
||||
}
|
||||
|
||||
void DynamicPhraseTable::CleanUpAfterSentenceProcessing(const System &system, const InputType &input) const {
|
||||
m_rootPb.CleanNode(); //TODO : clean this
|
||||
}
|
||||
|
||||
void DynamicPhraseTable::InitActiveChart(
|
||||
MemPool &pool,
|
||||
const SCFG::Manager &mgr,
|
||||
SCFG::InputPath &path) const
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
void DynamicPhraseTable::Lookup(MemPool &pool,
|
||||
const SCFG::Manager &mgr,
|
||||
size_t maxChartSpan,
|
||||
const SCFG::Stacks &stacks,
|
||||
SCFG::InputPath &path) const
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
void DynamicPhraseTable::LookupGivenNode(
|
||||
MemPool &pool,
|
||||
const SCFG::Manager &mgr,
|
||||
const SCFG::ActiveChartEntry &prevEntry,
|
||||
const SCFG::Word &wordSought,
|
||||
const Moses2::Hypotheses *hypos,
|
||||
const Moses2::Range &subPhraseRange,
|
||||
SCFG::InputPath &outPath) const
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
}
|
||||
|
88
moses2/TranslationModel/Dynamic/DynamicPhraseTable.h
Normal file
88
moses2/TranslationModel/Dynamic/DynamicPhraseTable.h
Normal file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* MSPT.h
|
||||
*
|
||||
* Created on: 28 Oct 2015
|
||||
* Author: hieu
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../PhraseTable.h"
|
||||
#include "../../legacy/Util2.h"
|
||||
#include "../../SCFG/InputPath.h"
|
||||
#include "DynamicPhraseTableNode.h"
|
||||
#include "../../PhraseBased/PhraseImpl.h"
|
||||
#include "../../PhraseBased/TargetPhraseImpl.h"
|
||||
#include "../../PhraseBased/TargetPhrases.h"
|
||||
#include "../../SCFG/PhraseImpl.h"
|
||||
#include "../../SCFG/TargetPhraseImpl.h"
|
||||
#include "../../SCFG/TargetPhrases.h"
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
|
||||
class DynamicPhraseTable: public PhraseTable
|
||||
{
|
||||
typedef DynamicPhraseTableNS::Node<Word, Phrase<Word>, TargetPhraseImpl, TargetPhrases> PBNODE;
|
||||
typedef DynamicPhraseTableNS::Node<SCFG::Word, Phrase<SCFG::Word>, SCFG::TargetPhraseImpl, SCFG::TargetPhrases> SCFGNODE;
|
||||
|
||||
//////////////////////////////////////
|
||||
class ActiveChartEntryMem : public SCFG::ActiveChartEntry
|
||||
{
|
||||
typedef SCFG::ActiveChartEntry Parent;
|
||||
public:
|
||||
const DynamicPhraseTable::SCFGNODE &node;
|
||||
|
||||
ActiveChartEntryMem(MemPool &pool, const DynamicPhraseTable::SCFGNODE &vnode)
|
||||
:Parent(pool)
|
||||
,node(vnode)
|
||||
{}
|
||||
|
||||
ActiveChartEntryMem(
|
||||
MemPool &pool,
|
||||
const DynamicPhraseTable::SCFGNODE &vnode,
|
||||
const ActiveChartEntry &prevEntry)
|
||||
:Parent(prevEntry)
|
||||
,node(vnode)
|
||||
{}
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
public:
|
||||
DynamicPhraseTable(size_t startInd, const std::string &line);
|
||||
virtual ~DynamicPhraseTable();
|
||||
|
||||
virtual TargetPhrases *Lookup(const Manager &mgr, MemPool &pool,
|
||||
InputPath &inputPath) const;
|
||||
|
||||
virtual void InitActiveChart(
|
||||
MemPool &pool,
|
||||
const SCFG::Manager &mgr,
|
||||
SCFG::InputPath &path) const;
|
||||
|
||||
void Lookup(MemPool &pool,
|
||||
const SCFG::Manager &mgr,
|
||||
size_t maxChartSpan,
|
||||
const SCFG::Stacks &stacks,
|
||||
SCFG::InputPath &path) const;
|
||||
|
||||
virtual void InitializeForInput(const ManagerBase &mgr, const InputType &input);
|
||||
virtual void CleanUpAfterSentenceProcessing(const System &system, const InputType &input) const;
|
||||
|
||||
protected:
|
||||
thread_local static PBNODE m_rootPb;
|
||||
|
||||
void LookupGivenNode(
|
||||
MemPool &pool,
|
||||
const SCFG::Manager &mgr,
|
||||
const SCFG::ActiveChartEntry &prevEntry,
|
||||
const SCFG::Word &wordSought,
|
||||
const Moses2::Hypotheses *hypos,
|
||||
const Moses2::Range &subPhraseRange,
|
||||
SCFG::InputPath &outPath) const;
|
||||
|
||||
void CreatePTForInput(const ManagerBase &mgr, std::string phraseTableString);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
133
moses2/TranslationModel/Dynamic/DynamicPhraseTableNode.h
Normal file
133
moses2/TranslationModel/Dynamic/DynamicPhraseTableNode.h
Normal file
@ -0,0 +1,133 @@
|
||||
/*
|
||||
* Node.h
|
||||
*
|
||||
* Created on: 22 Apr 2016
|
||||
* Author: hieu
|
||||
*/
|
||||
#pragma once
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include "../../PhraseBased/TargetPhrases.h"
|
||||
#include "../../System.h"
|
||||
#include "../../Phrase.h"
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
class System;
|
||||
|
||||
namespace DynamicPhraseTableNS
|
||||
{
|
||||
|
||||
template<class WORD, class SP, class TP, class TPS>
|
||||
class Node
|
||||
{
|
||||
public:
|
||||
typedef boost::unordered_map<size_t, Node> Children;
|
||||
|
||||
Node()
|
||||
:m_targetPhrases(NULL)
|
||||
,m_unsortedTPS(NULL)
|
||||
{}
|
||||
|
||||
~Node()
|
||||
{}
|
||||
|
||||
void AddRule(const std::vector<FactorType> &factors, SP &source, TP *target) {
|
||||
AddRule(factors, source, target, 0);
|
||||
}
|
||||
|
||||
TPS *Find(const std::vector<FactorType> &factors, const SP &source, size_t pos = 0) const {
|
||||
assert(source.GetSize());
|
||||
if (pos == source.GetSize()) {
|
||||
return m_targetPhrases;
|
||||
} else {
|
||||
const WORD &word = source[pos];
|
||||
//cerr << "word=" << word << endl;
|
||||
typename Children::const_iterator iter = m_children.find(word.hash(factors));
|
||||
if (iter == m_children.end()) {
|
||||
return NULL;
|
||||
} else {
|
||||
const Node &child = iter->second;
|
||||
return child.Find(factors, source, pos + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const Node *Find(const std::vector<FactorType> &factors, const WORD &word) const {
|
||||
typename Children::const_iterator iter = m_children.find(word.hash(factors));
|
||||
if (iter == m_children.end()) {
|
||||
return NULL;
|
||||
} else {
|
||||
const Node &child = iter->second;
|
||||
return &child;
|
||||
}
|
||||
}
|
||||
|
||||
const TPS *GetTargetPhrases() const {
|
||||
return m_targetPhrases;
|
||||
}
|
||||
|
||||
void SortAndPrune(size_t tableLimit, MemPool &pool, const System &system) {
|
||||
BOOST_FOREACH(typename Children::value_type &val, m_children) {
|
||||
Node &child = val.second;
|
||||
child.SortAndPrune(tableLimit, pool, system);
|
||||
}
|
||||
|
||||
// prune target phrases in this node
|
||||
if (m_unsortedTPS) {
|
||||
m_targetPhrases = new (pool.Allocate<TPS>()) TPS(pool, m_unsortedTPS->size());
|
||||
|
||||
for (size_t i = 0; i < m_unsortedTPS->size(); ++i) {
|
||||
TP *tp = (*m_unsortedTPS)[i];
|
||||
m_targetPhrases->AddTargetPhrase(*tp);
|
||||
}
|
||||
|
||||
m_targetPhrases->SortAndPrune(tableLimit);
|
||||
system.featureFunctions.EvaluateAfterTablePruning(system.GetSystemPool(), *m_targetPhrases, *m_source);
|
||||
|
||||
delete m_unsortedTPS;
|
||||
}
|
||||
}
|
||||
void CleanNode() {
|
||||
m_children.clear();
|
||||
}
|
||||
const Children &GetChildren() const {
|
||||
return m_children;
|
||||
}
|
||||
|
||||
void Debug(std::ostream &out, const System &system) const {
|
||||
BOOST_FOREACH(const typename Children::value_type &valPair, m_children) {
|
||||
const WORD &word = valPair.first;
|
||||
//std::cerr << word << "(" << word.hash() << ") ";
|
||||
}
|
||||
}
|
||||
protected:
|
||||
Children m_children;
|
||||
TPS *m_targetPhrases;
|
||||
Phrase<WORD> *m_source;
|
||||
std::vector<TP*> *m_unsortedTPS;
|
||||
|
||||
Node &AddRule(const std::vector<FactorType> &factors, SP &source, TP *target, size_t pos) {
|
||||
if (pos == source.GetSize()) {
|
||||
if (m_unsortedTPS == NULL) {
|
||||
m_unsortedTPS = new std::vector<TP*>();
|
||||
m_source = &source;
|
||||
}
|
||||
|
||||
m_unsortedTPS->push_back(target);
|
||||
return *this;
|
||||
} else {
|
||||
const WORD &word = source[pos];
|
||||
Node &child = m_children[word.hash(factors)];
|
||||
//std::cerr << "added " << word << " " << &child << " from " << this << std::endl;
|
||||
|
||||
return child.AddRule(factors, source, target, pos + 1);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
} // namespace
|
||||
|
@ -80,13 +80,7 @@ void PhraseTable::Lookup(const Manager &mgr, InputPathsBase &inputPaths) const
|
||||
|
||||
if (SatisfyBackoff(mgr, *path)) {
|
||||
TargetPhrases *tpsPtr = Lookup(mgr, mgr.GetPool(), *path);
|
||||
/*
|
||||
cerr << "tpsPtr=" << tpsPtr << " ";
|
||||
if (tps.get()) {
|
||||
cerr << tps.get()->GetSize();
|
||||
}
|
||||
cerr << endl;
|
||||
*/
|
||||
//cerr << "tpsPtr=" << tpsPtr << endl;
|
||||
|
||||
path->AddTargetPhrases(*this, tpsPtr);
|
||||
}
|
||||
|
@ -23,7 +23,14 @@ TranslationTask::TranslationTask(System &system,
|
||||
TranslationTask::~TranslationTask()
|
||||
{
|
||||
}
|
||||
|
||||
std::string TranslationTask::ReturnTranslation() const
|
||||
{
|
||||
m_mgr->Decode();
|
||||
string out;
|
||||
out = m_mgr->OutputBest() + "\n";
|
||||
delete m_mgr;
|
||||
return out;
|
||||
}
|
||||
void TranslationTask::Run()
|
||||
{
|
||||
|
||||
|
@ -16,6 +16,7 @@ public:
|
||||
TranslationTask(System &system, const std::string &line, long translationId);
|
||||
virtual ~TranslationTask();
|
||||
virtual void Run();
|
||||
virtual std::string ReturnTranslation() const;
|
||||
|
||||
protected:
|
||||
ManagerBase *m_mgr;
|
||||
|
@ -71,7 +71,8 @@ enum InputTypeEnum {
|
||||
TreeInputType = 3,
|
||||
//,WordLatticeInput2 = 4,
|
||||
TabbedSentenceInput = 5,
|
||||
ForestInputType = 6
|
||||
ForestInputType = 6,
|
||||
SentenceInputWithCandidates = 7,
|
||||
};
|
||||
|
||||
enum XmlInputType {
|
||||
|
@ -95,7 +95,7 @@ update(std::map<std::string,xmlrpc_c::value>const& param)
|
||||
if (!lmbr.update(param)) return false;
|
||||
if (!output.update(param)) return false;
|
||||
if (!unk.update(param)) return false;
|
||||
if (!server.update(param)) return false;
|
||||
//if (!server.update(param)) return false;
|
||||
//if (!syntax.update(param)) return false;
|
||||
return sanity_check();
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
// -*- mode: c++; indent-tabs-mode: nil; tab-width: 2 -*-
|
||||
#pragma once
|
||||
|
||||
#include "../legacy/xmlrpc-c.h"
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <stdint.h>
|
||||
#include <xmlrpc-c/base.hpp>
|
||||
#include <xmlrpc-c/registry.hpp>
|
||||
#include <xmlrpc-c/server_abyss.hpp>
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
|
@ -19,12 +19,12 @@ Server::Server(ServerOptions &server_options, System &system)
|
||||
:m_server_options(server_options)
|
||||
,m_translator(new Translator(*this, system))
|
||||
{
|
||||
m_registry.addMethod("translate", m_translator);
|
||||
m_registry.addMethod("translate", m_translator);
|
||||
}
|
||||
|
||||
Server::~Server()
|
||||
{
|
||||
unlink(m_pidfile.c_str());
|
||||
unlink(m_pidfile.c_str());
|
||||
}
|
||||
|
||||
void Server::run(System &system)
|
||||
|
Loading…
Reference in New Issue
Block a user