mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
Merge branch 'master' of https://github.com/moses-smt/mosesdecoder
This commit is contained in:
commit
46596ed49a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
tools
|
||||
*.d
|
||||
*.pyc
|
||||
*.lo
|
||||
|
@ -1,3 +1,4 @@
|
||||
Please see the Moses website on how to compile and run Moses
|
||||
http://www.statmt.org/moses/?n=Development.GetStarted
|
||||
|
||||
|
||||
|
42
Jamroot
42
Jamroot
@ -114,7 +114,7 @@ requirements += [ option.get "with-mm" : : <define>PT_UG ] ;
|
||||
requirements += [ option.get "with-mm" : : <define>MAX_NUM_FACTORS=4 ] ;
|
||||
requirements += [ option.get "unlabelled-source" : : <define>UNLABELLED_SOURCE ] ;
|
||||
|
||||
if [ option.get "with-lbllm" ] {
|
||||
if [ option.get "with-oxlm" ] {
|
||||
external-lib boost_serialization ;
|
||||
external-lib gomp ;
|
||||
requirements += <library>boost_serialization ;
|
||||
@ -125,6 +125,19 @@ if [ option.get "with-cmph" : : "yes" ] {
|
||||
requirements += <define>HAVE_CMPH ;
|
||||
}
|
||||
|
||||
if [ option.get "with-icu" : : "yes" ]
|
||||
{
|
||||
external-lib icuuc ;
|
||||
external-lib icuio ;
|
||||
external-lib icui18n ;
|
||||
requirements += <library>icuuc/<link>shared ;
|
||||
requirements += <library>icuio/<link>shared ;
|
||||
requirements += <library>icui18n/<link>shared ;
|
||||
requirements += <cxxflags>-fPIC ;
|
||||
requirements += <address-model>64 ;
|
||||
requirements += <runtime-link>shared ;
|
||||
}
|
||||
|
||||
if [ option.get "with-probing-pt" : : "yes" ]
|
||||
{
|
||||
external-lib boost_serialization ;
|
||||
@ -154,14 +167,13 @@ project : requirements
|
||||
;
|
||||
|
||||
#Add directories here if you want their incidental targets too (i.e. tests).
|
||||
build-projects lm util phrase-extract search moses moses/LM mert moses-cmd moses-chart-cmd mira scripts regression-testing ;
|
||||
build-projects lm util phrase-extract search moses moses/LM mert moses-cmd mira scripts regression-testing ;
|
||||
|
||||
if [ option.get "with-mm" : : "yes" ]
|
||||
{
|
||||
alias mm :
|
||||
moses/TranslationModel/UG//spe-check-coverage2
|
||||
moses/TranslationModel/UG//count-ptable-features
|
||||
moses/TranslationModel/UG//ptable-lookup
|
||||
moses/TranslationModel/UG//sim-pe
|
||||
moses/TranslationModel/UG//spe-check-coverage
|
||||
moses/TranslationModel/UG/mm//mtt-build
|
||||
moses/TranslationModel/UG/mm//mtt-dump
|
||||
@ -180,9 +192,19 @@ else
|
||||
alias mm ;
|
||||
}
|
||||
|
||||
if [ option.get "with-rephraser" : : "yes" ]
|
||||
{
|
||||
alias rephraser :
|
||||
contrib/rephraser//paraphrase
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
alias rephraser ;
|
||||
}
|
||||
|
||||
alias programs :
|
||||
lm//programs
|
||||
moses-chart-cmd//moses_chart
|
||||
moses-cmd//programs
|
||||
OnDiskPt//CreateOnDiskPt
|
||||
OnDiskPt//queryOnDiskPt
|
||||
@ -199,11 +221,12 @@ biconcor
|
||||
mira//mira
|
||||
contrib/server//mosesserver
|
||||
mm
|
||||
rephraser
|
||||
;
|
||||
|
||||
|
||||
install-bin-libs programs ;
|
||||
install-headers headers-base : [ path.glob-tree biconcor contrib lm mert misc moses-chart-cmd moses-cmd OnDiskPt phrase-extract symal util : *.hh *.h ] : . ;
|
||||
install-headers headers-base : [ path.glob-tree biconcor contrib lm mert misc moses-cmd OnDiskPt phrase-extract symal util : *.hh *.h ] : . ;
|
||||
install-headers headers-moses : moses//headers-to-install : moses ;
|
||||
|
||||
alias install : prefix-bin prefix-lib headers-base headers-moses ;
|
||||
@ -217,3 +240,10 @@ if [ path.exists $(TOP)/dist ] && $(prefix) != dist {
|
||||
echo "To disable this message, delete $(TOP)/dist ." ;
|
||||
echo ;
|
||||
}
|
||||
|
||||
local temp = [ _shell "mkdir bin" ] ;
|
||||
local temp = [ _shell "rm bin/moses_chart" ] ;
|
||||
local temp = [ _shell "cd bin && ln -s moses moses_chart" ] ;
|
||||
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
exe biconcor : Vocabulary.cpp SuffixArray.cpp TargetCorpus.cpp Alignment.cpp Mismatch.cpp PhrasePair.cpp PhrasePairCollection.cpp biconcor.cpp base64.cpp ;
|
||||
|
||||
exe phrase-lookup : Vocabulary.cpp SuffixArray.cpp phrase-lookup.cpp ;
|
||||
|
132
biconcor/phrase-lookup.cpp
Normal file
132
biconcor/phrase-lookup.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
#include "SuffixArray.h"
|
||||
#include <getopt.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
size_t lookup( string );
|
||||
vector<string> tokenize( const char input[] );
|
||||
SuffixArray suffixArray;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
// handle parameters
|
||||
string query;
|
||||
string fileNameSuffix;
|
||||
string fileNameSource;
|
||||
int loadFlag = false;
|
||||
int saveFlag = false;
|
||||
int createFlag = false;
|
||||
int queryFlag = false;
|
||||
int stdioFlag = false; // receive requests from STDIN, respond to STDOUT
|
||||
string info = "usage: biconcor\n\t[--load model-file]\n\t[--save model-file]\n\t[--create corpus]\n\t[--query string]\n\t[--stdio]\n";
|
||||
while(1) {
|
||||
static struct option long_options[] = {
|
||||
{"load", required_argument, 0, 'l'},
|
||||
{"save", required_argument, 0, 's'},
|
||||
{"create", required_argument, 0, 'c'},
|
||||
{"query", required_argument, 0, 'q'},
|
||||
{"stdio", no_argument, 0, 'i'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
int option_index = 0;
|
||||
int c = getopt_long (argc, argv, "l:s:c:q:i", long_options, &option_index);
|
||||
if (c == -1) break;
|
||||
switch (c) {
|
||||
case 'l':
|
||||
fileNameSuffix = string(optarg);
|
||||
loadFlag = true;
|
||||
break;
|
||||
case 's':
|
||||
fileNameSuffix = string(optarg);
|
||||
saveFlag = true;
|
||||
break;
|
||||
case 'c':
|
||||
fileNameSource = string(optarg);
|
||||
createFlag = true;
|
||||
break;
|
||||
case 'q':
|
||||
query = string(optarg);
|
||||
queryFlag = true;
|
||||
break;
|
||||
case 'i':
|
||||
stdioFlag = true;
|
||||
break;
|
||||
default:
|
||||
cerr << info;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
if (stdioFlag) {
|
||||
queryFlag = true;
|
||||
}
|
||||
|
||||
// check if parameter settings are legal
|
||||
if (saveFlag && !createFlag) {
|
||||
cerr << "error: cannot save without creating\n" << info;
|
||||
exit(1);
|
||||
}
|
||||
if (saveFlag && loadFlag) {
|
||||
cerr << "error: cannot load and save at the same time\n" << info;
|
||||
exit(1);
|
||||
}
|
||||
if (!loadFlag && !createFlag) {
|
||||
cerr << "error: neither load or create - i have no info!\n" << info;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// do your thing
|
||||
if (createFlag) {
|
||||
cerr << "will create\n";
|
||||
cerr << "corpus is in " << fileNameSource << endl;
|
||||
suffixArray.Create( fileNameSource );
|
||||
if (saveFlag) {
|
||||
suffixArray.Save( fileNameSuffix );
|
||||
cerr << "will save in " << fileNameSuffix << endl;
|
||||
}
|
||||
}
|
||||
if (loadFlag) {
|
||||
cerr << "will load from " << fileNameSuffix << endl;
|
||||
suffixArray.Load( fileNameSuffix );
|
||||
}
|
||||
if (stdioFlag) {
|
||||
while(true) {
|
||||
string query;
|
||||
if (getline(cin, query, '\n').eof()) {
|
||||
return 0;
|
||||
}
|
||||
cout << lookup( query ) << endl;
|
||||
}
|
||||
}
|
||||
else if (queryFlag) {
|
||||
cout << lookup( query ) << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t lookup( string query ) {
|
||||
cerr << "query is " << query << endl;
|
||||
vector< string > queryString = tokenize( query.c_str() );
|
||||
return suffixArray.Count( queryString );
|
||||
}
|
||||
|
||||
vector<string> tokenize( const char input[] )
|
||||
{
|
||||
vector< string > token;
|
||||
bool betweenWords = true;
|
||||
int start=0;
|
||||
int i=0;
|
||||
for(; input[i] != '\0'; i++) {
|
||||
bool isSpace = (input[i] == ' ' || input[i] == '\t');
|
||||
|
||||
if (!isSpace && betweenWords) {
|
||||
start = i;
|
||||
betweenWords = false;
|
||||
} else if (isSpace && !betweenWords) {
|
||||
token.push_back( string( input+start, i-start ) );
|
||||
betweenWords = true;
|
||||
}
|
||||
}
|
||||
if (!betweenWords)
|
||||
token.push_back( string( input+start, i-start ) );
|
||||
return token;
|
||||
}
|
||||
|
@ -1,18 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.602770742">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.602770742" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -20,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.602770742." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1436139469" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.622899770" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/CreateOnDiskPt}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1448999623" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/CreateOnDiskPt}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1448999623" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.2139008298" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2008193341" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.627728792" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -44,15 +42,14 @@
|
||||
<option id="gnu.cpp.link.option.libs.1325292383" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="boost_serialization"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
@ -60,13 +57,7 @@
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.815001500" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/search/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../DALM/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686-m64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/macosx""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../irstlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../randlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/OnDiskPt/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/util/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/moses/Debug""/>
|
||||
@ -90,12 +81,12 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.168814843" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -151,5 +142,12 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/CreateOnDiskPt"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/CreateOnDiskPt"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.2091728208." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.69362991" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.641760346" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/consolidate}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1286696537" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/consolidate}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1286696537" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1571215005" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1626949654" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1186248186" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -37,14 +37,26 @@
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.110628197" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.1393924562" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="boost_serialization"/>
|
||||
<listOptionValue builtIn="false" value="boost_system"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1967422094" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/moses/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/util/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/search/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/lm/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/OnDiskPt/Debug""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1093223502" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
@ -134,5 +146,13 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/consolidate"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/consolidate"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
||||
|
@ -3,7 +3,10 @@
|
||||
<name>consolidate</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>lm</project>
|
||||
<project>moses</project>
|
||||
<project>OnDiskPt</project>
|
||||
<project>search</project>
|
||||
<project>util</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1975272196." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1513645956" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.621141597" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/extract-ghkm}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1641243676" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/extract-ghkm}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1641243676" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.150240237" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.494510261" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.520735766" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -36,7 +36,7 @@
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1041890522" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.674199351" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.1221354875" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1494157787" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
@ -121,5 +121,13 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-ghkm"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-ghkm"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.717781750">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.717781750" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1409305044">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1409305044" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
@ -14,45 +14,46 @@
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.717781750" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.717781750." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.1592548114" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1901246092" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/extract-mixed-syntax}/Debug" id="cdt.managedbuild.builder.gnu.cross.1258744662" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.843537319" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.58376765" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.773231580" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1750960939" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.370220943" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.444206095" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.179564128" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.821075319" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../..""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../boost/include""/>
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1409305044" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1409305044." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1388217813" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.933039924" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/extract-mixed-syntax}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.48110463" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.98916974" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1188224255" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.391351501" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1590628643" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.968781133" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../..""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../phrase-extract""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1392992841" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1981472807" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1842955138" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1662715989" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.libs.1218130098" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.902271411" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.736647824" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.2105683691" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1947641767" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.966210211" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1701471219" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.1906832553" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_program_options-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="boost_program_options"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1381391160" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<option id="gnu.cpp.link.option.paths.1107413288" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/util/Debug""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.854170920" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1613608534" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.787863687" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.575479421" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.376525206" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1191140458" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.257834788" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
@ -60,8 +61,8 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.668933542">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.668933542" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1529383679">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1529383679" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
@ -73,31 +74,31 @@
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.668933542" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.668933542." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.1921095681" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.782544633" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/extract-mixed-syntax}/Release" id="cdt.managedbuild.builder.gnu.cross.1528518028" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1457475056" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1817139100" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1643095075" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.90570918" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1529383679" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1529383679." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1048718406" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.456212753" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/extract-mixed-syntax}/Release" id="cdt.managedbuild.target.gnu.builder.exe.release.1570266419" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.577209301" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1943090599" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
|
||||
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1506916262" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.2132167444" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.619145487" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.648756325" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.87166296" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.542982829" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1840233144" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.2063838952" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.391536740" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.release.option.debugging.level.147725572" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1423330814" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1189015465" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.496105735" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2102292609" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1089231126" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1386796864" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1793802493" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1574246206" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1927244259" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.689683737" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.1864177991" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2122644096" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
@ -107,23 +108,42 @@
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="extract-mixed-syntax.cdt.managedbuild.target.gnu.cross.exe.741182827" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
<project id="extract-mixed-syntax.cdt.managedbuild.target.gnu.exe.1077520702" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1409305044;cdt.managedbuild.config.gnu.exe.debug.1409305044.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1188224255;cdt.managedbuild.tool.gnu.cpp.compiler.input.1981472807">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.668933542;cdt.managedbuild.config.gnu.cross.exe.release.668933542.;cdt.managedbuild.tool.gnu.cross.c.compiler.1457475056;cdt.managedbuild.tool.gnu.c.compiler.input.90570918">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1529383679;cdt.managedbuild.config.gnu.exe.release.1529383679.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1943090599;cdt.managedbuild.tool.gnu.cpp.compiler.input.619145487">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.717781750;cdt.managedbuild.config.gnu.cross.exe.debug.717781750.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.370220943;cdt.managedbuild.tool.gnu.cpp.compiler.input.1392992841">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1409305044;cdt.managedbuild.config.gnu.exe.debug.1409305044.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.902271411;cdt.managedbuild.tool.gnu.c.compiler.input.1947641767">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.717781750;cdt.managedbuild.config.gnu.cross.exe.debug.717781750.;cdt.managedbuild.tool.gnu.cross.c.compiler.843537319;cdt.managedbuild.tool.gnu.c.compiler.input.1750960939">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.668933542;cdt.managedbuild.config.gnu.cross.exe.release.668933542.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.648756325;cdt.managedbuild.tool.gnu.cpp.compiler.input.1840233144">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1529383679;cdt.managedbuild.config.gnu.exe.release.1529383679.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.2063838952;cdt.managedbuild.tool.gnu.c.compiler.input.1423330814">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-mixed-syntax"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-mixed-syntax"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
@ -3,6 +3,7 @@
|
||||
<name>extract-mixed-syntax</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>util</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
@ -108,12 +109,12 @@
|
||||
<link>
|
||||
<name>OutputFileStream.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/OutputFileStream.cpp</locationURI>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>OutputFileStream.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/OutputFileStream.h</locationURI>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Parameter.cpp</name>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1909818145." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.702289239" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.769221744" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/extract-rules}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1538811811" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/extract-rules}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1538811811" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.417385938" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.274036343" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1227466042" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -39,7 +39,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1356683866" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1569179988" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
@ -121,5 +121,12 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-rules"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-rules"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.2119725657." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1708444053" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.645190133" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/extract}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1816006533" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/extract}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1816006533" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.876593881" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1859867372" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1585316374" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -36,7 +36,7 @@
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.83617569" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.943560690" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.libs.599256050" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1223834298" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
|
@ -44,8 +44,8 @@
|
||||
<option id="gnu.cpp.link.option.libs.585257079" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="mert_lib"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
</option>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.2107801703." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.502948364" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1431969079" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/manual-label}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.2101075234" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/manual-label}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.2101075234" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1118840081" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2037265673" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.400985496" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -36,11 +36,11 @@
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.254144861" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.319879082" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.paths.132164474" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<option id="gnu.cpp.link.option.paths.132164474" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1017214824" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="boost_program_options-mt"/>
|
||||
<option id="gnu.cpp.link.option.libs.1017214824" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="boost_program_options"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1672776758" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
@ -121,5 +121,12 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/manual-label"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/manual-label"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
@ -201,6 +201,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mert/GzFileBuf.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>HwcmScorer.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mert/HwcmScorer.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>HwcmScorer.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mert/HwcmScorer.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>HypPackEnumerator.cpp</name>
|
||||
<type>1</type>
|
||||
@ -211,6 +221,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mert/HypPackEnumerator.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>InternalTree.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InternalTree.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>InternalTree.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InternalTree.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>InterpolatedScorer.cpp</name>
|
||||
<type>1</type>
|
||||
|
@ -1,115 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C3AF5C05-D4EC-41D2-8319-D1E69B9B5820}</ProjectGuid>
|
||||
<RootNamespace>moseschartcmd</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>C:\Program Files\boost\boost_1_47;$(SolutionDir)/moses/src;$(SolutionDir)/kenlm;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>zdll.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>C:\Program Files\boost\boost_1_47;$(SolutionDir)/moses/src;$(SolutionDir)/kenlm;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>zdll.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\IOWrapper.cpp" />
|
||||
<ClCompile Include="src\Main.cpp" />
|
||||
<ClCompile Include="src\mbr.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\IOWrapper.h" />
|
||||
<ClInclude Include="src\Main.h" />
|
||||
<ClInclude Include="src\mbr.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\moses\moses.vcxproj">
|
||||
<Project>{8122157a-0de5-44ff-8e5b-024ed6ace7af}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OnDiskPt\OnDiskPt.vcxproj">
|
||||
<Project>{8b07671b-cbaf-4514-affd-ce238cd427e9}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -1,486 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1EAF9DC614B9F8CD005E8EBD /* liblm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EAF9DC314B9F8BA005E8EBD /* liblm.a */; };
|
||||
1EAF9DC714B9F8CD005E8EBD /* libmoses.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EAF9DAD14B9F8AD005E8EBD /* libmoses.a */; };
|
||||
1EAF9DC814B9F8CD005E8EBD /* libOnDiskPt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EAF9DB614B9F8B1005E8EBD /* libOnDiskPt.a */; };
|
||||
1EBC53E7164C4B1400ADFA2C /* libsearch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EBC53BD164C4AC300ADFA2C /* libsearch.a */; };
|
||||
1EF0719F14B9F1D40052152A /* IOWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0718A14B9F1D40052152A /* IOWrapper.cpp */; };
|
||||
1EF071A214B9F1D40052152A /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0718E14B9F1D40052152A /* Main.cpp */; };
|
||||
1EF071A414B9F1D40052152A /* mbr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0719114B9F1D40052152A /* mbr.cpp */; };
|
||||
1EF071A614B9F1D40052152A /* TranslationAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0719414B9F1D40052152A /* TranslationAnalysis.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
1EAF9DAC14B9F8AD005E8EBD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = D2AAC046055464E500DB518D;
|
||||
remoteInfo = moses;
|
||||
};
|
||||
1EAF9DB514B9F8B1005E8EBD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = D2AAC046055464E500DB518D;
|
||||
remoteInfo = OnDiskPt;
|
||||
};
|
||||
1EAF9DC214B9F8BA005E8EBD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 1EE8C2E91476A48E002496F2;
|
||||
remoteInfo = lm;
|
||||
};
|
||||
1EAF9DCB14B9F8D6005E8EBD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D2AAC045055464E500DB518D;
|
||||
remoteInfo = OnDiskPt;
|
||||
};
|
||||
1EAF9DCD14B9F8D6005E8EBD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D2AAC045055464E500DB518D;
|
||||
remoteInfo = moses;
|
||||
};
|
||||
1EAF9DCF14B9F8D6005E8EBD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1EE8C2E81476A48E002496F2;
|
||||
remoteInfo = lm;
|
||||
};
|
||||
1EBC53BC164C4AC300ADFA2C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 1EBC53AE164C4A6200ADFA2C;
|
||||
remoteInfo = search;
|
||||
};
|
||||
1EBC53E5164C4AFC00ADFA2C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1EBC53AD164C4A6200ADFA2C;
|
||||
remoteInfo = search;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = moses.xcodeproj; sourceTree = "<group>"; };
|
||||
1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = OnDiskPt.xcodeproj; sourceTree = "<group>"; };
|
||||
1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = lm.xcodeproj; sourceTree = "<group>"; };
|
||||
1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = search.xcodeproj; sourceTree = "<group>"; };
|
||||
1EF0718A14B9F1D40052152A /* IOWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOWrapper.cpp; path = "../../moses-chart-cmd/src/IOWrapper.cpp"; sourceTree = "<group>"; };
|
||||
1EF0718B14B9F1D40052152A /* IOWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOWrapper.h; path = "../../moses-chart-cmd/src/IOWrapper.h"; sourceTree = "<group>"; };
|
||||
1EF0718E14B9F1D40052152A /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = "../../moses-chart-cmd/src/Main.cpp"; sourceTree = "<group>"; };
|
||||
1EF0718F14B9F1D40052152A /* Main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Main.h; path = "../../moses-chart-cmd/src/Main.h"; sourceTree = "<group>"; };
|
||||
1EF0719114B9F1D40052152A /* mbr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mbr.cpp; path = "../../moses-chart-cmd/src/mbr.cpp"; sourceTree = "<group>"; };
|
||||
1EF0719214B9F1D40052152A /* mbr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mbr.h; path = "../../moses-chart-cmd/src/mbr.h"; sourceTree = "<group>"; };
|
||||
1EF0719414B9F1D40052152A /* TranslationAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationAnalysis.cpp; path = "../../moses-chart-cmd/src/TranslationAnalysis.cpp"; sourceTree = "<group>"; };
|
||||
1EF0719514B9F1D40052152A /* TranslationAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationAnalysis.h; path = "../../moses-chart-cmd/src/TranslationAnalysis.h"; sourceTree = "<group>"; };
|
||||
8DD76F6C0486A84900D96B5E /* moses-chart-cmd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "moses-chart-cmd"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8DD76F660486A84900D96B5E /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1EBC53E7164C4B1400ADFA2C /* libsearch.a in Frameworks */,
|
||||
1EAF9DC614B9F8CD005E8EBD /* liblm.a in Frameworks */,
|
||||
1EAF9DC714B9F8CD005E8EBD /* libmoses.a in Frameworks */,
|
||||
1EAF9DC814B9F8CD005E8EBD /* libOnDiskPt.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* moses-chart-cmd */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6859E8C029090F304C91782 /* Documentation */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */,
|
||||
1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */,
|
||||
1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */,
|
||||
1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */,
|
||||
);
|
||||
name = "moses-chart-cmd";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1EF0718A14B9F1D40052152A /* IOWrapper.cpp */,
|
||||
1EF0718B14B9F1D40052152A /* IOWrapper.h */,
|
||||
1EF0718E14B9F1D40052152A /* Main.cpp */,
|
||||
1EF0718F14B9F1D40052152A /* Main.h */,
|
||||
1EF0719114B9F1D40052152A /* mbr.cpp */,
|
||||
1EF0719214B9F1D40052152A /* mbr.h */,
|
||||
1EF0719414B9F1D40052152A /* TranslationAnalysis.cpp */,
|
||||
1EF0719514B9F1D40052152A /* TranslationAnalysis.h */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DD76F6C0486A84900D96B5E /* moses-chart-cmd */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1EAF9DA614B9F8AD005E8EBD /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1EAF9DAD14B9F8AD005E8EBD /* libmoses.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1EAF9DAF14B9F8B1005E8EBD /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1EAF9DB614B9F8B1005E8EBD /* libOnDiskPt.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1EAF9DB814B9F8B9005E8EBD /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1EAF9DC314B9F8BA005E8EBD /* liblm.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1EBC53B6164C4AC300ADFA2C /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1EBC53BD164C4AC300ADFA2C /* libsearch.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C6859E8C029090F304C91782 /* Documentation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Documentation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8DD76F620486A84900D96B5E /* moses-chart-cmd */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "moses-chart-cmd" */;
|
||||
buildPhases = (
|
||||
8DD76F640486A84900D96B5E /* Sources */,
|
||||
8DD76F660486A84900D96B5E /* Frameworks */,
|
||||
8DD76F690486A84900D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1EBC53E6164C4AFC00ADFA2C /* PBXTargetDependency */,
|
||||
1EAF9DCC14B9F8D6005E8EBD /* PBXTargetDependency */,
|
||||
1EAF9DCE14B9F8D6005E8EBD /* PBXTargetDependency */,
|
||||
1EAF9DD014B9F8D6005E8EBD /* PBXTargetDependency */,
|
||||
);
|
||||
name = "moses-chart-cmd";
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = "moses-chart-cmd";
|
||||
productReference = 8DD76F6C0486A84900D96B5E /* moses-chart-cmd */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "moses-chart-cmd" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* moses-chart-cmd */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 1EAF9DB814B9F8B9005E8EBD /* Products */;
|
||||
ProjectRef = 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 1EAF9DA614B9F8AD005E8EBD /* Products */;
|
||||
ProjectRef = 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 1EAF9DAF14B9F8B1005E8EBD /* Products */;
|
||||
ProjectRef = 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 1EBC53B6164C4AC300ADFA2C /* Products */;
|
||||
ProjectRef = 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8DD76F620486A84900D96B5E /* moses-chart-cmd */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
1EAF9DAD14B9F8AD005E8EBD /* libmoses.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libmoses.a;
|
||||
remoteRef = 1EAF9DAC14B9F8AD005E8EBD /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
1EAF9DB614B9F8B1005E8EBD /* libOnDiskPt.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libOnDiskPt.a;
|
||||
remoteRef = 1EAF9DB514B9F8B1005E8EBD /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
1EAF9DC314B9F8BA005E8EBD /* liblm.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = liblm.a;
|
||||
remoteRef = 1EAF9DC214B9F8BA005E8EBD /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
1EBC53BD164C4AC300ADFA2C /* libsearch.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libsearch.a;
|
||||
remoteRef = 1EBC53BC164C4AC300ADFA2C /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8DD76F640486A84900D96B5E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1EF0719F14B9F1D40052152A /* IOWrapper.cpp in Sources */,
|
||||
1EF071A214B9F1D40052152A /* Main.cpp in Sources */,
|
||||
1EF071A414B9F1D40052152A /* mbr.cpp in Sources */,
|
||||
1EF071A614B9F1D40052152A /* TranslationAnalysis.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
1EAF9DCC14B9F8D6005E8EBD /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = OnDiskPt;
|
||||
targetProxy = 1EAF9DCB14B9F8D6005E8EBD /* PBXContainerItemProxy */;
|
||||
};
|
||||
1EAF9DCE14B9F8D6005E8EBD /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = moses;
|
||||
targetProxy = 1EAF9DCD14B9F8D6005E8EBD /* PBXContainerItemProxy */;
|
||||
};
|
||||
1EAF9DD014B9F8D6005E8EBD /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = lm;
|
||||
targetProxy = 1EAF9DCF14B9F8D6005E8EBD /* PBXContainerItemProxy */;
|
||||
};
|
||||
1EBC53E6164C4AFC00ADFA2C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = search;
|
||||
targetProxy = 1EBC53E5164C4AFC00ADFA2C /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB923208733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
TRACE_ENABLE,
|
||||
_LARGE_FILES,
|
||||
"_FILE_OFFSET_BITS=64",
|
||||
"MAX_NUM_FACTORS=4",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = /opt/local/include;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
../../irstlm/lib,
|
||||
../../srilm/lib/macosx,
|
||||
/opt/local/lib,
|
||||
../../cmph/lib,
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-lz",
|
||||
"-lirstlm",
|
||||
"-lmisc",
|
||||
"-ldstruct",
|
||||
"-loolm",
|
||||
"-lflm",
|
||||
"-llattice",
|
||||
"-lboost_thread-mt",
|
||||
"-lboost_filesystem-mt",
|
||||
"-lboost_system-mt",
|
||||
"-lcmph",
|
||||
);
|
||||
PRODUCT_NAME = "moses-chart-cmd";
|
||||
SDKROOT = "";
|
||||
USER_HEADER_SEARCH_PATHS = "../../ ../../moses/src";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923308733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
TRACE_ENABLE,
|
||||
_LARGE_FILES,
|
||||
"_FILE_OFFSET_BITS=64",
|
||||
"MAX_NUM_FACTORS=4",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = /opt/local/include;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
../../irstlm/lib,
|
||||
../../srilm/lib/macosx,
|
||||
/opt/local/lib,
|
||||
../../cmph/lib,
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-lz",
|
||||
"-lirstlm",
|
||||
"-lmisc",
|
||||
"-ldstruct",
|
||||
"-loolm",
|
||||
"-lflm",
|
||||
"-llattice",
|
||||
"-lboost_thread-mt",
|
||||
"-lboost_filesystem-mt",
|
||||
"-lboost_system-mt",
|
||||
"-lcmph",
|
||||
);
|
||||
PRODUCT_NAME = "moses-chart-cmd";
|
||||
SDKROOT = "";
|
||||
USER_HEADER_SEARCH_PATHS = "../../ ../../moses/src";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB923608733DC60010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
TRACE_ENABLE,
|
||||
WITH_THREADS,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
../../moses/src,
|
||||
../..,
|
||||
"/Users/hieuhoang/workspace/github/moses-smt/moses/src/**",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB923708733DC60010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
TRACE_ENABLE,
|
||||
WITH_THREADS,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
../../moses/src,
|
||||
../..,
|
||||
"/Users/hieuhoang/workspace/github/moses-smt/moses/src/**",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "moses-chart-cmd" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923208733DC60010E9CD /* Debug */,
|
||||
1DEB923308733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "moses-chart-cmd" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB923608733DC60010E9CD /* Debug */,
|
||||
1DEB923708733DC60010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
@ -1,135 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>moses-chart-cmd</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>lm</project>
|
||||
<project>moses</project>
|
||||
<project>OnDiskPt</project>
|
||||
<project>search</project>
|
||||
<project>util</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-j3</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/moses-chart-cmd/Debug}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>IOWrapper.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/IOWrapper.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>IOWrapper.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/IOWrapper.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Jamfile</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/Jamfile</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Main.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/Main.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Main.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/Main.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationAnalysis.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/TranslationAnalysis.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationAnalysis.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/TranslationAnalysis.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mbr.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/mbr.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mbr.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-chart-cmd/mbr.h</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
@ -1,19 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.461114338">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.461114338" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -48,16 +46,7 @@
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.2096997198" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1546774818" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.paths.523170942" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../irstlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../probingPT/helpers""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../DALM/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../nplm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../randlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../cmph/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/macosx""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686-m64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/moses/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/lm/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/OnDiskPt/Debug""/>
|
||||
@ -67,16 +56,15 @@
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.998577284" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="boost_serialization"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
@ -104,13 +92,13 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.2121690436" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
@ -86,31 +86,11 @@
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>IOWrapper.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/IOWrapper.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>IOWrapper.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/IOWrapper.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Jamfile</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/Jamfile</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LatticeMBR.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/LatticeMBR.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LatticeMBR.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/LatticeMBR.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LatticeMBRGrid.cpp</name>
|
||||
<type>1</type>
|
||||
@ -126,25 +106,5 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/Main.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationAnalysis.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/TranslationAnalysis.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationAnalysis.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/TranslationAnalysis.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mbr.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/mbr.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mbr.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses-cmd/mbr.h</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
@ -50,7 +50,6 @@
|
||||
<listOptionValue builtIn="false" value="WITH_THREADS"/>
|
||||
<listOptionValue builtIn="false" value="KENLM_MAX_ORDER=7"/>
|
||||
<listOptionValue builtIn="false" value="TRACE_ENABLE"/>
|
||||
<listOptionValue builtIn="false" value="LM_IRST"/>
|
||||
<listOptionValue builtIn="false" value="_FILE_OFFSET_BIT=64"/>
|
||||
<listOptionValue builtIn="false" value="_LARGE_FILES"/>
|
||||
</option>
|
||||
@ -142,7 +141,7 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="LM/SRI.h|LM/SRI.cpp|TranslationModel/UG|LM/DALMWrapper.h|LM/DALMWrapper.cpp|TranslationModel/UG/mm/test-dynamic-im-tsa.cc|TranslationModel/UG/mm/symal2mam.cc|TranslationModel/UG/mm/mtt-dump.cc|TranslationModel/UG/mm/mtt-count-words.cc|TranslationModel/UG/mm/mtt-build.cc|TranslationModel/UG/mm/mmlex-lookup.cc|TranslationModel/UG/mm/mmlex-build.cc|TranslationModel/UG/mm/mam_verify.cc|TranslationModel/UG/mm/mam2symal.cc|TranslationModel/UG/mm/custom-pt.cc|TranslationModel/UG/mm/calc-coverage.cc|TranslationModel/UG/mm/mtt.count.cc|TranslationModel/UG/util|LM/oxlm|LM/Rand.h|LM/Rand.cpp|TranslationModel/CompactPT|LM/NeuralLMWrapper.cpp|FF/PhraseLengthFeatureTest.cpp|PhraseLengthFeatureTest.cpp|LM/BackwardTest.cpp|LM/BackwardLMState.h|LM/BackwardLMState.cpp|LM/Backward.h|LM/Backward.cpp|FeatureVectorTest.cpp|LM/ParallelBackoff.h|LM/ParallelBackoff.cpp|src/SyntacticLanguageModelState.h|src/SyntacticLanguageModelFiles.h|src/SyntacticLanguageModel.h|src/SyntacticLanguageModel.cpp|src/LM/SRI.h|src/LM/SRI.cpp|src/LM/Rand.h|src/LM/Rand.cpp|src/LM/LDHT.h|src/LM/LDHT.cpp|SyntacticLanguageModelState.h|SyntacticLanguageModelFiles.h|SyntacticLanguageModel.h|SyntacticLanguageModel.cpp|LM/LDHT.h|LM/LDHT.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="LM/IRST.h|LM/IRST.cpp|LM/SRI.h|LM/SRI.cpp|TranslationModel/UG|LM/DALMWrapper.h|LM/DALMWrapper.cpp|TranslationModel/UG/mm/test-dynamic-im-tsa.cc|TranslationModel/UG/mm/symal2mam.cc|TranslationModel/UG/mm/mtt-dump.cc|TranslationModel/UG/mm/mtt-count-words.cc|TranslationModel/UG/mm/mtt-build.cc|TranslationModel/UG/mm/mmlex-lookup.cc|TranslationModel/UG/mm/mmlex-build.cc|TranslationModel/UG/mm/mam_verify.cc|TranslationModel/UG/mm/mam2symal.cc|TranslationModel/UG/mm/custom-pt.cc|TranslationModel/UG/mm/calc-coverage.cc|TranslationModel/UG/mm/mtt.count.cc|TranslationModel/UG/util|LM/oxlm|LM/Rand.h|LM/Rand.cpp|TranslationModel/CompactPT|LM/NeuralLMWrapper.cpp|FF/PhraseLengthFeatureTest.cpp|PhraseLengthFeatureTest.cpp|LM/BackwardTest.cpp|LM/BackwardLMState.h|LM/BackwardLMState.cpp|LM/Backward.h|LM/Backward.cpp|FeatureVectorTest.cpp|LM/ParallelBackoff.h|LM/ParallelBackoff.cpp|src/SyntacticLanguageModelState.h|src/SyntacticLanguageModelFiles.h|src/SyntacticLanguageModel.h|src/SyntacticLanguageModel.cpp|src/LM/SRI.h|src/LM/SRI.cpp|src/LM/Rand.h|src/LM/Rand.cpp|src/LM/LDHT.h|src/LM/LDHT.cpp|SyntacticLanguageModelState.h|SyntacticLanguageModelFiles.h|SyntacticLanguageModel.h|SyntacticLanguageModel.cpp|LM/LDHT.h|LM/LDHT.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -431,6 +431,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/HypothesisStackNormal.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>IOWrapper.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/IOWrapper.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>IOWrapper.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/IOWrapper.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Incremental.cpp</name>
|
||||
<type>1</type>
|
||||
@ -491,6 +501,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LVoc.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LatticeMBR.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LatticeMBR.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LatticeMBR.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LatticeMBR.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Manager.cpp</name>
|
||||
<type>1</type>
|
||||
@ -766,6 +786,11 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/SyntacticLanguageModelState.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TargetPhrase.cpp</name>
|
||||
<type>1</type>
|
||||
@ -811,6 +836,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Timer.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationAnalysis.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationAnalysis.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationAnalysis.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationAnalysis.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel</name>
|
||||
<type>2</type>
|
||||
@ -876,6 +911,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationOptionList.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationTask.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationTask.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationTask.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationTask.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TreeInput.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1006,6 +1051,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/hypergraph.proto</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mbr.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/mbr.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mbr.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/mbr.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>rule.proto</name>
|
||||
<type>1</type>
|
||||
@ -1161,6 +1216,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InputFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/InternalTree.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InternalTree.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/InternalTree.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InternalTree.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/LexicalReordering</name>
|
||||
<type>2</type>
|
||||
@ -1216,6 +1281,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/PhraseLengthFeatureTest.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/PhraseOrientationFeature.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/PhraseOrientationFeature.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/PhraseOrientationFeature.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/PhraseOrientationFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/PhrasePairFeature.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1456,6 +1531,11 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/WordTranslationFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/extract-ghkm</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/Backward.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1741,6 +1821,126 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/PP/TreeStructurePhraseProperty.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/BoundedPriorityContainer.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/BoundedPriorityContainer.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/Cube.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/Cube.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/Cube.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/Cube.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/CubeQueue.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/CubeQueue.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/CubeQueue.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/CubeQueue.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/KBestExtractor.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/KBestExtractor.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/KBestExtractor.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/KBestExtractor.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/NonTerminalMap.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/NonTerminalMap.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/PHyperedge.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/PHyperedge.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/PVertex.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/PVertex.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/RuleTable.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/RuleTable.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/RuleTableFF.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/RuleTableFF.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/RuleTableFF.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/RuleTableFF.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SHyperedge.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedge.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SHyperedge.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedge.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SHyperedgeBundle.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedgeBundle.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SHyperedgeBundleScorer.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedgeBundleScorer.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SVertex.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SVertex.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SVertex.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SVertex.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SVertexBeam.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SVertexBeam.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SVertexRecombinationOrderer.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SVertexRecombinationOrderer.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SymbolEqualityPred.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SymbolEqualityPred.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/SymbolHasher.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/SymbolHasher.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/BilingualDynSuffixArray.cpp</name>
|
||||
<type>1</type>
|
||||
@ -2017,24 +2217,139 @@
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/osmHyp.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/oxlm/LBLLM.cpp</name>
|
||||
<name>FF/extract-ghkm/PhraseOrientation.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/LBLLM.cpp</locationURI>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/PhraseOrientation.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/oxlm/LBLLM.h</name>
|
||||
<name>FF/extract-ghkm/PhraseOrientation.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/LBLLM.h</locationURI>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/PhraseOrientation.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/oxlm/Mapper.cpp</name>
|
||||
<name>LM/oxlm/OxLM.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/Mapper.cpp</locationURI>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLM.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/oxlm/Mapper.h</name>
|
||||
<name>LM/oxlm/OxLM.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/Mapper.h</locationURI>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLM.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/oxlm/OxLMMapper.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLMMapper.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/oxlm/OxLMMapper.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLMMapper.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/DerivationWriter.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/DerivationWriter.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/DerivationWriter.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/DerivationWriter.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Manager-inl.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Manager-inl.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Manager.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Manager.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/OovHandler-inl.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/OovHandler-inl.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/OovHandler.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/OovHandler.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/PChart.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/PChart.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/PChart.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/PChart.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/PHyperedgeToSHyperedgeBundle.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/PHyperedgeToSHyperedgeBundle.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/ParserCallback.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/ParserCallback.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrie.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrie.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrieCYKPlus.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieCYKPlus.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrieCYKPlus.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieCYKPlus.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrieCreator.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieCreator.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrieLoader.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieLoader.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrieLoader.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieLoader.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrieScope3.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieScope3.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/RuleTrieScope3.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieScope3.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/SChart.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/SChart.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/SChart.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/SChart.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.cpp</name>
|
||||
@ -2811,6 +3126,21 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/KenOSM.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Parser.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Parser.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/RecursiveCYKPlusParser</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/CompactPT/bin/gcc-4.7</name>
|
||||
<type>2</type>
|
||||
@ -3181,6 +3511,76 @@
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser-inl.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser-inl.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/Parser.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/Parser.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/SentenceMap.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SentenceMap.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/SymbolRange.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SymbolRange.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/TailLattice.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLattice.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/CompactPT/bin/gcc-4.7/release</name>
|
||||
<type>2</type>
|
||||
|
@ -1,18 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.852684782">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.852684782" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -20,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.852684782." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.628760407" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.40031730" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/score}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1494414913" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/score}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1494414913" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1369030665" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1299858559" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1103483066" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
@ -39,16 +37,7 @@
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.9477188" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1008235812" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.paths.2139594100" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../irstlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../probingPT/helpers""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../DALM/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../nplm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../randlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../cmph/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/macosx""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686-m64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/moses/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/lm/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/OnDiskPt/Debug""/>
|
||||
@ -58,16 +47,15 @@
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.615408765" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="boost_serialization"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
@ -91,12 +79,12 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1878418244" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
@ -1,97 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.162355801">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.162355801" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1015532240">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1015532240" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.162355801" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.162355801." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1633424067" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.MachO64" id="cdt.managedbuild.target.gnu.platform.exe.debug.1437309068" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/moses-chart-cmd/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1495140314" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1247128100" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1087697480" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1163099464" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1584931166" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.65842083" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="/opt/local/include/"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../cmph/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../boost/include""/>
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1015532240" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1015532240." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1201298107" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.2097807873" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/server}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.857185882" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.142173353" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1657626940" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.269939241" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1769920565" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.649991225" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../..""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../xmlrpc-c/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../boost""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.1785368241" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="HAVE_BOOST"/>
|
||||
<listOptionValue builtIn="false" value="TRACE_ENABLE"/>
|
||||
<listOptionValue builtIn="false" value="KENLM_MAX_ORDER=7"/>
|
||||
<listOptionValue builtIn="false" value="WITH_THREADS"/>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.2063944336" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="MAX_NUM_FACTORS=4"/>
|
||||
<listOptionValue builtIn="false" value="WITH_THREADS"/>
|
||||
<listOptionValue builtIn="false" value="KENLM_MAX_ORDER=7"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1402496521" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.603240279" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.827478809" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1840610682" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.1437095112" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.128236233" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.165185265" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.502789927" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.debug.option.debugging.level.1365428538" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.836267531" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.755343734" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.816413868" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.paths.330225535" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../nplm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../probingPT/helpers""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../DALM/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../cmph/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../irstlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../randlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/macosx""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686-m64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/moses/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/lm/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/OnDiskPt/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/util/Debug""/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1867046221" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1443553047" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.paths.1096041402" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../xmlrpc-c/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/search/Debug""/>
|
||||
<listOptionValue builtIn="false" value="/opt/local/lib"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/moses/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/OnDiskPt/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/lm/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/util/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1177721357" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<option id="gnu.cpp.link.option.libs.1087215166" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_serialization"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_server_abyss++"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_server++"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_server_abyss"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_server"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_abyss"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc++ "/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_util"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_xmlparse"/>
|
||||
<listOptionValue builtIn="false" value="xmlrpc_xmltok"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="boost_serialization"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams"/>
|
||||
<listOptionValue builtIn="false" value="boost_system"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.128214028" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.308755092" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1267270542" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.612723114" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.784062133" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1514675611" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
@ -99,45 +91,44 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.516628324">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.516628324" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.179761083">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.179761083" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.516628324" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.516628324." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1782680519" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.MachO64" id="cdt.managedbuild.target.gnu.platform.exe.release.587667692" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/moses-chart-cmd/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.330540300" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1062976385" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1344864210" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
|
||||
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1422341509" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1573362644" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1937178483" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.179761083" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.179761083." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.2024222442" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1098252145" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/server}/Release" id="cdt.managedbuild.target.gnu.builder.exe.release.24884855" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1561001393" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1260095073" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
|
||||
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.824342210" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.620231073" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.372465520" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1116405938" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.32856289" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.release.option.debugging.level.1235489953" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1583852187" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1635883096" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.74859509" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.exe.release.option.debugging.level.1604502606" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.624155660" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1007421110" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.195880914" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.518921609" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.727800742" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1586891175" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1588265513" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.330494310" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1407747418" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.727000276" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.665044877" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
@ -147,32 +138,31 @@
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="moses-chart-cmd.cdt.managedbuild.target.gnu.exe.532411209" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
|
||||
<project id="server.cdt.managedbuild.target.gnu.exe.580879474" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.516628324;cdt.managedbuild.config.gnu.exe.release.516628324.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1116405938;cdt.managedbuild.tool.gnu.c.compiler.input.1583852187">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.179761083;cdt.managedbuild.config.gnu.exe.release.179761083.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1635883096;cdt.managedbuild.tool.gnu.c.compiler.input.624155660">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.162355801;cdt.managedbuild.config.gnu.exe.debug.162355801.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.827478809;cdt.managedbuild.tool.gnu.c.compiler.input.128236233">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.179761083;cdt.managedbuild.config.gnu.exe.release.179761083.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1260095073;cdt.managedbuild.tool.gnu.cpp.compiler.input.372465520">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.162355801;cdt.managedbuild.config.gnu.exe.debug.162355801.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1087697480;cdt.managedbuild.tool.gnu.cpp.compiler.input.1402496521">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1015532240;cdt.managedbuild.config.gnu.exe.debug.1015532240.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1657626940;cdt.managedbuild.tool.gnu.cpp.compiler.input.603240279">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.516628324;cdt.managedbuild.config.gnu.exe.release.516628324.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1344864210;cdt.managedbuild.tool.gnu.cpp.compiler.input.1937178483">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1015532240;cdt.managedbuild.config.gnu.exe.debug.1015532240.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.165185265;cdt.managedbuild.tool.gnu.c.compiler.input.836267531">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/moses-chart-cmd"/>
|
||||
<resource resourceType="PROJECT" workspacePath="/server"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/moses-chart-cmd"/>
|
||||
<resource resourceType="PROJECT" workspacePath="/server"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
39
contrib/other-builds/server/.project
Normal file
39
contrib/other-builds/server/.project
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>server</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>lm</project>
|
||||
<project>moses</project>
|
||||
<project>OnDiskPt</project>
|
||||
<project>search</project>
|
||||
<project>util</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>mosesserver.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/server/mosesserver.cpp</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
1
contrib/rephraser/Jamfile
Normal file
1
contrib/rephraser/Jamfile
Normal file
@ -0,0 +1 @@
|
||||
exe paraphrase : paraphrase.cpp ../../moses//moses ../..//boost_program_options ;
|
148
contrib/rephraser/paraphrase.cpp
Normal file
148
contrib/rephraser/paraphrase.cpp
Normal file
@ -0,0 +1,148 @@
|
||||
// $Id$
|
||||
// vim:tabstop=2
|
||||
|
||||
/***********************************************************************
|
||||
Moses - factored phrase-based language decoder
|
||||
Copyright (C) 2014- University of Edinburgh
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Compute paraphrases from the phrase table
|
||||
**/
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
#include "util/double-conversion/double-conversion.h"
|
||||
#include "util/exception.hh"
|
||||
#include "util/file_piece.hh"
|
||||
#include "util/string_piece.hh"
|
||||
#include "util/tokenize_piece.hh"
|
||||
|
||||
//using namespace Moses;
|
||||
using namespace std;
|
||||
|
||||
namespace po = boost::program_options;
|
||||
|
||||
typedef multimap<float,string> Probs;
|
||||
|
||||
static float threshold = 1e-04;
|
||||
static size_t maxE = 10000; //histogram pruning
|
||||
|
||||
static void add(const string& e, const vector<float> scores,
|
||||
Probs& p_e_given_f, Probs& p_f_given_e) {
|
||||
if (scores[0] > threshold) {
|
||||
p_f_given_e.insert(pair<float,string>(scores[0],e));
|
||||
}
|
||||
while(p_f_given_e.size() > maxE) p_f_given_e.erase(p_f_given_e.begin());
|
||||
if (scores[2] > threshold) {
|
||||
p_e_given_f.insert(pair<float,string>(scores[2],e));
|
||||
}
|
||||
while(p_e_given_f.size() > maxE) p_e_given_f.erase(p_e_given_f.begin());
|
||||
}
|
||||
|
||||
static void finalise(Probs& p_e_given_f, Probs& p_f_given_e) {
|
||||
//cerr << "Sizes: p(e|f): " << p_e_given_f.size() << " p(f|e): " << p_f_given_e.size() << endl;
|
||||
for (Probs::const_iterator e1_iter = p_f_given_e.begin() ;
|
||||
e1_iter != p_f_given_e.end(); ++e1_iter) {
|
||||
for (Probs::const_iterator e2_iter = p_e_given_f.begin() ;
|
||||
e2_iter != p_e_given_f.end(); ++e2_iter) {
|
||||
|
||||
if (e1_iter->second == e2_iter->second) continue;
|
||||
cout << e1_iter->second << " ||| " << e2_iter->second << " ||| " <<
|
||||
e1_iter->first * e2_iter->first << " ||| " << endl;
|
||||
}
|
||||
}
|
||||
p_e_given_f.clear();
|
||||
p_f_given_e.clear();
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
string input_file;
|
||||
|
||||
po::options_description desc("Allowed options");
|
||||
desc.add_options()
|
||||
("help,h", "Print help message and exit")
|
||||
("threshold,t", po::value<float>(&threshold), "Threshold for p(e|f) and p(f|e)")
|
||||
("max-target,m", po::value<size_t>(&maxE), "Maximum number of target phrases")
|
||||
("input-file", po::value<string>(&input_file)->required(), "Input phrase table")
|
||||
;
|
||||
|
||||
po::positional_options_description pos;
|
||||
pos.add("input-file",1);
|
||||
|
||||
po::variables_map vm;
|
||||
po::store(po::command_line_parser(argc,argv).options(desc).positional(pos).run(), vm);
|
||||
|
||||
|
||||
if (vm.count("help")) {
|
||||
cerr << "Usage: " << string(argv[0]) + " [options] input-file" << endl;
|
||||
cerr << desc << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
po::notify(vm);
|
||||
|
||||
|
||||
cerr << "Reading from " << input_file << endl;
|
||||
util::FilePiece in(input_file.c_str(), &std::cerr);
|
||||
vector<float> scoreVector;
|
||||
StringPiece line;
|
||||
double_conversion::StringToDoubleConverter converter(double_conversion::StringToDoubleConverter::NO_FLAGS, NAN, NAN, "inf", "nan");
|
||||
|
||||
|
||||
string previousSourcePhrase;
|
||||
Probs p_f_given_e_table;
|
||||
Probs p_e_given_f_table;
|
||||
|
||||
size_t count = 0;
|
||||
while(true) {
|
||||
try {
|
||||
line = in.ReadLine();
|
||||
} catch (const util::EndOfFileException &e) {
|
||||
break;
|
||||
}
|
||||
++count;
|
||||
|
||||
util::TokenIter<util::MultiCharacter> pipes(line, " ||| ");
|
||||
StringPiece sourcePhrase(*pipes);
|
||||
StringPiece targetPhrase(*++pipes);
|
||||
StringPiece scoreString(*++pipes);
|
||||
scoreVector.clear();
|
||||
for (util::TokenIter<util::AnyCharacter, true> s(scoreString, " \t"); s; ++s) {
|
||||
int processed;
|
||||
float score = converter.StringToFloat(s->data(), s->length(), &processed);
|
||||
UTIL_THROW_IF2(isnan(score), "Bad score " << *s << " on line " << count);
|
||||
scoreVector.push_back(score);
|
||||
}
|
||||
|
||||
if (sourcePhrase.size() && sourcePhrase != previousSourcePhrase) {
|
||||
finalise(p_e_given_f_table, p_f_given_e_table);
|
||||
}
|
||||
add(targetPhrase.as_string(),scoreVector, p_e_given_f_table, p_f_given_e_table);
|
||||
previousSourcePhrase = sourcePhrase.as_string();
|
||||
}
|
||||
finalise(p_e_given_f_table, p_f_given_e_table);
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
0
contrib/rt/Empty.c
Normal file
0
contrib/rt/Empty.c
Normal file
9
contrib/rt/README
Normal file
9
contrib/rt/README
Normal file
@ -0,0 +1,9 @@
|
||||
FOR OSX ONLY
|
||||
------------
|
||||
|
||||
This creates an empty library file
|
||||
librt.a
|
||||
It should be used when you are compile with Eclipse on OSX.
|
||||
|
||||
The Eclipse projects are set up to link to librt but OSX doesn't have it so this just creates a dummy library.
|
||||
|
2
contrib/rt/compile.sh
Executable file
2
contrib/rt/compile.sh
Executable file
@ -0,0 +1,2 @@
|
||||
gcc -c Empty.c -o Empty.o
|
||||
ar rcs librt.a Empty.o
|
@ -5,6 +5,10 @@ import path ;
|
||||
|
||||
with-xmlrpc-c = [ option.get "with-xmlrpc-c" ] ;
|
||||
if $(with-xmlrpc-c) {
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;
|
||||
echo "!!! You are linking the XMLRPC-C library; Do NOT use v.1.25.29 !!!" ;
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;
|
||||
|
||||
build-moses-server = true ;
|
||||
xmlrpc-command = $(with-xmlrpc-c)/bin/xmlrpc-c-config ;
|
||||
if ! [ path.exists $(xmlrpc-command) ] {
|
||||
@ -35,7 +39,7 @@ if $(build-moses-server) = true
|
||||
xmlrpc-linkflags = [ shell_or_die "$(xmlrpc-command) c++2 abyss-server --libs" ] ;
|
||||
xmlrpc-cxxflags = [ shell_or_die "$(xmlrpc-command) c++2 abyss-server --cflags" ] ;
|
||||
|
||||
exe mosesserver : mosesserver.cpp ../../moses//moses ../../OnDiskPt//OnDiskPt ../../moses-cmd/IOWrapper.cpp ../..//boost_filesystem : <linkflags>$(xmlrpc-linkflags) <cxxflags>$(xmlrpc-cxxflags) ;
|
||||
exe mosesserver : mosesserver.cpp ../../moses//moses ../../OnDiskPt//OnDiskPt ../..//boost_filesystem : <linkflags>$(xmlrpc-linkflags) <cxxflags>$(xmlrpc-cxxflags) ;
|
||||
} else {
|
||||
alias mosesserver ;
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "moses/Hypothesis.h"
|
||||
#include "moses/Manager.h"
|
||||
#include "moses/StaticData.h"
|
||||
#include "moses/ThreadPool.h"
|
||||
#include "moses/TranslationModel/PhraseDictionaryDynSuffixArray.h"
|
||||
#include "moses/TranslationModel/PhraseDictionaryMultiModelCounts.h"
|
||||
#if PT_UG
|
||||
@ -16,7 +17,7 @@
|
||||
#endif
|
||||
#include "moses/TreeInput.h"
|
||||
#include "moses/LM/ORLM.h"
|
||||
#include "moses-cmd/IOWrapper.h"
|
||||
#include "moses/IOWrapper.h"
|
||||
|
||||
#ifdef WITH_THREADS
|
||||
#include <boost/thread.hpp>
|
||||
@ -27,7 +28,6 @@
|
||||
#include <xmlrpc-c/server_abyss.hpp>
|
||||
|
||||
using namespace Moses;
|
||||
using namespace MosesCmd;
|
||||
using namespace std;
|
||||
|
||||
typedef std::map<std::string, xmlrpc_c::value> params_t;
|
||||
@ -199,24 +199,29 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class Translator : public xmlrpc_c::method
|
||||
{
|
||||
/**
|
||||
* Required so that translations can be sent to a thread pool.
|
||||
**/
|
||||
class TranslationTask : public virtual Moses::Task {
|
||||
public:
|
||||
Translator() {
|
||||
// signature and help strings are documentation -- the client
|
||||
// can query this information with a system.methodSignature and
|
||||
// system.methodHelp RPC.
|
||||
this->_signature = "S:S";
|
||||
this->_help = "Does translation";
|
||||
}
|
||||
TranslationTask(xmlrpc_c::paramList const& paramList,
|
||||
boost::condition_variable& cond, boost::mutex& mut)
|
||||
: m_paramList(paramList),
|
||||
m_cond(cond),
|
||||
m_mut(mut),
|
||||
m_done(false)
|
||||
{}
|
||||
|
||||
void
|
||||
execute(xmlrpc_c::paramList const& paramList,
|
||||
xmlrpc_c::value * const retvalP) {
|
||||
virtual bool DeleteAfterExecution() {return false;}
|
||||
|
||||
const params_t params = paramList.getStruct(0);
|
||||
paramList.verifyEnd(1);
|
||||
bool IsDone() const {return m_done;}
|
||||
|
||||
const map<string, xmlrpc_c::value>& GetRetData() { return m_retData;}
|
||||
|
||||
virtual void Run() {
|
||||
|
||||
const params_t params = m_paramList.getStruct(0);
|
||||
m_paramList.verifyEnd(1);
|
||||
params_t::const_iterator si = params.find("text");
|
||||
if (si == params.end()) {
|
||||
throw xmlrpc_c::fault(
|
||||
@ -268,43 +273,44 @@ public:
|
||||
}
|
||||
|
||||
stringstream out, graphInfo, transCollOpts;
|
||||
map<string, xmlrpc_c::value> retData;
|
||||
|
||||
if (staticData.IsChart()) {
|
||||
TreeInput tinput;
|
||||
const vector<FactorType>&
|
||||
inputFactorOrder = staticData.GetInputFactorOrder();
|
||||
inputFactorOrder = staticData.GetInputFactorOrder();
|
||||
stringstream in(source + "\n");
|
||||
tinput.Read(in,inputFactorOrder);
|
||||
ChartManager manager(0,tinput);
|
||||
ChartManager manager(tinput);
|
||||
manager.ProcessSentence();
|
||||
const ChartHypothesis *hypo = manager.GetBestHypothesis();
|
||||
outputChartHypo(out,hypo);
|
||||
if (addGraphInfo) {
|
||||
const size_t translationId = tinput.GetTranslationId();
|
||||
// const size_t translationId = tinput.GetTranslationId();
|
||||
std::ostringstream sgstream;
|
||||
manager.OutputSearchGraphMoses(sgstream);
|
||||
retData.insert(pair<string, xmlrpc_c::value>("sg", xmlrpc_c::value_string(sgstream.str())));
|
||||
m_retData.insert(pair<string, xmlrpc_c::value>("sg", xmlrpc_c::value_string(sgstream.str())));
|
||||
}
|
||||
} else {
|
||||
size_t lineNumber = 0; // TODO: Include sentence request number here?
|
||||
Sentence sentence;
|
||||
sentence.SetTranslationId(lineNumber);
|
||||
|
||||
const vector<FactorType> &
|
||||
inputFactorOrder = staticData.GetInputFactorOrder();
|
||||
inputFactorOrder = staticData.GetInputFactorOrder();
|
||||
stringstream in(source + "\n");
|
||||
sentence.Read(in,inputFactorOrder);
|
||||
size_t lineNumber = 0; // TODO: Include sentence request number here?
|
||||
Manager manager(lineNumber, sentence, staticData.GetSearchAlgorithm());
|
||||
manager.ProcessSentence();
|
||||
Manager manager(sentence, staticData.GetSearchAlgorithm());
|
||||
manager.ProcessSentence();
|
||||
const Hypothesis* hypo = manager.GetBestHypothesis();
|
||||
|
||||
vector<xmlrpc_c::value> alignInfo;
|
||||
outputHypo(out,hypo,addAlignInfo,alignInfo,reportAllFactors);
|
||||
if (addAlignInfo) {
|
||||
retData.insert(pair<string, xmlrpc_c::value>("align", xmlrpc_c::value_array(alignInfo)));
|
||||
m_retData.insert(pair<string, xmlrpc_c::value>("align", xmlrpc_c::value_array(alignInfo)));
|
||||
}
|
||||
if (addWordAlignInfo) {
|
||||
stringstream wordAlignment;
|
||||
OutputAlignment(wordAlignment, hypo);
|
||||
IOWrapper::OutputAlignment(wordAlignment, hypo);
|
||||
vector<xmlrpc_c::value> alignments;
|
||||
string alignmentPair;
|
||||
while (wordAlignment >> alignmentPair) {
|
||||
@ -314,26 +320,31 @@ public:
|
||||
wordAlignInfo["target-word"] = xmlrpc_c::value_int(atoi(alignmentPair.substr(pos + 1).c_str()));
|
||||
alignments.push_back(xmlrpc_c::value_struct(wordAlignInfo));
|
||||
}
|
||||
retData.insert(pair<string, xmlrpc_c::value_array>("word-align", alignments));
|
||||
m_retData.insert(pair<string, xmlrpc_c::value_array>("word-align", alignments));
|
||||
}
|
||||
|
||||
if (addGraphInfo) {
|
||||
insertGraphInfo(manager,retData);
|
||||
insertGraphInfo(manager,m_retData);
|
||||
(const_cast<StaticData&>(staticData)).SetOutputSearchGraph(false);
|
||||
}
|
||||
if (addTopts) {
|
||||
insertTranslationOptions(manager,retData);
|
||||
insertTranslationOptions(manager,m_retData);
|
||||
}
|
||||
if (nbest_size>0) {
|
||||
outputNBest(manager, retData, nbest_size, nbest_distinct,
|
||||
outputNBest(manager, m_retData, nbest_size, nbest_distinct,
|
||||
reportAllFactors, addAlignInfo, addScoreBreakdown);
|
||||
}
|
||||
}
|
||||
pair<string, xmlrpc_c::value>
|
||||
text("text", xmlrpc_c::value_string(out.str()));
|
||||
retData.insert(text);
|
||||
m_retData.insert(text);
|
||||
XVERBOSE(1,"Output: " << out.str() << endl);
|
||||
*retvalP = xmlrpc_c::value_struct(retData);
|
||||
{
|
||||
boost::lock_guard<boost::mutex> lock(m_mut);
|
||||
m_done = true;
|
||||
}
|
||||
m_cond.notify_one();
|
||||
|
||||
}
|
||||
|
||||
void outputHypo(ostream& out, const Hypothesis* hypo, bool addAlignmentInfo, vector<xmlrpc_c::value>& alignInfo, bool reportAllFactors = false) {
|
||||
@ -461,7 +472,7 @@ public:
|
||||
|
||||
if ((int)edges.size() > 0) {
|
||||
stringstream wordAlignment;
|
||||
OutputAlignment(wordAlignment, edges[0]);
|
||||
IOWrapper::OutputAlignment(wordAlignment, edges[0]);
|
||||
vector<xmlrpc_c::value> alignments;
|
||||
string alignmentPair;
|
||||
while (wordAlignment >> alignmentPair) {
|
||||
@ -479,7 +490,7 @@ public:
|
||||
{
|
||||
// should the score breakdown be reported in a more structured manner?
|
||||
ostringstream buf;
|
||||
MosesCmd::OutputAllFeatureScores(path.GetScoreBreakdown(),buf);
|
||||
IOWrapper::OutputAllFeatureScores(path.GetScoreBreakdown(),buf);
|
||||
nBestXMLItem["fvals"] = xmlrpc_c::value_string(buf.str());
|
||||
}
|
||||
|
||||
@ -520,7 +531,43 @@ public:
|
||||
}
|
||||
}
|
||||
retData.insert(pair<string, xmlrpc_c::value>("topt", xmlrpc_c::value_array(toptsXml)));
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
xmlrpc_c::paramList const& m_paramList;
|
||||
map<string, xmlrpc_c::value> m_retData;
|
||||
boost::condition_variable& m_cond;
|
||||
boost::mutex& m_mut;
|
||||
bool m_done;
|
||||
};
|
||||
|
||||
class Translator : public xmlrpc_c::method
|
||||
{
|
||||
public:
|
||||
Translator(size_t numThreads = 10) : m_threadPool(numThreads) {
|
||||
// signature and help strings are documentation -- the client
|
||||
// can query this information with a system.methodSignature and
|
||||
// system.methodHelp RPC.
|
||||
this->_signature = "S:S";
|
||||
this->_help = "Does translation";
|
||||
}
|
||||
|
||||
void
|
||||
execute(xmlrpc_c::paramList const& paramList,
|
||||
xmlrpc_c::value * const retvalP) {
|
||||
boost::condition_variable cond;
|
||||
boost::mutex mut;
|
||||
TranslationTask task(paramList,cond,mut);
|
||||
m_threadPool.Submit(&task);
|
||||
boost::unique_lock<boost::mutex> lock(mut);
|
||||
while (!task.IsDone()) {
|
||||
cond.wait(lock);
|
||||
}
|
||||
*retvalP = xmlrpc_c::value_struct(task.GetRetData());
|
||||
}
|
||||
private:
|
||||
Moses::ThreadPool m_threadPool;
|
||||
};
|
||||
|
||||
static
|
||||
@ -580,6 +627,7 @@ int main(int argc, char** argv)
|
||||
int port = 8080;
|
||||
const char* logfile = "/dev/null";
|
||||
bool isSerial = false;
|
||||
size_t numThreads = 10; //for translation tasks
|
||||
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
if (!strcmp(argv[i],"--server-port")) {
|
||||
@ -598,6 +646,14 @@ int main(int argc, char** argv)
|
||||
} else {
|
||||
logfile = argv[i];
|
||||
}
|
||||
} else if (!strcmp(argv[i], "--threads")) {
|
||||
++i;
|
||||
if (i>=argc) {
|
||||
cerr << "Error: Missing argument to --threads" << endl;
|
||||
exit(1);
|
||||
} else {
|
||||
numThreads = atoi(argv[i]);
|
||||
}
|
||||
} else if (!strcmp(argv[i], "--serial")) {
|
||||
cerr << "Running single-threaded server" << endl;
|
||||
isSerial = true;
|
||||
@ -627,7 +683,7 @@ int main(int argc, char** argv)
|
||||
|
||||
xmlrpc_c::registry myRegistry;
|
||||
|
||||
xmlrpc_c::methodPtr const translator(new Translator);
|
||||
xmlrpc_c::methodPtr const translator(new Translator(numThreads));
|
||||
xmlrpc_c::methodPtr const updater(new Updater);
|
||||
xmlrpc_c::methodPtr const optimizer(new Optimizer);
|
||||
|
||||
|
@ -7,4 +7,4 @@ all: filter-pt
|
||||
|
||||
filter-pt: filter-pt.cpp
|
||||
./check-install $(SALMDIR)
|
||||
$(CXX) -O6 $(INC) $(OBJS) -o filter-pt filter-pt.cpp
|
||||
$(CXX) -O6 $(INC) $(OBJS) -o filter-pt filter-pt.cpp -lboost_thread -lboost_system
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
#include "_SuffixArraySearchApplicationBase.h"
|
||||
|
||||
@ -11,18 +13,16 @@
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
|
||||
#include <boost/thread/tss.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
#include "WIN32_functions.h"
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
typedef std::vector<TextLenType> SentIdSet;
|
||||
typedef std::pair<SentIdSet, clock_t> ClockedSentIdSet;
|
||||
typedef std::map<std::string, ClockedSentIdSet> PhraseSetMap;
|
||||
|
||||
#undef min
|
||||
|
||||
// constants
|
||||
const size_t MINIMUM_SIZE_TO_KEEP = 10000; // increase this to improve memory usage,
|
||||
// reduce for speed
|
||||
@ -39,12 +39,9 @@ double sig_filter_limit = 0; // keep phrase pairs with -log(sig) > si
|
||||
// higher = filter-more
|
||||
bool pef_filter_only = false; // only filter based on pef
|
||||
bool hierarchical = false;
|
||||
int max_cache = 0;
|
||||
|
||||
// globals
|
||||
PhraseSetMap esets;
|
||||
PhraseSetMap fsets;
|
||||
double p_111 = 0.0; // alpha
|
||||
size_t pt_lines = 0;
|
||||
size_t nremoved_sigfilter = 0;
|
||||
size_t nremoved_pfefilter = 0;
|
||||
|
||||
@ -52,6 +49,69 @@ C_SuffixArraySearchApplicationBase e_sa;
|
||||
C_SuffixArraySearchApplicationBase f_sa;
|
||||
int num_lines;
|
||||
|
||||
boost::mutex in_mutex;
|
||||
boost::mutex out_mutex;
|
||||
boost::mutex err_mutex;
|
||||
|
||||
typedef boost::shared_ptr<std::vector<TextLenType> > SentIdSet;
|
||||
|
||||
class Cache {
|
||||
typedef std::pair<SentIdSet, clock_t> ClockedSet;
|
||||
typedef boost::unordered_map<std::string, ClockedSet> ClockedMap;
|
||||
|
||||
public:
|
||||
|
||||
SentIdSet get(const std::string& phrase) {
|
||||
boost::shared_lock<boost::shared_mutex> lock(m_mutex);
|
||||
if(m_cont.count(phrase)) {
|
||||
ClockedSet& set = m_cont[phrase];
|
||||
set.second = clock();
|
||||
return set.first;
|
||||
}
|
||||
return SentIdSet( new SentIdSet::element_type() );
|
||||
}
|
||||
|
||||
void put(const std::string& phrase, const SentIdSet set) {
|
||||
boost::unique_lock<boost::shared_mutex> lock(m_mutex);
|
||||
m_cont[phrase] = std::make_pair(set, clock());
|
||||
}
|
||||
|
||||
static void set_max_cache(size_t max_cache) {
|
||||
s_max_cache = max_cache;
|
||||
}
|
||||
|
||||
void prune() {
|
||||
if(s_max_cache > 0) {
|
||||
boost::upgrade_lock<boost::shared_mutex> lock(m_mutex);
|
||||
if(m_cont.size() > s_max_cache) {
|
||||
std::vector<clock_t> clocks;
|
||||
for(ClockedMap::iterator it = m_cont.begin(); it != m_cont.end(); it++)
|
||||
clocks.push_back(it->second.second);
|
||||
|
||||
std::sort(clocks.begin(), clocks.end());
|
||||
clock_t out = clocks[m_cont.size() - s_max_cache];
|
||||
|
||||
boost::upgrade_to_unique_lock<boost::shared_mutex> uniq_lock(lock);
|
||||
for(ClockedMap::iterator it = m_cont.begin(); it != m_cont.end(); it++)
|
||||
if(it->second.second < out)
|
||||
m_cont.erase(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ClockedMap m_cont;
|
||||
boost::shared_mutex m_mutex;
|
||||
static size_t s_max_cache;
|
||||
};
|
||||
|
||||
size_t Cache::s_max_cache = 0;
|
||||
|
||||
Cache f_cache;
|
||||
Cache e_cache;
|
||||
|
||||
#undef min
|
||||
|
||||
void usage()
|
||||
{
|
||||
std::cerr << "\nFilter phrase table using significance testing as described\n"
|
||||
@ -59,12 +119,13 @@ void usage()
|
||||
<< "by Discarding Most of the Phrasetable. EMNLP 2007.\n"
|
||||
<< "\nUsage:\n"
|
||||
<< "\n filter-pt -e english.suf-arr -f french.suf-arr\n"
|
||||
<< " [-c] [-p] [-l threshold] [-n num] < PHRASE-TABLE > FILTERED-PHRASE-TABLE\n\n"
|
||||
<< " [-c] [-p] [-l threshold] [-n num] [-t num] < PHRASE-TABLE > FILTERED-PHRASE-TABLE\n\n"
|
||||
<< " [-l threshold] >0.0, a+e, or a-e: keep values that have a -log significance > this\n"
|
||||
<< " [-n num ] 0, 1...: 0=no filtering, >0 sort by P(e|f) and keep the top num elements\n"
|
||||
<< " [-c ] add the cooccurence counts to the phrase table\n"
|
||||
<< " [-p ] add -log(significance) to the phrasetable\n"
|
||||
<< " [-h ] filter hierarchical rule table\n"
|
||||
<< " [-t num ] use num threads\n"
|
||||
<< " [-m num ] limit cache to num most recent phrases\n";
|
||||
exit(1);
|
||||
}
|
||||
@ -133,9 +194,6 @@ PTEntry::PTEntry(const std::string& str, int index) :
|
||||
*fp++=0;
|
||||
|
||||
this->pfe = atof(f);
|
||||
|
||||
// std::cerr << "L: " << f_phrase << " ::: " << e_phrase << " ::: " << scores << " ::: " << pfe << std::endl;
|
||||
// std::cerr << "X: " << extra << "\n";
|
||||
}
|
||||
|
||||
struct PfeComparer {
|
||||
@ -168,7 +226,8 @@ std::ostream& operator << (std::ostream& os, const PTEntry& pp)
|
||||
void print(int a, int b, int c, int d, float p)
|
||||
{
|
||||
std::cerr << a << "\t" << b << "\t P=" << p << "\n"
|
||||
<< c << "\t" << d << "\t xf=" << (double)(b)*(double)(c)/(double)(a+1)/(double)(d+1) << "\n\n";
|
||||
<< c << "\t" << d << "\t xf="
|
||||
<< (double)(b)*(double)(c)/(double)(a+1)/(double)(d+1) << "\n\n";
|
||||
}
|
||||
|
||||
// 2x2 (one-sided) Fisher's exact test
|
||||
@ -184,13 +243,13 @@ double fisher_exact(int cfe, int ce, int cf)
|
||||
int d = (num_lines - ce - cf + cfe);
|
||||
int n = a + b + c + d;
|
||||
|
||||
double cp = exp(lgamma(1+a+c) + lgamma(1+b+d) + lgamma(1+a+b) + lgamma(1+c+d) - lgamma(1+n) - lgamma(1+a) - lgamma(1+b) - lgamma(1+c) - lgamma(1+d));
|
||||
double cp = exp(lgamma(1+a+c) + lgamma(1+b+d) + lgamma(1+a+b) + lgamma(1+c+d)
|
||||
- lgamma(1+n) - lgamma(1+a) - lgamma(1+b) - lgamma(1+c)
|
||||
- lgamma(1+d));
|
||||
double total_p = 0.0;
|
||||
int tc = std::min(b,c);
|
||||
for (int i=0; i<=tc; i++) {
|
||||
total_p += cp;
|
||||
// double lg = lgamma(1+a+c) + lgamma(1+b+d) + lgamma(1+a+b) + lgamma(1+c+d) - lgamma(1+n) - lgamma(1+a) - lgamma(1+b) - lgamma(1+c) - lgamma(1+d); double cp = exp(lg);
|
||||
// print(a,b,c,d,cp);
|
||||
double coef = (double)(b)*(double)(c)/(double)(a+1)/(double)(d+1);
|
||||
cp *= coef;
|
||||
++a;
|
||||
@ -202,86 +261,73 @@ double fisher_exact(int cfe, int ce, int cf)
|
||||
}
|
||||
|
||||
template <class setType>
|
||||
setType ordered_set_intersect(setType & set_1, setType & set_2)
|
||||
void ordered_set_intersect(setType& out, const setType set_1, const setType set_2)
|
||||
{
|
||||
setType set_out;
|
||||
std::set_intersection(set_1.begin(), set_1.end(), set_2.begin(), set_2.end(), inserter(set_out,set_out.begin()) );
|
||||
return set_out;
|
||||
std::set_intersection(set_1->begin(), set_1->end(), set_2->begin(),
|
||||
set_2->end(), inserter(*out, out->begin()) );
|
||||
}
|
||||
|
||||
|
||||
SentIdSet lookup_phrase(const std::string & phrase, C_SuffixArraySearchApplicationBase & my_sa)
|
||||
void lookup_phrase(SentIdSet& ids, const std::string& phrase,
|
||||
C_SuffixArraySearchApplicationBase & my_sa, Cache& cache)
|
||||
{
|
||||
SentIdSet occur_set;
|
||||
vector<S_SimplePhraseLocationElement> locations;
|
||||
|
||||
locations = my_sa.locateExactPhraseInCorpus(phrase.c_str());
|
||||
if(locations.size()==0) {
|
||||
cerr<<"No occurrences found!!\n";
|
||||
ids = cache.get(phrase);
|
||||
if(ids->empty()) {
|
||||
vector<S_SimplePhraseLocationElement> locations;
|
||||
locations = my_sa.locateExactPhraseInCorpus(phrase.c_str());
|
||||
if(locations.size()==0) {
|
||||
cerr<<"No occurrences found!!\n";
|
||||
}
|
||||
for (vector<S_SimplePhraseLocationElement>::iterator i=locations.begin();
|
||||
i != locations.end(); ++i) {
|
||||
ids->push_back(i->sentIdInCorpus);
|
||||
}
|
||||
|
||||
std::sort(ids->begin(), ids->end());
|
||||
SentIdSet::element_type::iterator it =
|
||||
std::unique(ids->begin(), ids->end());
|
||||
ids->resize(it - ids->begin());
|
||||
|
||||
if(ids->size() >= MINIMUM_SIZE_TO_KEEP)
|
||||
cache.put(phrase, ids);
|
||||
}
|
||||
for (vector<S_SimplePhraseLocationElement>::iterator i=locations.begin(); i != locations.end(); ++i) {
|
||||
occur_set.push_back(i->sentIdInCorpus);
|
||||
}
|
||||
|
||||
std::sort(occur_set.begin(), occur_set.end());
|
||||
SentIdSet::iterator it = std::unique(occur_set.begin(), occur_set.end());
|
||||
occur_set.resize(it - occur_set.begin());
|
||||
|
||||
return occur_set;
|
||||
}
|
||||
|
||||
|
||||
// slight simplicifaction: we consider all sentences in which "a" and "b" occur to be instances of the rule "a [X][X] b".
|
||||
SentIdSet lookup_multiple_phrases(vector<std::string> & phrases, C_SuffixArraySearchApplicationBase & my_sa, const std::string & rule, PhraseSetMap & cache)
|
||||
{
|
||||
void lookup_multiple_phrases(SentIdSet& ids, vector<std::string> & phrases,
|
||||
C_SuffixArraySearchApplicationBase & my_sa,
|
||||
const std::string & rule, Cache& cache)
|
||||
{
|
||||
|
||||
if (phrases.size() == 1) {
|
||||
return lookup_phrase(phrases.front(), my_sa);
|
||||
lookup_phrase(ids, phrases.front(), my_sa, cache);
|
||||
}
|
||||
|
||||
else {
|
||||
SentIdSet main_set;
|
||||
ClockedSentIdSet & clocked_first_set = cache[phrases.front()];
|
||||
SentIdSet & first_set = clocked_first_set.first;
|
||||
clocked_first_set.second = clock();
|
||||
|
||||
SentIdSet main_set( new SentIdSet::element_type() );
|
||||
bool first = true;
|
||||
if (first_set.empty()) {
|
||||
first_set = lookup_phrase(phrases.front(), my_sa);
|
||||
}
|
||||
for (vector<std::string>::iterator phrase=phrases.begin()+1; phrase != phrases.end(); ++phrase) {
|
||||
ClockedSentIdSet & clocked_temp_set = cache[*phrase];
|
||||
SentIdSet & temp_set = clocked_temp_set.first;
|
||||
clocked_temp_set.second = clock();
|
||||
|
||||
if (temp_set.empty()) {
|
||||
temp_set = lookup_phrase(*phrase, my_sa);
|
||||
}
|
||||
SentIdSet first_set( new SentIdSet::element_type() );
|
||||
lookup_phrase(first_set, phrases.front(), my_sa, cache);
|
||||
for (vector<std::string>::iterator phrase=phrases.begin()+1;
|
||||
phrase != phrases.end(); ++phrase) {
|
||||
SentIdSet temp_set( new SentIdSet::element_type() );
|
||||
lookup_phrase(temp_set, *phrase, my_sa, cache);
|
||||
if (first) {
|
||||
main_set = ordered_set_intersect(first_set,temp_set);
|
||||
ordered_set_intersect(main_set, first_set, temp_set);
|
||||
first = false;
|
||||
}
|
||||
else {
|
||||
main_set = ordered_set_intersect(main_set,temp_set);
|
||||
}
|
||||
if (temp_set.size() < MINIMUM_SIZE_TO_KEEP) {
|
||||
cache.erase(*phrase);
|
||||
SentIdSet new_set( new SentIdSet::element_type() );
|
||||
ordered_set_intersect(new_set, main_set, temp_set);
|
||||
main_set->swap(*new_set);
|
||||
}
|
||||
}
|
||||
|
||||
if (first_set.size() < MINIMUM_SIZE_TO_KEEP) {
|
||||
cache.erase(phrases.front());
|
||||
}
|
||||
|
||||
return main_set;
|
||||
ids->swap(*main_set);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SentIdSet find_occurrences(const std::string& rule, C_SuffixArraySearchApplicationBase & my_sa, PhraseSetMap & cache)
|
||||
void find_occurrences(SentIdSet& ids, const std::string& rule,
|
||||
C_SuffixArraySearchApplicationBase& my_sa, Cache& cache)
|
||||
{
|
||||
SentIdSet sa_set;
|
||||
|
||||
// we search for hierarchical rules by stripping away NT and looking for terminals sequences
|
||||
// if a rule contains multiple sequences of terminals, we intersect their occurrences.
|
||||
if (hierarchical) {
|
||||
@ -305,76 +351,142 @@ SentIdSet find_occurrences(const std::string& rule, C_SuffixArraySearchApplicati
|
||||
phrases.push_back(rule.substr(pos,NTStartPos-pos));
|
||||
}
|
||||
|
||||
sa_set = lookup_multiple_phrases(phrases, my_sa, rule, cache);
|
||||
lookup_multiple_phrases(ids, phrases, my_sa, rule, cache);
|
||||
}
|
||||
else {
|
||||
sa_set = lookup_phrase(rule, my_sa);
|
||||
lookup_phrase(ids, rule, my_sa, cache);
|
||||
}
|
||||
return sa_set;
|
||||
}
|
||||
|
||||
|
||||
// input: unordered list of translation options for a single source phrase
|
||||
void compute_cooc_stats_and_filter(std::vector<PTEntry*>& options)
|
||||
void compute_cooc_stats_and_filter(std::vector<PTEntry*>& options,
|
||||
Cache& f_cache, Cache& e_cache)
|
||||
{
|
||||
if (pfe_filter_limit>0 && options.size() > pfe_filter_limit) {
|
||||
if (pfe_filter_limit > 0 && options.size() > pfe_filter_limit) {
|
||||
nremoved_pfefilter += (options.size() - pfe_filter_limit);
|
||||
std::nth_element(options.begin(), options.begin()+pfe_filter_limit, options.end(), PfeComparer());
|
||||
for (std::vector<PTEntry*>::iterator i=options.begin()+pfe_filter_limit; i != options.end(); ++i)
|
||||
std::nth_element(options.begin(), options.begin() + pfe_filter_limit,
|
||||
options.end(), PfeComparer());
|
||||
for (std::vector<PTEntry*>::iterator i = options.begin() + pfe_filter_limit;
|
||||
i != options.end(); ++i)
|
||||
delete *i;
|
||||
options.erase(options.begin()+pfe_filter_limit,options.end());
|
||||
options.erase(options.begin() + pfe_filter_limit,options.end());
|
||||
}
|
||||
if (pef_filter_only) return;
|
||||
// std::cerr << "f phrase: " << options.front()->f_phrase << "\n";
|
||||
SentIdSet fset;
|
||||
fset = find_occurrences(options.front()->f_phrase, f_sa, fsets);
|
||||
size_t cf = fset.size();
|
||||
for (std::vector<PTEntry*>::iterator i=options.begin(); i != options.end(); ++i) {
|
||||
|
||||
if (pef_filter_only)
|
||||
return;
|
||||
|
||||
if (options.empty())
|
||||
return;
|
||||
|
||||
SentIdSet fset( new SentIdSet::element_type() );
|
||||
find_occurrences(fset, options.front()->f_phrase, f_sa, f_cache);
|
||||
size_t cf = fset->size();
|
||||
|
||||
for (std::vector<PTEntry*>::iterator i = options.begin();
|
||||
i != options.end(); ++i) {
|
||||
const std::string& e_phrase = (*i)->e_phrase;
|
||||
size_t cef=0;
|
||||
ClockedSentIdSet& clocked_eset = esets[e_phrase];
|
||||
SentIdSet & eset = clocked_eset.first;
|
||||
clocked_eset.second = clock();
|
||||
if (eset.empty()) {
|
||||
eset = find_occurrences(e_phrase, e_sa, esets);
|
||||
//std::cerr << "Looking up e-phrase: " << e_phrase << "\n";
|
||||
}
|
||||
size_t ce=eset.size();
|
||||
if (ce < cf) {
|
||||
for (SentIdSet::iterator i=eset.begin(); i != eset.end(); ++i) {
|
||||
if (std::binary_search(fset.begin(), fset.end(), *i)) cef++;
|
||||
}
|
||||
} else {
|
||||
for (SentIdSet::iterator i=fset.begin(); i != fset.end(); ++i) {
|
||||
if (std::binary_search(eset.begin(), eset.end(), *i)) cef++;
|
||||
}
|
||||
}
|
||||
SentIdSet eset( new SentIdSet::element_type() );
|
||||
find_occurrences(eset, e_phrase, e_sa, e_cache);
|
||||
size_t ce = eset->size();
|
||||
|
||||
SentIdSet efset( new SentIdSet::element_type() );
|
||||
ordered_set_intersect(efset, fset, eset);
|
||||
size_t cef = efset->size();
|
||||
|
||||
double nlp = -log(fisher_exact(cef, cf, ce));
|
||||
(*i)->set_cooc_stats(cef, cf, ce, nlp);
|
||||
if (ce < MINIMUM_SIZE_TO_KEEP) {
|
||||
esets.erase(e_phrase);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<PTEntry*>::iterator new_end =
|
||||
std::remove_if(options.begin(), options.end(), NlogSigThresholder(sig_filter_limit));
|
||||
std::remove_if(options.begin(), options.end(),
|
||||
NlogSigThresholder(sig_filter_limit));
|
||||
nremoved_sigfilter += (options.end() - new_end);
|
||||
options.erase(new_end,options.end());
|
||||
}
|
||||
|
||||
void prune_cache(PhraseSetMap & psm) {
|
||||
if(max_cache && psm.size() > max_cache) {
|
||||
std::vector<clock_t> clocks;
|
||||
for(PhraseSetMap::iterator it = psm.begin(); it != psm.end(); it++)
|
||||
clocks.push_back(it->second.second);
|
||||
void filter(std::istream* in, std::ostream* out, int pfe_index) {
|
||||
|
||||
std::vector<std::string> lines;
|
||||
std::string prev = "";
|
||||
std::vector<PTEntry*> options;
|
||||
while(true) {
|
||||
{
|
||||
boost::mutex::scoped_lock lock(in_mutex);
|
||||
if(in->eof())
|
||||
break;
|
||||
|
||||
lines.clear();
|
||||
std::string line;
|
||||
while(getline(*in, line) && lines.size() < 500000)
|
||||
lines.push_back(line);
|
||||
}
|
||||
|
||||
std::sort(clocks.begin(), clocks.end());
|
||||
clock_t out = clocks[psm.size()-max_cache];
|
||||
|
||||
for(PhraseSetMap::iterator it = psm.begin(); it != psm.end(); it++)
|
||||
if(it->second.second < out)
|
||||
psm.erase(it);
|
||||
std::stringstream out_temp;
|
||||
for(std::vector<std::string>::iterator it = lines.begin(); it != lines.end(); it++) {
|
||||
size_t tmp_lines = ++pt_lines;
|
||||
if(tmp_lines % 10000 == 0) {
|
||||
boost::mutex::scoped_lock lock(err_mutex);
|
||||
std::cerr << ".";
|
||||
|
||||
if(tmp_lines % 500000 == 0)
|
||||
std::cerr << "[n:" << tmp_lines << "]\n";
|
||||
|
||||
if(tmp_lines % 10000000 == 0) {
|
||||
float pfefper = (100.0*(float)nremoved_pfefilter)/(float)pt_lines;
|
||||
float sigfper = (100.0*(float)nremoved_sigfilter)/(float)pt_lines;
|
||||
std::cerr << "------------------------------------------------------\n"
|
||||
<< " unfiltered phrases pairs: " << pt_lines << "\n"
|
||||
<< "\n"
|
||||
<< " P(f|e) filter [first]: " << nremoved_pfefilter << " (" << pfefper << "%)\n"
|
||||
<< " significance filter: " << nremoved_sigfilter << " (" << sigfper << "%)\n"
|
||||
<< " TOTAL FILTERED: " << (nremoved_pfefilter + nremoved_sigfilter) << " (" << (sigfper + pfefper) << "%)\n"
|
||||
<< "\n"
|
||||
<< " FILTERED phrase pairs: " << (pt_lines - nremoved_pfefilter - nremoved_sigfilter) << " (" << (100.0-sigfper - pfefper) << "%)\n"
|
||||
<< "------------------------------------------------------\n";
|
||||
}
|
||||
}
|
||||
|
||||
if(pt_lines % 10000 == 0) {
|
||||
f_cache.prune();
|
||||
e_cache.prune();
|
||||
}
|
||||
|
||||
if(it->length() > 0) {
|
||||
PTEntry* pp = new PTEntry(it->c_str(), pfe_index);
|
||||
if (prev != pp->f_phrase) {
|
||||
prev = pp->f_phrase;
|
||||
|
||||
if (!options.empty()) { // always true after first line
|
||||
compute_cooc_stats_and_filter(options, f_cache, e_cache);
|
||||
}
|
||||
|
||||
for (std::vector<PTEntry*>::iterator i = options.begin();
|
||||
i != options.end(); ++i) {
|
||||
out_temp << **i << '\n';
|
||||
delete *i;
|
||||
}
|
||||
|
||||
options.clear();
|
||||
options.push_back(pp);
|
||||
|
||||
} else {
|
||||
options.push_back(pp);
|
||||
}
|
||||
}
|
||||
}
|
||||
boost::mutex::scoped_lock lock(out_mutex);
|
||||
*out << out_temp.str() << std::flush;
|
||||
}
|
||||
compute_cooc_stats_and_filter(options, f_cache, e_cache);
|
||||
|
||||
boost::mutex::scoped_lock lock(out_mutex);
|
||||
for (std::vector<PTEntry*>::iterator i = options.begin();
|
||||
i != options.end(); ++i) {
|
||||
*out << **i << '\n';
|
||||
delete *i;
|
||||
}
|
||||
*out << std::flush;
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
@ -383,7 +495,9 @@ int main(int argc, char * argv[])
|
||||
const char* efile=0;
|
||||
const char* ffile=0;
|
||||
int pfe_index = 2;
|
||||
while ((c = getopt(argc, argv, "cpf:e:i:n:l:m:h")) != -1) {
|
||||
int threads = 1;
|
||||
size_t max_cache = 0;
|
||||
while ((c = getopt(argc, argv, "cpf:e:i:n:t:l:m:h")) != -1) {
|
||||
switch (c) {
|
||||
case 'e':
|
||||
efile = optarg;
|
||||
@ -398,6 +512,14 @@ int main(int argc, char * argv[])
|
||||
pfe_filter_limit = atoi(optarg);
|
||||
std::cerr << "P(f|e) filter limit: " << pfe_filter_limit << std::endl;
|
||||
break;
|
||||
case 't':
|
||||
threads = atoi(optarg);
|
||||
std::cerr << "Using threads: " << threads << std::endl;
|
||||
break;
|
||||
case 'm':
|
||||
max_cache = atoi(optarg);
|
||||
std::cerr << "Using max phrases in caches: " << max_cache << std::endl;
|
||||
break;
|
||||
case 'c':
|
||||
print_cooc_counts = true;
|
||||
break;
|
||||
@ -407,9 +529,6 @@ int main(int argc, char * argv[])
|
||||
case 'h':
|
||||
hierarchical = true;
|
||||
break;
|
||||
case 'm':
|
||||
max_cache = atoi(optarg);
|
||||
break;
|
||||
case 'l':
|
||||
std::cerr << "-l = " << optarg << "\n";
|
||||
if (strcmp(optarg,"a+e") == 0) {
|
||||
@ -429,12 +548,13 @@ int main(int argc, char * argv[])
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (sig_filter_limit == 0.0) pef_filter_only = true;
|
||||
//-----------------------------------------------------------------------------
|
||||
if (optind != argc || ((!efile || !ffile) && !pef_filter_only)) {
|
||||
usage();
|
||||
}
|
||||
|
||||
|
||||
//load the indexed corpus with vocabulary(noVoc=false) and with offset(noOffset=false)
|
||||
if (!pef_filter_only) {
|
||||
e_sa.loadData_forSearch(efile, false, false);
|
||||
@ -460,52 +580,17 @@ int main(int argc, char * argv[])
|
||||
std::cerr << "Filtering using P(e|f) only. n=" << pfe_filter_limit << std::endl;
|
||||
}
|
||||
|
||||
char tmpString[10000];
|
||||
std::string prev = "";
|
||||
std::vector<PTEntry*> options;
|
||||
size_t pt_lines = 0;
|
||||
while(!cin.eof()) {
|
||||
cin.getline(tmpString,10000,'\n');
|
||||
if(++pt_lines%10000==0) {
|
||||
std::cerr << ".";
|
||||
|
||||
prune_cache(esets);
|
||||
prune_cache(fsets);
|
||||
|
||||
if(pt_lines%500000==0)
|
||||
std::cerr << "[n:"<<pt_lines<<"]\n";
|
||||
}
|
||||
Cache::set_max_cache(max_cache);
|
||||
std::ios_base::sync_with_stdio(false);
|
||||
|
||||
boost::thread_group threadGroup;
|
||||
for(int i = 0; i < threads; i++)
|
||||
threadGroup.add_thread(new boost::thread(filter, &std::cin, &std::cout, pfe_index));
|
||||
threadGroup.join_all();
|
||||
|
||||
if(strlen(tmpString)>0) {
|
||||
PTEntry* pp = new PTEntry(tmpString, pfe_index);
|
||||
if (prev != pp->f_phrase) {
|
||||
prev = pp->f_phrase;
|
||||
|
||||
if (!options.empty()) { // always true after first line
|
||||
compute_cooc_stats_and_filter(options);
|
||||
}
|
||||
for (std::vector<PTEntry*>::iterator i=options.begin(); i != options.end(); ++i) {
|
||||
std::cout << **i << std::endl;
|
||||
delete *i;
|
||||
}
|
||||
options.clear();
|
||||
options.push_back(pp);
|
||||
|
||||
} else {
|
||||
options.push_back(pp);
|
||||
}
|
||||
// for(int i=0;i<locations.size(); i++){
|
||||
// cout<<"SentId="<<locations[i].sentIdInCorpus<<" Pos="<<(int)locations[i].posInSentInCorpus<<endl;
|
||||
// }
|
||||
}
|
||||
}
|
||||
compute_cooc_stats_and_filter(options);
|
||||
for (std::vector<PTEntry*>::iterator i=options.begin(); i != options.end(); ++i) {
|
||||
std::cout << **i << std::endl;
|
||||
delete *i;
|
||||
}
|
||||
float pfefper = (100.0*(float)nremoved_pfefilter)/(float)pt_lines;
|
||||
float sigfper = (100.0*(float)nremoved_sigfilter)/(float)pt_lines;
|
||||
|
||||
std::cerr << "\n\n------------------------------------------------------\n"
|
||||
<< " unfiltered phrases pairs: " << pt_lines << "\n"
|
||||
<< "\n"
|
||||
@ -514,7 +599,5 @@ int main(int argc, char * argv[])
|
||||
<< " TOTAL FILTERED: " << (nremoved_pfefilter + nremoved_sigfilter) << " (" << (sigfper + pfefper) << "%)\n"
|
||||
<< "\n"
|
||||
<< " FILTERED phrase pairs: " << (pt_lines - nremoved_pfefilter - nremoved_sigfilter) << " (" << (100.0-sigfper - pfefper) << "%)\n"
|
||||
<< "------------------------------------------------------\n";
|
||||
|
||||
return 0;
|
||||
<< "------------------------------------------------------\n";
|
||||
}
|
||||
|
8
contrib/tmcombine/test/model5/model/lex.counts.e2f
Normal file
8
contrib/tmcombine/test/model5/model/lex.counts.e2f
Normal file
@ -0,0 +1,8 @@
|
||||
ad af 500 1000
|
||||
bd bf 5 10
|
||||
der le 20285 102586
|
||||
der NULL 12926 704917
|
||||
gipfel sommet 3485 7322
|
||||
pass col 419 2911
|
||||
pass passeport 7 28
|
||||
sitzung séance 14 59
|
8
contrib/tmcombine/test/model5/model/lex.counts.f2e
Normal file
8
contrib/tmcombine/test/model5/model/lex.counts.f2e
Normal file
@ -0,0 +1,8 @@
|
||||
af ad 500 1000
|
||||
bf bd 5 10
|
||||
col pass 419 615
|
||||
le der 20285 113635
|
||||
passeport pass 7 615
|
||||
retrouvé NULL 34 1016136
|
||||
séance sitzung 14 33
|
||||
sommet gipfel 3485 5700
|
8
contrib/tmcombine/test/model5/model/lex.e2f
Normal file
8
contrib/tmcombine/test/model5/model/lex.e2f
Normal file
@ -0,0 +1,8 @@
|
||||
ad af 0.5
|
||||
bd bf 0.5
|
||||
der le 0.1977365
|
||||
der NULL 0.0183369
|
||||
gipfel sommet 0.4759629
|
||||
pass col 0.1439368
|
||||
pass passeport 0.2500000
|
||||
sitzung séance 0.2372881
|
8
contrib/tmcombine/test/model5/model/lex.f2e
Normal file
8
contrib/tmcombine/test/model5/model/lex.f2e
Normal file
@ -0,0 +1,8 @@
|
||||
af ad 0.5
|
||||
bf bd 0.5
|
||||
col pass 0.6813008
|
||||
le der 0.1785101
|
||||
passeport pass 0.0113821
|
||||
retrouvé NULL 0.0000335
|
||||
séance sitzung 0.4242424
|
||||
sommet gipfel 0.6114035
|
8
contrib/tmcombine/test/model5/model/phrase-table
Normal file
8
contrib/tmcombine/test/model5/model/phrase-table
Normal file
@ -0,0 +1,8 @@
|
||||
ad [X][X] [X] ||| af [X][X] [X] ||| 0.5 0.5 0.5 0.5 2.718 ||| 0-0 1-1 ||| 1000 1000
|
||||
bd [X] ||| bf [X] ||| 0.5 0.5 0.5 0.5 2.718 ||| 0-0 ||| 10 10
|
||||
der gipfel [X] ||| sommet [X] ||| 0.00327135 0.00872768 0.0366795 0.611403 2.718 ||| 1-0 ||| 5808 518
|
||||
der [X][X] pass [X] ||| le [X][X] col [X] ||| 0.0173565 0.0284616 0.288889 0.121619 2.718 ||| 0-0 1-1 2-2 ||| 749 45
|
||||
pass [X] ||| col [X] ||| 0.1952 0.143937 0.628866 0.681301 2.718 ||| 0-0 ||| 1875 582
|
||||
pass [X] ||| passeport retrouvé [X] ||| 0.5 0.25 0.00171821 3.813e-07 2.718 ||| 0-0 ||| 2 582
|
||||
pass [X] ||| passeport [X] ||| 0.266667 0.25 0.00687285 0.0113821 2.718 ||| 0-0 ||| 15 582
|
||||
[X][X] sitzung [X] ||| [X][X] séance [X] ||| 0.272727 0.237288 0.352941 0.424242 2.718 ||| 0-0 1-1 ||| 22 17
|
8
contrib/tmcombine/test/model6/model/lex.counts.e2f
Normal file
8
contrib/tmcombine/test/model6/model/lex.counts.e2f
Normal file
@ -0,0 +1,8 @@
|
||||
ad af 100 1000
|
||||
bd bf 1 10
|
||||
der le 150181 944391
|
||||
der NULL 54483 3595140
|
||||
gipfel sommet 3421 9342
|
||||
pass col 2 70
|
||||
pass passeport 73 379
|
||||
sitzung séance 3441 5753
|
8
contrib/tmcombine/test/model6/model/lex.counts.f2e
Normal file
8
contrib/tmcombine/test/model6/model/lex.counts.f2e
Normal file
@ -0,0 +1,8 @@
|
||||
af ad 100 1000
|
||||
bf bd 1 10
|
||||
col pass 2 108
|
||||
le der 150181 1356104
|
||||
passeport pass 73 108
|
||||
retrouvé NULL 43 6276240
|
||||
séance sitzung 3441 6142
|
||||
sommet gipfel 3421 4908
|
8
contrib/tmcombine/test/model6/model/lex.e2f
Normal file
8
contrib/tmcombine/test/model6/model/lex.e2f
Normal file
@ -0,0 +1,8 @@
|
||||
ad af 0.1
|
||||
bd bf 0.1
|
||||
der le 0.1590242
|
||||
der NULL 0.0151546
|
||||
gipfel sommet 0.366195
|
||||
pass col 0.0285714
|
||||
pass passeport 0.1926121
|
||||
sitzung séance 0.5981227
|
8
contrib/tmcombine/test/model6/model/lex.f2e
Normal file
8
contrib/tmcombine/test/model6/model/lex.f2e
Normal file
@ -0,0 +1,8 @@
|
||||
af ad 0.1
|
||||
bf bd 0.1
|
||||
col pass 0.0185185
|
||||
le der 0.1107445
|
||||
passeport pass 0.6759259
|
||||
retrouvé NULL 0.0000069
|
||||
séance sitzung 0.5602410
|
||||
sommet gipfel 0.6970253
|
5
contrib/tmcombine/test/model6/model/phrase-table
Normal file
5
contrib/tmcombine/test/model6/model/phrase-table
Normal file
@ -0,0 +1,5 @@
|
||||
ad [X][X] [X] ||| af [X][X] [X] ||| 0.1 0.1 0.1 0.1 2.718 ||| 0-0 1-1 ||| 1000 1000
|
||||
bd [X] ||| bf [X] ||| 0.1 0.1 0.1 0.1 2.718 ||| 0-0 ||| 10 10
|
||||
der [X][X] pass [X] ||| le [X][X] passeport [X] ||| 0.16 0.03063 0.4 0.0748551 2.718 ||| 0-0 1-1 2-2 ||| 25 10
|
||||
pass [X] ||| passeport [X] ||| 0.28022 0.192612 0.607143 0.675926 2.718 ||| 0-0 ||| 182 84
|
||||
[X][X] sitzung [X] ||| [X][X] séance [X] ||| 0.784521 0.598123 0.516654 0.560241 2.718 ||| 0-0 1-1 ||| 4251 6455
|
9
contrib/tmcombine/test/phrase-table_test11
Normal file
9
contrib/tmcombine/test/phrase-table_test11
Normal file
@ -0,0 +1,9 @@
|
||||
ad [X][X] [X] ||| af [X][X] [X] ||| 0.14 0.136364 0.18 0.3 ||| 0-0 1-1 ||| 10000.0 5000.0
|
||||
bd [X] ||| bf [X] ||| 0.14 0.136364 0.18 0.3 ||| 0-0 ||| 100.0 50.0
|
||||
der [X][X] pass [X] ||| le [X][X] passeport [X] ||| 0.16 0.0307772 0.4 0.0128336 ||| 0-0 1-1 2-2 ||| 225.0 40.0
|
||||
der gipfel [X] ||| sommet [X] ||| 0.00327135 0.00569336 0.0366795 0.651018 ||| 1-0 ||| 5808.0 518.0
|
||||
der [X][X] pass [X] ||| le [X][X] col [X] ||| 0.0173565 0.0193836 0.288889 0.0675369 ||| 0-0 1-1 2-2 ||| 749.0 45.0
|
||||
pass [X] ||| col [X] ||| 0.1952 0.121573 0.398693 0.582296 ||| 0-0 ||| 1875.0 918.0
|
||||
pass [X] ||| passeport [X] ||| 0.280097 0.193033 0.22658 0.11065 ||| 0-0 ||| 1653.0 918.0
|
||||
pass [X] ||| passeport retrouvé [X] ||| 0.5 0.193033 0.00108932 1.16835e-06 ||| 0-0 ||| 2.0 918.0
|
||||
[X][X] sitzung [X] ||| [X][X] séance [X] ||| 0.784227 0.597753 0.516546 0.559514 ||| 0-0 1-1 ||| 38281.0 25837.0
|
@ -1176,6 +1176,9 @@ def compute_lexicalweight(weights,alignment,word_pairs,marginal,mode='counts',ca
|
||||
mycache[1] = defaultdict(dict)
|
||||
|
||||
for x,translations in alignment:
|
||||
# skip nonterminals
|
||||
if x.startswith(b'['):
|
||||
continue
|
||||
|
||||
if cache and translations in mycache[1][x]:
|
||||
lex_step = mycache[1][x][translations]
|
||||
@ -1870,7 +1873,12 @@ def test():
|
||||
sys.stderr.write('Regression test 10\n')
|
||||
Combiner = Combine_TMs([[os.path.join('test','model3'),'primary'],[os.path.join('test','model4'),'primary']],output_file=os.path.join('test','phrase-table_test10'),mode='counts',number_of_features=8,i_e2f=4,i_e2f_lex=5,i_f2e=6,i_f2e_lex=7,reference_file='test/extract')
|
||||
Combiner.combine_given_tuning_set()
|
||||
|
||||
|
||||
# count-based combination of two hierarchical models, with fixed weights. Same as test 3, but with hierarchical models
|
||||
# command line: python tmcombine.py combine_given_weights test/model5 test/model6 -w "0.1,0.9;0.1,1;0.2,0.8;0.5,0.5" -o test/phrase-table_test11 -m counts
|
||||
sys.stderr.write('Regression test 11\n')
|
||||
Combiner = Combine_TMs([[os.path.join('test','model5'),'primary'],[os.path.join('test','model6'),'primary']],[[0.1,0.9],[0.1,1],[0.2,0.8],[0.5,0.5]],os.path.join('test','phrase-table_test11'),mode='counts')
|
||||
Combiner.combine_given_weights()
|
||||
|
||||
#convert weight vector passed as a command line argument
|
||||
class to_list(argparse.Action):
|
||||
|
@ -58,7 +58,7 @@ if $(FORCE-STATIC) {
|
||||
|
||||
rule test_library ( name ) {
|
||||
if $(FORCE-STATIC) {
|
||||
return [ test_flags "-l$(name) -static" ] ;
|
||||
return [ test_flags "-Wl,-Bstatic -l$(name) -Wl,-Bdynamic" ] ;
|
||||
} else {
|
||||
return [ test_flags "-l$(name)" ] ;
|
||||
}
|
||||
@ -88,7 +88,7 @@ rule auto-shared ( name : additional * ) {
|
||||
if $(shared-command-line) = "<link>shared" {
|
||||
return "<link>shared" ;
|
||||
} else {
|
||||
if [ test_flags $(additional)" -static -l"$(name) ] {
|
||||
if [ test_flags $(additional)" -Wl,-Bstatic -l"$(name)" -Wl,-Bdynamic" ] {
|
||||
return ;
|
||||
} else {
|
||||
if $(FORCE-STATIC) {
|
||||
@ -131,10 +131,7 @@ if $(with-macports) {
|
||||
|
||||
#Convenience rule for boost libraries. Defines library boost_$(name).
|
||||
rule boost-lib ( name macro : deps * ) {
|
||||
#Link multi-threaded programs against the -mt version if available. Old
|
||||
#versions of boost do not have -mt tagged versions of all libraries. Sadly,
|
||||
#boost.jam does not handle this correctly.
|
||||
flags = $(L-boost-search)" -lboost_"$(name)"-mt$(boost-lib-version)" ;
|
||||
flags = $(L-boost-search)" -lboost_"$(name)"$(boost-lib-version)" ;
|
||||
local main ;
|
||||
if $(name) = "unit_test_framework" {
|
||||
main = "BOOST_AUTO_TEST_CASE(foo) {}" ;
|
||||
@ -143,11 +140,11 @@ rule boost-lib ( name macro : deps * ) {
|
||||
if $(boost-auto-shared) = "<link>shared" {
|
||||
flags += " -DBOOST_$(macro)" ;
|
||||
} else {
|
||||
flags += " -static" ;
|
||||
flags = " -Wl,-Bstatic $(flags) -Wl,-Bdynamic " ;
|
||||
}
|
||||
if [ test_flags $(flags) : $(main) ] {
|
||||
lib inner_boost_$(name) : : <threading>single $(boost-search) <name>boost_$(name)$(boost-lib-version) : <link>static : <library>$(deps) ;
|
||||
lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)-mt$(boost-lib-version) : <link>static : <library>$(deps) ;
|
||||
lib inner_boost_$(name) : : <threading>multi $(boost-search) <name>boost_$(name)$(boost-lib-version) : <link>static : <library>$(deps) ;
|
||||
} else {
|
||||
lib inner_boost_$(name) : : $(boost-search) <name>boost_$(name)$(boost-lib-version) : : <library>$(deps) ;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ update-if-changed $(ORDER-LOG) $(max-order) ;
|
||||
max-order += <dependency>$(ORDER-LOG) ;
|
||||
|
||||
wrappers = ;
|
||||
local with-nplm = [ option.get "with-nplm" ] ;
|
||||
local with-nplm = [ option.get "with-nplm-0.1" ] ;
|
||||
if $(with-nplm) {
|
||||
lib neuralLM : : <search>$(with-nplm)/src ;
|
||||
obj nplm.o : wrappers/nplm.cc : <include>.. <include>$(with-nplm)/src <cxxflags>-fopenmp ;
|
||||
|
@ -29,28 +29,44 @@ class StatCollector {
|
||||
|
||||
~StatCollector() {}
|
||||
|
||||
void CalculateDiscounts() {
|
||||
void CalculateDiscounts(const DiscountConfig &config) {
|
||||
counts_.resize(orders_.size());
|
||||
counts_pruned_.resize(orders_.size());
|
||||
discounts_.resize(orders_.size());
|
||||
for (std::size_t i = 0; i < orders_.size(); ++i) {
|
||||
const OrderStat &s = orders_[i];
|
||||
counts_[i] = s.count;
|
||||
counts_pruned_[i] = s.count_pruned;
|
||||
}
|
||||
|
||||
for (unsigned j = 1; j < 4; ++j) {
|
||||
// TODO: Specialize error message for j == 3, meaning 3+
|
||||
UTIL_THROW_IF(s.n[j] == 0, BadDiscountException, "Could not calculate Kneser-Ney discounts for "
|
||||
<< (i+1) << "-grams with adjusted count " << (j+1) << " because we didn't observe any "
|
||||
<< (i+1) << "-grams with adjusted count " << j << "; Is this small or artificial data?");
|
||||
}
|
||||
discounts_ = config.overwrite;
|
||||
discounts_.resize(orders_.size());
|
||||
for (std::size_t i = config.overwrite.size(); i < orders_.size(); ++i) {
|
||||
const OrderStat &s = orders_[i];
|
||||
try {
|
||||
for (unsigned j = 1; j < 4; ++j) {
|
||||
// TODO: Specialize error message for j == 3, meaning 3+
|
||||
UTIL_THROW_IF(s.n[j] == 0, BadDiscountException, "Could not calculate Kneser-Ney discounts for "
|
||||
<< (i+1) << "-grams with adjusted count " << (j+1) << " because we didn't observe any "
|
||||
<< (i+1) << "-grams with adjusted count " << j << "; Is this small or artificial data?");
|
||||
}
|
||||
|
||||
// See equation (26) in Chen and Goodman.
|
||||
discounts_[i].amount[0] = 0.0;
|
||||
float y = static_cast<float>(s.n[1]) / static_cast<float>(s.n[1] + 2.0 * s.n[2]);
|
||||
for (unsigned j = 1; j < 4; ++j) {
|
||||
discounts_[i].amount[j] = static_cast<float>(j) - static_cast<float>(j + 1) * y * static_cast<float>(s.n[j+1]) / static_cast<float>(s.n[j]);
|
||||
UTIL_THROW_IF(discounts_[i].amount[j] < 0.0 || discounts_[i].amount[j] > j, BadDiscountException, "ERROR: " << (i+1) << "-gram discount out of range for adjusted count " << j << ": " << discounts_[i].amount[j]);
|
||||
// See equation (26) in Chen and Goodman.
|
||||
discounts_[i].amount[0] = 0.0;
|
||||
float y = static_cast<float>(s.n[1]) / static_cast<float>(s.n[1] + 2.0 * s.n[2]);
|
||||
for (unsigned j = 1; j < 4; ++j) {
|
||||
discounts_[i].amount[j] = static_cast<float>(j) - static_cast<float>(j + 1) * y * static_cast<float>(s.n[j+1]) / static_cast<float>(s.n[j]);
|
||||
UTIL_THROW_IF(discounts_[i].amount[j] < 0.0 || discounts_[i].amount[j] > j, BadDiscountException, "ERROR: " << (i+1) << "-gram discount out of range for adjusted count " << j << ": " << discounts_[i].amount[j]);
|
||||
}
|
||||
} catch (const BadDiscountException &e) {
|
||||
switch (config.bad_action) {
|
||||
case THROW_UP:
|
||||
throw;
|
||||
case COMPLAIN:
|
||||
std::cerr << e.what() << " Substituting fallback discounts D1=" << config.fallback.amount[1] << " D2=" << config.fallback.amount[2] << " D3+=" << config.fallback.amount[3] << std::endl;
|
||||
case SILENT:
|
||||
break;
|
||||
}
|
||||
discounts_[i] = config.fallback;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -179,7 +195,7 @@ void AdjustCounts::Run(const util::stream::ChainPositions &positions) {
|
||||
for (NGramStream full(positions[0]); full; ++full)
|
||||
stats.AddFull(full->Count());
|
||||
|
||||
stats.CalculateDiscounts();
|
||||
stats.CalculateDiscounts(discount_config_);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -262,7 +278,7 @@ void AdjustCounts::Run(const util::stream::ChainPositions &positions) {
|
||||
for (NGramStream *s = streams.begin(); s != streams.end(); ++s)
|
||||
s->Poison();
|
||||
|
||||
stats.CalculateDiscounts();
|
||||
stats.CalculateDiscounts(discount_config_);
|
||||
|
||||
// NOTE: See special early-return case for unigrams near the top of this function
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define LM_BUILDER_ADJUST_COUNTS_H
|
||||
|
||||
#include "lm/builder/discount.hh"
|
||||
#include "lm/lm_exception.hh"
|
||||
#include "util/exception.hh"
|
||||
|
||||
#include <vector>
|
||||
@ -19,6 +20,16 @@ class BadDiscountException : public util::Exception {
|
||||
~BadDiscountException() throw();
|
||||
};
|
||||
|
||||
struct DiscountConfig {
|
||||
// Overrides discounts for orders [1,discount_override.size()].
|
||||
std::vector<Discount> overwrite;
|
||||
// If discounting fails for an order, copy them from here.
|
||||
Discount fallback;
|
||||
// What to do when discounts are out of range or would trigger divison by
|
||||
// zero. It it does something other than THROW_UP, use fallback_discount.
|
||||
WarningAction bad_action;
|
||||
};
|
||||
|
||||
/* Compute adjusted counts.
|
||||
* Input: unique suffix sorted N-grams (and just the N-grams) with raw counts.
|
||||
* Output: [1,N]-grams with adjusted counts.
|
||||
@ -27,17 +38,28 @@ class BadDiscountException : public util::Exception {
|
||||
*/
|
||||
class AdjustCounts {
|
||||
public:
|
||||
AdjustCounts(std::vector<uint64_t> &counts, std::vector<uint64_t> &counts_pruned, std::vector<Discount> &discounts, std::vector<uint64_t> &prune_thresholds)
|
||||
: counts_(counts), counts_pruned_(counts_pruned), discounts_(discounts), prune_thresholds_(prune_thresholds)
|
||||
// counts: output
|
||||
// counts_pruned: output
|
||||
// discounts: mostly output. If the input already has entries, they will be kept.
|
||||
// prune_thresholds: input. n-grams with normal (not adjusted) count below this will be pruned.
|
||||
AdjustCounts(
|
||||
const std::vector<uint64_t> &prune_thresholds,
|
||||
std::vector<uint64_t> &counts,
|
||||
std::vector<uint64_t> &counts_pruned,
|
||||
const DiscountConfig &discount_config,
|
||||
std::vector<Discount> &discounts)
|
||||
: prune_thresholds_(prune_thresholds), counts_(counts), counts_pruned_(counts_pruned), discount_config_(discount_config), discounts_(discounts)
|
||||
{}
|
||||
|
||||
void Run(const util::stream::ChainPositions &positions);
|
||||
|
||||
private:
|
||||
const std::vector<uint64_t> &prune_thresholds_;
|
||||
std::vector<uint64_t> &counts_;
|
||||
std::vector<uint64_t> &counts_pruned_;
|
||||
|
||||
DiscountConfig discount_config_;
|
||||
std::vector<Discount> &discounts_;
|
||||
std::vector<uint64_t> &prune_thresholds_;
|
||||
};
|
||||
|
||||
} // namespace builder
|
||||
|
@ -75,7 +75,10 @@ BOOST_AUTO_TEST_CASE(Simple) {
|
||||
chains >> util::stream::kRecycle;
|
||||
std::vector<uint64_t> counts_pruned(4);
|
||||
std::vector<uint64_t> prune_thresholds(4);
|
||||
BOOST_CHECK_THROW(AdjustCounts(counts, counts_pruned, discount, prune_thresholds).Run(for_adjust), BadDiscountException);
|
||||
DiscountConfig discount_config;
|
||||
discount_config.fallback = Discount();
|
||||
discount_config.bad_action = THROW_UP;
|
||||
BOOST_CHECK_THROW(AdjustCounts(prune_thresholds, counts, counts_pruned, discount_config, discount).Run(for_adjust), BadDiscountException);
|
||||
}
|
||||
BOOST_REQUIRE_EQUAL(4UL, counts.size());
|
||||
BOOST_CHECK_EQUAL(4UL, counts[0]);
|
||||
|
@ -69,9 +69,12 @@ class PruneNGramStream {
|
||||
block_->SetValidSize(dest_.Base() - block_base);
|
||||
++block_;
|
||||
StartBlock();
|
||||
if (block_) {
|
||||
currentCount_ = current_.CutoffCount();
|
||||
}
|
||||
} else {
|
||||
currentCount_ = current_.CutoffCount();
|
||||
}
|
||||
|
||||
currentCount_ = current_.CutoffCount();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -9,14 +9,66 @@
|
||||
#include "util/murmur_hash.hh"
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace lm { namespace builder {
|
||||
namespace {
|
||||
|
||||
class Callback {
|
||||
/* Calculate q, the collapsed probability and backoff, as defined in
|
||||
* @inproceedings{Heafield-rest,
|
||||
* author = {Kenneth Heafield and Philipp Koehn and Alon Lavie},
|
||||
* title = {Language Model Rest Costs and Space-Efficient Storage},
|
||||
* year = {2012},
|
||||
* month = {July},
|
||||
* booktitle = {Proceedings of the Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning},
|
||||
* address = {Jeju Island, Korea},
|
||||
* pages = {1169--1178},
|
||||
* url = {http://kheafield.com/professional/edinburgh/rest\_paper.pdf},
|
||||
* }
|
||||
* This is particularly convenient to calculate during interpolation because
|
||||
* the needed backoff terms are already accessed at the same time.
|
||||
*/
|
||||
class OutputQ {
|
||||
public:
|
||||
explicit OutputQ(std::size_t order) : q_delta_(order) {}
|
||||
|
||||
void Gram(unsigned order_minus_1, float full_backoff, ProbBackoff &out) {
|
||||
float &q_del = q_delta_[order_minus_1];
|
||||
if (order_minus_1) {
|
||||
// Divide by context's backoff (which comes in as out.backoff)
|
||||
q_del = q_delta_[order_minus_1 - 1] / out.backoff * full_backoff;
|
||||
} else {
|
||||
q_del = full_backoff;
|
||||
}
|
||||
out.prob = log10f(out.prob * q_del);
|
||||
// TODO: stop wastefully outputting this!
|
||||
out.backoff = 0.0;
|
||||
}
|
||||
|
||||
private:
|
||||
// Product of backoffs in the numerator divided by backoffs in the
|
||||
// denominator. Does not include
|
||||
std::vector<float> q_delta_;
|
||||
};
|
||||
|
||||
/* Default: output probability and backoff */
|
||||
class OutputProbBackoff {
|
||||
public:
|
||||
explicit OutputProbBackoff(std::size_t /*order*/) {}
|
||||
|
||||
void Gram(unsigned /*order_minus_1*/, float full_backoff, ProbBackoff &out) const {
|
||||
// Correcting for numerical precision issues. Take that IRST.
|
||||
out.prob = std::min(0.0f, log10f(out.prob));
|
||||
out.backoff = log10f(full_backoff);
|
||||
}
|
||||
};
|
||||
|
||||
template <class Output> class Callback {
|
||||
public:
|
||||
Callback(float uniform_prob, const util::stream::ChainPositions &backoffs, const std::vector<uint64_t> &prune_thresholds)
|
||||
: backoffs_(backoffs.size()), probs_(backoffs.size() + 2), prune_thresholds_(prune_thresholds) {
|
||||
: backoffs_(backoffs.size()), probs_(backoffs.size() + 2),
|
||||
prune_thresholds_(prune_thresholds),
|
||||
output_(backoffs.size() + 1 /* order */) {
|
||||
probs_[0] = uniform_prob;
|
||||
for (std::size_t i = 0; i < backoffs.size(); ++i) {
|
||||
backoffs_.push_back(backoffs[i]);
|
||||
@ -40,15 +92,9 @@ class Callback {
|
||||
Payload &pay = gram.Value();
|
||||
pay.complete.prob = pay.uninterp.prob + pay.uninterp.gamma * probs_[order_minus_1];
|
||||
probs_[order_minus_1 + 1] = pay.complete.prob;
|
||||
pay.complete.prob = log10(pay.complete.prob);
|
||||
|
||||
if (order_minus_1 < backoffs_.size() && *(gram.end() - 1) != kUNK && *(gram.end() - 1) != kEOS) {
|
||||
// This skips over ngrams if backoffs have been exhausted.
|
||||
if(!backoffs_[order_minus_1]) {
|
||||
pay.complete.backoff = 0.0;
|
||||
return;
|
||||
}
|
||||
|
||||
float out_backoff;
|
||||
if (order_minus_1 < backoffs_.size() && *(gram.end() - 1) != kUNK && *(gram.end() - 1) != kEOS) {
|
||||
if(prune_thresholds_[order_minus_1 + 1] > 0) {
|
||||
//Compute hash value for current context
|
||||
uint64_t current_hash = util::MurmurHashNative(gram.begin(), gram.Order() * sizeof(WordIndex));
|
||||
@ -58,20 +104,22 @@ class Callback {
|
||||
hashed_backoff = static_cast<const HashGamma*>(backoffs_[order_minus_1].Get());
|
||||
|
||||
if(current_hash == hashed_backoff->hash_value) {
|
||||
pay.complete.backoff = log10(hashed_backoff->gamma);
|
||||
out_backoff = hashed_backoff->gamma;
|
||||
++backoffs_[order_minus_1];
|
||||
} else {
|
||||
// Has been pruned away so it is not a context anymore
|
||||
pay.complete.backoff = 0.0;
|
||||
out_backoff = 1.0;
|
||||
}
|
||||
} else {
|
||||
pay.complete.backoff = log10(*static_cast<const float*>(backoffs_[order_minus_1].Get()));
|
||||
out_backoff = *static_cast<const float*>(backoffs_[order_minus_1].Get());
|
||||
++backoffs_[order_minus_1];
|
||||
}
|
||||
} else {
|
||||
// Not a context.
|
||||
pay.complete.backoff = 0.0;
|
||||
out_backoff = 1.0;
|
||||
}
|
||||
|
||||
output_.Gram(order_minus_1, out_backoff, pay.complete);
|
||||
}
|
||||
|
||||
void Exit(unsigned, const NGram &) const {}
|
||||
@ -81,19 +129,29 @@ class Callback {
|
||||
|
||||
std::vector<float> probs_;
|
||||
const std::vector<uint64_t>& prune_thresholds_;
|
||||
|
||||
Output output_;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
Interpolate::Interpolate(uint64_t vocab_size, const util::stream::ChainPositions &backoffs, const std::vector<uint64_t>& prune_thresholds)
|
||||
Interpolate::Interpolate(uint64_t vocab_size, const util::stream::ChainPositions &backoffs, const std::vector<uint64_t>& prune_thresholds, bool output_q)
|
||||
: uniform_prob_(1.0 / static_cast<float>(vocab_size)), // Includes <unk> but excludes <s>.
|
||||
backoffs_(backoffs),
|
||||
prune_thresholds_(prune_thresholds) {}
|
||||
prune_thresholds_(prune_thresholds),
|
||||
output_q_(output_q) {}
|
||||
|
||||
// perform order-wise interpolation
|
||||
void Interpolate::Run(const util::stream::ChainPositions &positions) {
|
||||
assert(positions.size() == backoffs_.size() + 1);
|
||||
Callback callback(uniform_prob_, backoffs_, prune_thresholds_);
|
||||
JointOrder<Callback, SuffixOrder>(positions, callback);
|
||||
if (output_q_) {
|
||||
typedef Callback<OutputQ> C;
|
||||
C callback(uniform_prob_, backoffs_, prune_thresholds_);
|
||||
JointOrder<C, SuffixOrder>(positions, callback);
|
||||
} else {
|
||||
typedef Callback<OutputProbBackoff> C;
|
||||
C callback(uniform_prob_, backoffs_, prune_thresholds_);
|
||||
JointOrder<C, SuffixOrder>(positions, callback);
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespaces
|
||||
|
@ -18,7 +18,7 @@ class Interpolate {
|
||||
public:
|
||||
// Normally vocab_size is the unigram count-1 (since p(<s>) = 0) but might
|
||||
// be larger when the user specifies a consistent vocabulary size.
|
||||
explicit Interpolate(uint64_t vocab_size, const util::stream::ChainPositions &backoffs, const std::vector<uint64_t> &prune_thresholds);
|
||||
explicit Interpolate(uint64_t vocab_size, const util::stream::ChainPositions &backoffs, const std::vector<uint64_t> &prune_thresholds, bool output_q_);
|
||||
|
||||
void Run(const util::stream::ChainPositions &positions);
|
||||
|
||||
@ -26,6 +26,7 @@ class Interpolate {
|
||||
float uniform_prob_;
|
||||
util::stream::ChainPositions backoffs_;
|
||||
const std::vector<uint64_t> prune_thresholds_;
|
||||
bool output_q_;
|
||||
};
|
||||
|
||||
}} // namespaces
|
||||
|
@ -33,7 +33,6 @@ std::vector<uint64_t> ParsePruning(const std::vector<std::string> ¶m, std::s
|
||||
// convert to vector of integers
|
||||
std::vector<uint64_t> prune_thresholds;
|
||||
prune_thresholds.reserve(order);
|
||||
std::cerr << "Pruning ";
|
||||
for (std::vector<std::string>::const_iterator it(param.begin()); it != param.end(); ++it) {
|
||||
try {
|
||||
prune_thresholds.push_back(boost::lexical_cast<uint64_t>(*it));
|
||||
@ -66,6 +65,18 @@ std::vector<uint64_t> ParsePruning(const std::vector<std::string> ¶m, std::s
|
||||
return prune_thresholds;
|
||||
}
|
||||
|
||||
lm::builder::Discount ParseDiscountFallback(const std::vector<std::string> ¶m) {
|
||||
lm::builder::Discount ret;
|
||||
UTIL_THROW_IF(param.size() > 3, util::Exception, "Specify at most three fallback discounts: 1, 2, and 3+");
|
||||
UTIL_THROW_IF(param.empty(), util::Exception, "Fallback discounting enabled, but no discount specified");
|
||||
ret.amount[0] = 0.0;
|
||||
for (unsigned i = 0; i < 3; ++i) {
|
||||
float discount = boost::lexical_cast<float>(param[i < param.size() ? i : (param.size() - 1)]);
|
||||
UTIL_THROW_IF(discount < 0.0 || discount > static_cast<float>(i+1), util::Exception, "The discount for count " << (i+1) << " was parsed as " << discount << " which is not in the range [0, " << (i+1) << "].");
|
||||
ret.amount[i + 1] = discount;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@ -77,7 +88,11 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
std::string text, arpa;
|
||||
std::vector<std::string> pruning;
|
||||
|
||||
std::vector<std::string> discount_fallback;
|
||||
std::vector<std::string> discount_fallback_default;
|
||||
discount_fallback_default.push_back("0.5");
|
||||
discount_fallback_default.push_back("1");
|
||||
discount_fallback_default.push_back("1.5");
|
||||
|
||||
options.add_options()
|
||||
("help,h", po::bool_switch(), "Show this help message")
|
||||
@ -86,7 +101,7 @@ int main(int argc, char *argv[]) {
|
||||
->required()
|
||||
#endif
|
||||
, "Order of the model")
|
||||
("interpolate_unigrams", po::bool_switch(&pipeline.initial_probs.interpolate_unigrams), "Interpolate the unigrams (default: emulate SRILM by not interpolating)")
|
||||
("interpolate_unigrams", po::value<bool>(&pipeline.initial_probs.interpolate_unigrams)->default_value(true)->implicit_value(true), "Interpolate the unigrams (default) as opposed to giving lots of mass to <unk> like SRI. If you want SRI's behavior with a large <unk> and the old lmplz default, use --interpolate_unigrams 0.")
|
||||
("skip_symbols", po::bool_switch(), "Treat <s>, </s>, and <unk> as whitespace instead of throwing an exception")
|
||||
("temp_prefix,T", po::value<std::string>(&pipeline.sort.temp_prefix)->default_value("/tmp/lm"), "Temporary file prefix")
|
||||
("memory,S", SizeOption(pipeline.sort.total_memory, util::GuessPhysicalMemory() ? "80%" : "1G"), "Sorting memory")
|
||||
@ -99,7 +114,9 @@ int main(int argc, char *argv[]) {
|
||||
("verbose_header", po::bool_switch(&pipeline.verbose_header), "Add a verbose header to the ARPA file that includes information such as token count, smoothing type, etc.")
|
||||
("text", po::value<std::string>(&text), "Read text from a file instead of stdin")
|
||||
("arpa", po::value<std::string>(&arpa), "Write ARPA to a file instead of stdout")
|
||||
("prune", po::value<std::vector<std::string> >(&pruning)->multitoken(), "Prune n-grams with count less than or equal to the given threshold. Specify one value for each order i.e. 0 0 1 to prune singleton trigrams and above. The sequence of values must be non-decreasing and the last value applies to any remaining orders. Unigram pruning is not implemented, so the first value must be zero. Default is to not prune, which is equivalent to --prune 0.");
|
||||
("collapse_values", po::bool_switch(&pipeline.output_q), "Collapse probability and backoff into a single value, q that yields the same sentence-level probabilities. See http://kheafield.com/professional/edinburgh/rest_paper.pdf for more details, including a proof.")
|
||||
("prune", po::value<std::vector<std::string> >(&pruning)->multitoken(), "Prune n-grams with count less than or equal to the given threshold. Specify one value for each order i.e. 0 0 1 to prune singleton trigrams and above. The sequence of values must be non-decreasing and the last value applies to any remaining orders. Unigram pruning is not implemented, so the first value must be zero. Default is to not prune, which is equivalent to --prune 0.")
|
||||
("discount_fallback", po::value<std::vector<std::string> >(&discount_fallback)->multitoken()->implicit_value(discount_fallback_default, "0.5 1 1.5"), "The closed-form estimate for Kneser-Ney discounts does not work without singletons or doubletons. It can also fail if these values are out of range. This option falls back to user-specified discounts when the closed-form estimate fails. Note that this option is generally a bad idea: you should deduplicate your corpus instead. However, class-based models need custom discounts because they lack singleton unigrams. Provide up to three discounts (for adjusted counts 1, 2, and 3+), which will be applied to all orders where the closed-form estimates fail.");
|
||||
po::variables_map vm;
|
||||
po::store(po::parse_command_line(argc, argv, options), vm);
|
||||
|
||||
@ -143,7 +160,7 @@ int main(int argc, char *argv[]) {
|
||||
#endif
|
||||
|
||||
if (pipeline.vocab_size_for_unk && !pipeline.initial_probs.interpolate_unigrams) {
|
||||
std::cerr << "--vocab_pad requires --interpolate_unigrams" << std::endl;
|
||||
std::cerr << "--vocab_pad requires --interpolate_unigrams be on" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -153,6 +170,15 @@ int main(int argc, char *argv[]) {
|
||||
pipeline.disallowed_symbol_action = lm::THROW_UP;
|
||||
}
|
||||
|
||||
if (vm.count("discount_fallback")) {
|
||||
pipeline.discount.fallback = ParseDiscountFallback(discount_fallback);
|
||||
pipeline.discount.bad_action = lm::COMPLAIN;
|
||||
} else {
|
||||
// Unused, just here to prevent the compiler from complaining about uninitialized.
|
||||
pipeline.discount.fallback = lm::builder::Discount();
|
||||
pipeline.discount.bad_action = lm::THROW_UP;
|
||||
}
|
||||
|
||||
// parse pruning thresholds. These depend on order, so it is not done as a notifier.
|
||||
pipeline.prune_thresholds = ParsePruning(pruning, pipeline.order);
|
||||
|
||||
|
@ -280,7 +280,7 @@ void InterpolateProbabilities(const std::vector<uint64_t> &counts, Master &maste
|
||||
gamma_chains.push_back(read_backoffs);
|
||||
gamma_chains.back() >> gammas[i].Source();
|
||||
}
|
||||
master >> Interpolate(std::max(master.Config().vocab_size_for_unk, counts[0] - 1 /* <s> is not included */), util::stream::ChainPositions(gamma_chains), config.prune_thresholds);
|
||||
master >> Interpolate(std::max(master.Config().vocab_size_for_unk, counts[0] - 1 /* <s> is not included */), util::stream::ChainPositions(gamma_chains), config.prune_thresholds, config.output_q);
|
||||
gamma_chains >> util::stream::kRecycle;
|
||||
master.BufferFinal(counts);
|
||||
}
|
||||
@ -317,7 +317,7 @@ void Pipeline(PipelineConfig config, int text_file, int out_arpa) {
|
||||
std::vector<uint64_t> counts;
|
||||
std::vector<uint64_t> counts_pruned;
|
||||
std::vector<Discount> discounts;
|
||||
master >> AdjustCounts(counts, counts_pruned, discounts, config.prune_thresholds);
|
||||
master >> AdjustCounts(config.prune_thresholds, counts, counts_pruned, config.discount, discounts);
|
||||
|
||||
{
|
||||
util::FixedArray<util::stream::FileBuffer> gammas;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef LM_BUILDER_PIPELINE_H
|
||||
#define LM_BUILDER_PIPELINE_H
|
||||
|
||||
#include "lm/builder/adjust_counts.hh"
|
||||
#include "lm/builder/initial_probabilities.hh"
|
||||
#include "lm/builder/header_info.hh"
|
||||
#include "lm/lm_exception.hh"
|
||||
@ -19,6 +20,8 @@ struct PipelineConfig {
|
||||
util::stream::SortConfig sort;
|
||||
InitialProbabilitiesConfig initial_probs;
|
||||
util::stream::ChainConfig read_backoffs;
|
||||
|
||||
// Include a header in the ARPA with some statistics?
|
||||
bool verbose_header;
|
||||
|
||||
// Estimated vocabulary size. Used for sizing CorpusCount memory and
|
||||
@ -34,6 +37,12 @@ struct PipelineConfig {
|
||||
// n-gram count thresholds for pruning. 0 values means no pruning for
|
||||
// corresponding n-gram order
|
||||
std::vector<uint64_t> prune_thresholds; //mjd
|
||||
|
||||
// What to do with discount failures.
|
||||
DiscountConfig discount;
|
||||
|
||||
// Compute collapsed q values instead of probability and backoff
|
||||
bool output_q;
|
||||
|
||||
/* Computing the perplexity of LMs with different vocabularies is hard. For
|
||||
* example, the lowest perplexity is attained by a unigram model that
|
||||
|
@ -50,7 +50,7 @@ void PrintARPA::Run(const util::stream::ChainPositions &positions) {
|
||||
out << "\\" << order << "-grams:" << '\n';
|
||||
for (NGramStream stream(positions[order - 1]); stream; ++stream) {
|
||||
// Correcting for numerical precision issues. Take that IRST.
|
||||
out << std::min(0.0f, stream->Value().complete.prob) << '\t' << vocab_.Lookup(*stream->begin());
|
||||
out << stream->Value().complete.prob << '\t' << vocab_.Lookup(*stream->begin());
|
||||
for (const WordIndex *i = stream->begin() + 1; i != stream->end(); ++i) {
|
||||
out << ' ' << vocab_.Lookup(*i);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ void BleuScorer::prepareStats(size_t sid, const string& text, ScoreStats& entry)
|
||||
entry.set(stats);
|
||||
}
|
||||
|
||||
statscore_t BleuScorer::calculateScore(const vector<int>& comps) const
|
||||
statscore_t BleuScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
UTIL_THROW_IF(comps.size() != kBleuNgramOrder * 2 + 1, util::Exception, "Error");
|
||||
|
||||
@ -289,23 +289,6 @@ float sentenceLevelBackgroundBleu(const std::vector<float>& sent, const std::vec
|
||||
return exp(logbleu) * stats[kBleuNgramOrder*2];
|
||||
}
|
||||
|
||||
float unsmoothedBleu(const std::vector<float>& stats)
|
||||
{
|
||||
UTIL_THROW_IF(stats.size() != kBleuNgramOrder * 2 + 1, util::Exception, "Error");
|
||||
|
||||
float logbleu = 0.0;
|
||||
for (int j = 0; j < kBleuNgramOrder; j++) {
|
||||
logbleu += log(stats[2 * j]) - log(stats[2 * j + 1]);
|
||||
}
|
||||
logbleu /= kBleuNgramOrder;
|
||||
const float brevity = 1.0 - stats[(kBleuNgramOrder * 2)] / stats[1];
|
||||
|
||||
if (brevity < 0.0) {
|
||||
logbleu += brevity;
|
||||
}
|
||||
return exp(logbleu);
|
||||
}
|
||||
|
||||
vector<float> BleuScorer::ScoreNbestList(const string& scoreFile, const string& featureFile)
|
||||
{
|
||||
vector<string> scoreFiles;
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
|
||||
virtual void setReferenceFiles(const std::vector<std::string>& referenceFiles);
|
||||
virtual void prepareStats(std::size_t sid, const std::string& text, ScoreStats& entry);
|
||||
virtual statscore_t calculateScore(const std::vector<int>& comps) const;
|
||||
virtual statscore_t calculateScore(const std::vector<ScoreStatsType>& comps) const;
|
||||
virtual std::size_t NumberOfScores() const {
|
||||
return 2 * kBleuNgramOrder + 1;
|
||||
}
|
||||
@ -55,6 +55,10 @@ public:
|
||||
return m_references.get();
|
||||
}
|
||||
|
||||
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const {
|
||||
return totals[kBleuNgramOrder*2];
|
||||
}
|
||||
|
||||
/**
|
||||
* Count the ngrams of each type, up to the given length in the input line.
|
||||
*/
|
||||
@ -93,11 +97,6 @@ float smoothedSentenceBleu
|
||||
*/
|
||||
float sentenceLevelBackgroundBleu(const std::vector<float>& sent, const std::vector<float>& bg);
|
||||
|
||||
/**
|
||||
* Computes plain old BLEU from a vector of stats
|
||||
*/
|
||||
float unsmoothedBleu(const std::vector<float>& stats);
|
||||
|
||||
}
|
||||
|
||||
#endif // MERT_BLEU_SCORER_H_
|
||||
|
@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE(bleu_clipped_counts)
|
||||
BOOST_AUTO_TEST_CASE(calculate_actual_score)
|
||||
{
|
||||
BOOST_REQUIRE(4 == kBleuNgramOrder);
|
||||
std::vector<int> stats(2 * kBleuNgramOrder + 1);
|
||||
std::vector<ScoreStatsType> stats(2 * kBleuNgramOrder + 1);
|
||||
BleuScorer scorer;
|
||||
|
||||
// unigram
|
||||
|
@ -52,18 +52,18 @@ void CderScorer::prepareStats(size_t sid, const string& text, ScoreStats& entry)
|
||||
{
|
||||
string sentence = this->preprocessSentence(text);
|
||||
|
||||
vector<int> stats;
|
||||
vector<ScoreStatsType> stats;
|
||||
prepareStatsVector(sid, sentence, stats);
|
||||
entry.set(stats);
|
||||
}
|
||||
|
||||
void CderScorer::prepareStatsVector(size_t sid, const string& text, vector<int>& stats)
|
||||
void CderScorer::prepareStatsVector(size_t sid, const string& text, vector<ScoreStatsType>& stats)
|
||||
{
|
||||
sent_t cand;
|
||||
TokenizeAndEncode(text, cand);
|
||||
|
||||
float max = -2;
|
||||
vector<int> tmp;
|
||||
vector<ScoreStatsType> tmp;
|
||||
for (size_t rid = 0; rid < m_ref_sentences.size(); ++rid) {
|
||||
const sent_t& ref = m_ref_sentences[rid][sid];
|
||||
tmp.clear();
|
||||
@ -79,7 +79,7 @@ void CderScorer::prepareStatsVector(size_t sid, const string& text, vector<int>&
|
||||
}
|
||||
}
|
||||
|
||||
float CderScorer::calculateScore(const vector<int>& comps) const
|
||||
float CderScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
if (comps.size() != 2) {
|
||||
throw runtime_error("Size of stat vector for CDER is not 2");
|
||||
@ -89,7 +89,7 @@ float CderScorer::calculateScore(const vector<int>& comps) const
|
||||
}
|
||||
|
||||
void CderScorer::computeCD(const sent_t& cand, const sent_t& ref,
|
||||
vector<int>& stats) const
|
||||
vector<ScoreStatsType>& stats) const
|
||||
{
|
||||
int I = cand.size() + 1; // Number of inter-words positions in candidate sentence
|
||||
int L = ref.size() + 1; // Number of inter-words positions in reference sentence
|
||||
|
@ -23,13 +23,13 @@ public:
|
||||
|
||||
virtual void prepareStats(std::size_t sid, const std::string& text, ScoreStats& entry);
|
||||
|
||||
virtual void prepareStatsVector(std::size_t sid, const std::string& text, std::vector<int>& stats);
|
||||
virtual void prepareStatsVector(std::size_t sid, const std::string& text, std::vector<ScoreStatsType>& stats);
|
||||
|
||||
virtual std::size_t NumberOfScores() const {
|
||||
return 2;
|
||||
}
|
||||
|
||||
virtual float calculateScore(const std::vector<int>& comps) const;
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
|
||||
|
||||
private:
|
||||
bool m_allowed_long_jumps;
|
||||
@ -38,7 +38,7 @@ private:
|
||||
std::vector<std::vector<sent_t> > m_ref_sentences;
|
||||
|
||||
void computeCD(const sent_t& cand, const sent_t& ref,
|
||||
std::vector<int>& stats) const;
|
||||
std::vector<ScoreStatsType>& stats) const;
|
||||
|
||||
// no copying allowed
|
||||
CderScorer(const CderScorer&);
|
||||
|
@ -135,7 +135,7 @@ void Data::load(const std::string &featfile, const std::string &scorefile)
|
||||
m_score_data->load(scorefile);
|
||||
}
|
||||
|
||||
void Data::loadNBest(const string &file)
|
||||
void Data::loadNBest(const string &file, bool oneBest)
|
||||
{
|
||||
TRACE_ERR("loading nbest from " << file << endl);
|
||||
util::FilePiece in(file.c_str());
|
||||
@ -154,6 +154,7 @@ void Data::loadNBest(const string &file)
|
||||
util::TokenIter<util::MultiCharacter> it(line, util::MultiCharacter("|||"));
|
||||
|
||||
sentence_index = ParseInt(*it);
|
||||
if (oneBest && m_score_data->exists(sentence_index)) continue;
|
||||
++it;
|
||||
sentence = it->as_string();
|
||||
++it;
|
||||
@ -164,10 +165,9 @@ void Data::loadNBest(const string &file)
|
||||
++it; // skip model score.
|
||||
|
||||
if (it) {
|
||||
++it;
|
||||
alignment = it->as_string(); //fifth field (if present) is either phrase or word alignment
|
||||
++it;
|
||||
if (it) {
|
||||
++it;
|
||||
alignment = it->as_string(); //sixth field (if present) is word alignment
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
m_feature_data->Features(f);
|
||||
}
|
||||
|
||||
void loadNBest(const std::string &file);
|
||||
void loadNBest(const std::string &file, bool oneBest=false);
|
||||
|
||||
void load(const std::string &featfile, const std::string &scorefile);
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "FeatureArray.h"
|
||||
|
||||
namespace MosesTuning
|
||||
@ -103,7 +104,7 @@ public:
|
||||
inline int getName(std::size_t idx) const {
|
||||
idx2name::const_iterator i = m_index_to_array_name.find(idx);
|
||||
if (i != m_index_to_array_name.end())
|
||||
throw std::runtime_error("there is no entry at index " + idx);
|
||||
throw std::runtime_error("there is no entry at index " + boost::lexical_cast<std::string>(idx));
|
||||
return i->second;
|
||||
}
|
||||
|
||||
@ -116,7 +117,7 @@ public:
|
||||
throw std::runtime_error("Error: you required an too big index");
|
||||
std::map<std::size_t, std::string>::const_iterator it = m_index_to_feature_name.find(idx);
|
||||
if (it == m_index_to_feature_name.end()) {
|
||||
throw std::runtime_error("Error: specified id is unknown: " + idx);
|
||||
throw std::runtime_error("Error: specified id is unknown: " + boost::lexical_cast<std::string>(idx));
|
||||
} else {
|
||||
return it->second;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include "util/exception.hh"
|
||||
#include "util/file_piece.hh"
|
||||
|
||||
#include "BleuScorer.h"
|
||||
#include "Scorer.h"
|
||||
#include "HopeFearDecoder.h"
|
||||
|
||||
using namespace std;
|
||||
@ -39,7 +39,7 @@ namespace MosesTuning {
|
||||
static const ValType BLEU_RATIO = 5;
|
||||
|
||||
ValType HopeFearDecoder::Evaluate(const AvgWeightVector& wv) {
|
||||
vector<ValType> stats(kBleuNgramOrder*2+1,0);
|
||||
vector<ValType> stats(scorer_->NumberOfScores(),0);
|
||||
for(reset(); !finished(); next()) {
|
||||
vector<ValType> sent;
|
||||
MaxModel(wv,&sent);
|
||||
@ -47,7 +47,7 @@ ValType HopeFearDecoder::Evaluate(const AvgWeightVector& wv) {
|
||||
stats[i]+=sent[i];
|
||||
}
|
||||
}
|
||||
return unsmoothedBleu(stats);
|
||||
return scorer_->calculateScore(stats);
|
||||
}
|
||||
|
||||
NbestHopeFearDecoder::NbestHopeFearDecoder(
|
||||
@ -55,8 +55,10 @@ NbestHopeFearDecoder::NbestHopeFearDecoder(
|
||||
const vector<string>& scoreFiles,
|
||||
bool streaming,
|
||||
bool no_shuffle,
|
||||
bool safe_hope
|
||||
bool safe_hope,
|
||||
Scorer* scorer
|
||||
) : safe_hope_(safe_hope) {
|
||||
scorer_ = scorer;
|
||||
if (streaming) {
|
||||
train_.reset(new StreamingHypPackEnumerator(featureFiles, scoreFiles));
|
||||
} else {
|
||||
@ -93,7 +95,7 @@ void NbestHopeFearDecoder::HopeFear(
|
||||
for(size_t i=0; i< train_->cur_size(); i++) {
|
||||
const MiraFeatureVector& vec=train_->featuresAt(i);
|
||||
ValType score = wv.score(vec);
|
||||
ValType bleu = sentenceLevelBackgroundBleu(train_->scoresAt(i),backgroundBleu);
|
||||
ValType bleu = scorer_->calculateSentenceLevelBackgroundScore(train_->scoresAt(i),backgroundBleu);
|
||||
// Hope
|
||||
if(i==0 || (hope_scale*score + bleu) > hope_score) {
|
||||
hope_score = hope_scale*score + bleu;
|
||||
@ -124,9 +126,9 @@ void NbestHopeFearDecoder::HopeFear(
|
||||
hopeFear->fearFeatures = train_->featuresAt(fear_index);
|
||||
|
||||
hopeFear->hopeStats = train_->scoresAt(hope_index);
|
||||
hopeFear->hopeBleu = sentenceLevelBackgroundBleu(hopeFear->hopeStats, backgroundBleu);
|
||||
hopeFear->hopeBleu = scorer_->calculateSentenceLevelBackgroundScore(hopeFear->hopeStats, backgroundBleu);
|
||||
const vector<float>& fear_stats = train_->scoresAt(fear_index);
|
||||
hopeFear->fearBleu = sentenceLevelBackgroundBleu(fear_stats, backgroundBleu);
|
||||
hopeFear->fearBleu = scorer_->calculateSentenceLevelBackgroundScore(fear_stats, backgroundBleu);
|
||||
|
||||
hopeFear->modelStats = train_->scoresAt(model_index);
|
||||
hopeFear->hopeFearEqual = (hope_index == fear_index);
|
||||
@ -158,7 +160,8 @@ HypergraphHopeFearDecoder::HypergraphHopeFearDecoder
|
||||
bool no_shuffle,
|
||||
bool safe_hope,
|
||||
size_t hg_pruning,
|
||||
const MiraWeightVector& wv
|
||||
const MiraWeightVector& wv,
|
||||
Scorer* scorer
|
||||
) :
|
||||
num_dense_(num_dense) {
|
||||
|
||||
@ -169,6 +172,7 @@ HypergraphHopeFearDecoder::HypergraphHopeFearDecoder
|
||||
|
||||
SparseVector weights;
|
||||
wv.ToSparse(&weights);
|
||||
scorer_ = scorer;
|
||||
|
||||
static const string kWeights = "weights";
|
||||
fs::directory_iterator dend;
|
||||
@ -260,9 +264,9 @@ void HypergraphHopeFearDecoder::HopeFear(
|
||||
|
||||
//Only C++11
|
||||
//hopeFear->modelStats.assign(std::begin(modelHypo.bleuStats), std::end(modelHypo.bleuStats));
|
||||
vector<ValType> fearStats(kBleuNgramOrder*2+1);
|
||||
hopeFear->hopeStats.reserve(kBleuNgramOrder*2+1);
|
||||
hopeFear->modelStats.reserve(kBleuNgramOrder*2+1);
|
||||
vector<ValType> fearStats(scorer_->NumberOfScores());
|
||||
hopeFear->hopeStats.reserve(scorer_->NumberOfScores());
|
||||
hopeFear->modelStats.reserve(scorer_->NumberOfScores());
|
||||
for (size_t i = 0; i < fearStats.size(); ++i) {
|
||||
hopeFear->modelStats.push_back(modelHypo.bleuStats[i]);
|
||||
hopeFear->hopeStats.push_back(hopeHypo.bleuStats[i]);
|
||||
@ -320,7 +324,7 @@ void HypergraphHopeFearDecoder::MaxModel(const AvgWeightVector& wv, vector<ValTy
|
||||
size_t sentenceId = *sentenceIdIter_;
|
||||
SparseVector weights;
|
||||
wv.ToSparse(&weights);
|
||||
vector<ValType> bg(kBleuNgramOrder*2+1);
|
||||
vector<ValType> bg(scorer_->NumberOfScores());
|
||||
Viterbi(*(graphs_[sentenceId]), weights, 0, references_, sentenceId, bg, &bestHypo);
|
||||
stats->resize(bestHypo.bleuStats.size());
|
||||
/*
|
||||
|
@ -37,6 +37,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
namespace MosesTuning {
|
||||
|
||||
class Scorer;
|
||||
|
||||
/** To be filled in by the decoder */
|
||||
struct HopeFearData {
|
||||
MiraFeatureVector modelFeatures;
|
||||
@ -60,6 +62,8 @@ public:
|
||||
virtual void next() = 0;
|
||||
virtual bool finished() = 0;
|
||||
|
||||
virtual ~HopeFearDecoder() {};
|
||||
|
||||
/**
|
||||
* Calculate hope, fear and model hypotheses
|
||||
**/
|
||||
@ -76,6 +80,8 @@ public:
|
||||
/** Calculate bleu on training set */
|
||||
ValType Evaluate(const AvgWeightVector& wv);
|
||||
|
||||
protected:
|
||||
Scorer* scorer_;
|
||||
};
|
||||
|
||||
|
||||
@ -86,7 +92,8 @@ public:
|
||||
const std::vector<std::string>& scoreFiles,
|
||||
bool streaming,
|
||||
bool no_shuffle,
|
||||
bool safe_hope
|
||||
bool safe_hope,
|
||||
Scorer* scorer
|
||||
);
|
||||
|
||||
virtual void reset();
|
||||
@ -120,7 +127,8 @@ public:
|
||||
bool no_shuffle,
|
||||
bool safe_hope,
|
||||
size_t hg_pruning,
|
||||
const MiraWeightVector& wv
|
||||
const MiraWeightVector& wv,
|
||||
Scorer* scorer_
|
||||
);
|
||||
|
||||
virtual void reset();
|
||||
|
165
mert/HwcmScorer.cpp
Normal file
165
mert/HwcmScorer.cpp
Normal file
@ -0,0 +1,165 @@
|
||||
#include "HwcmScorer.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "ScoreStats.h"
|
||||
#include "Util.h"
|
||||
|
||||
#include "util/tokenize_piece.hh"
|
||||
|
||||
// HWCM score (Liu and Gildea, 2005). Implements F1 instead of precision for better modelling of hypothesis length.
|
||||
// assumes dependency trees on target side (generated by scripts/training/wrappers/conll2mosesxml.py ; use with option --brackets for reference).
|
||||
// reads reference trees from separate file {REFERENCE_FILE}.trees to support mix of string-based and tree-based metrics.
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace MosesTuning
|
||||
{
|
||||
|
||||
|
||||
HwcmScorer::HwcmScorer(const string& config)
|
||||
: StatisticsBasedScorer("HWCM",config) {}
|
||||
|
||||
HwcmScorer::~HwcmScorer() {}
|
||||
|
||||
void HwcmScorer::setReferenceFiles(const vector<string>& referenceFiles)
|
||||
{
|
||||
// For each line in the reference file, create a tree object
|
||||
if (referenceFiles.size() != 1) {
|
||||
throw runtime_error("HWCM only supports a single reference");
|
||||
}
|
||||
m_ref_trees.clear();
|
||||
m_ref_hwc.clear();
|
||||
ifstream in((referenceFiles[0] + ".trees").c_str());
|
||||
if (!in) {
|
||||
throw runtime_error("Unable to open " + referenceFiles[0] + ".trees");
|
||||
}
|
||||
string line;
|
||||
while (getline(in,line)) {
|
||||
line = this->preprocessSentence(line);
|
||||
TreePointer tree (boost::make_shared<InternalTree>(line));
|
||||
m_ref_trees.push_back(tree);
|
||||
vector<map<string, int> > hwc (kHwcmOrder);
|
||||
vector<string> history(kHwcmOrder);
|
||||
extractHeadWordChain(tree, history, hwc);
|
||||
m_ref_hwc.push_back(hwc);
|
||||
vector<int> totals(kHwcmOrder);
|
||||
for (size_t i = 0; i < kHwcmOrder; i++) {
|
||||
for (map<string, int>::const_iterator it = m_ref_hwc.back()[i].begin(); it != m_ref_hwc.back()[i].end(); it++) {
|
||||
totals[i] += it->second;
|
||||
}
|
||||
}
|
||||
m_ref_lengths.push_back(totals);
|
||||
}
|
||||
TRACE_ERR(endl);
|
||||
|
||||
}
|
||||
|
||||
void HwcmScorer::extractHeadWordChain(TreePointer tree, vector<string> & history, vector<map<string, int> > & hwc) {
|
||||
|
||||
if (tree->GetLength() > 0) {
|
||||
string head = getHead(tree);
|
||||
|
||||
if (head.empty()) {
|
||||
for (std::vector<TreePointer>::const_iterator it = tree->GetChildren().begin(); it != tree->GetChildren().end(); ++it) {
|
||||
extractHeadWordChain(*it, history, hwc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
vector<string> new_history(kHwcmOrder);
|
||||
new_history[0] = head;
|
||||
hwc[0][head]++;
|
||||
for (size_t hist_idx = 0; hist_idx < kHwcmOrder-1; hist_idx++) {
|
||||
if (!history[hist_idx].empty()) {
|
||||
string chain = history[hist_idx] + " " + head;
|
||||
hwc[hist_idx+1][chain]++;
|
||||
if (hist_idx+2 < kHwcmOrder) {
|
||||
new_history[hist_idx+1] = chain;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (std::vector<TreePointer>::const_iterator it = tree->GetChildren().begin(); it != tree->GetChildren().end(); ++it) {
|
||||
extractHeadWordChain(*it, new_history, hwc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string HwcmScorer::getHead(TreePointer tree) {
|
||||
// assumption (only true for dependency parse: each constituent has a preterminal label, and corresponding terminal is head)
|
||||
// if constituent has multiple preterminals, first one is picked; if it has no preterminals, empty string is returned
|
||||
for (std::vector<TreePointer>::const_iterator it = tree->GetChildren().begin(); it != tree->GetChildren().end(); ++it)
|
||||
{
|
||||
TreePointer child = *it;
|
||||
|
||||
if (child->GetLength() == 1 && child->GetChildren()[0]->IsTerminal()) {
|
||||
return child->GetChildren()[0]->GetLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
void HwcmScorer::prepareStats(size_t sid, const string& text, ScoreStats& entry)
|
||||
{
|
||||
if (sid >= m_ref_trees.size()) {
|
||||
stringstream msg;
|
||||
msg << "Sentence id (" << sid << ") not found in reference set";
|
||||
throw runtime_error(msg.str());
|
||||
}
|
||||
|
||||
string sentence = this->preprocessSentence(text);
|
||||
|
||||
// if sentence has '|||', assume that tree is in second position (n-best-list);
|
||||
// otherwise, assume it is in first position (calling 'evaluate' with tree as reference)
|
||||
util::TokenIter<util::MultiCharacter> it(sentence, util::MultiCharacter("|||"));
|
||||
++it;
|
||||
if (it) {
|
||||
sentence = it->as_string();
|
||||
}
|
||||
|
||||
TreePointer tree (boost::make_shared<InternalTree>(sentence));
|
||||
vector<map<string, int> > hwc_test (kHwcmOrder);
|
||||
vector<string> history(kHwcmOrder);
|
||||
extractHeadWordChain(tree, history, hwc_test);
|
||||
|
||||
ostringstream stats;
|
||||
for (size_t i = 0; i < kHwcmOrder; i++) {
|
||||
int correct = 0;
|
||||
int test_total = 0;
|
||||
for (map<string, int>::const_iterator it = hwc_test[i].begin(); it != hwc_test[i].end(); it++) {
|
||||
test_total += it->second;
|
||||
map<string, int>::const_iterator it2 = m_ref_hwc[sid][i].find(it->first);
|
||||
if (it2 != m_ref_hwc[sid][i].end()) {
|
||||
correct += std::min(it->second, it2->second);
|
||||
}
|
||||
}
|
||||
stats << correct << " " << test_total << " " << m_ref_lengths[sid][i] << " " ;
|
||||
}
|
||||
|
||||
string stats_str = stats.str();
|
||||
entry.set(stats_str);
|
||||
}
|
||||
|
||||
float HwcmScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
float precision = 0;
|
||||
float recall = 0;
|
||||
for (size_t i = 0; i < kHwcmOrder; i++) {
|
||||
float matches = comps[i*3];
|
||||
float test_total = comps[1+(i*3)];
|
||||
float ref_total = comps[2+(i*3)];
|
||||
if (test_total > 0) {
|
||||
precision += matches/test_total;
|
||||
}
|
||||
if (ref_total > 0) {
|
||||
recall += matches/ref_total;
|
||||
}
|
||||
}
|
||||
|
||||
precision /= (float)kHwcmOrder;
|
||||
recall /= (float)kHwcmOrder;
|
||||
return (2*precision*recall)/(precision+recall); // f1-score
|
||||
}
|
||||
|
||||
}
|
64
mert/HwcmScorer.h
Normal file
64
mert/HwcmScorer.h
Normal file
@ -0,0 +1,64 @@
|
||||
#ifndef MERT_HWCM_SCORER_H_
|
||||
#define MERT_HWCM_SCORER_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "StatisticsBasedScorer.h"
|
||||
#include "moses/FF/InternalTree.h"
|
||||
|
||||
using Moses::TreePointer;
|
||||
using Moses::InternalTree;
|
||||
|
||||
namespace MosesTuning
|
||||
{
|
||||
|
||||
|
||||
class ScoreStats;
|
||||
const size_t kHwcmOrder = 4;
|
||||
|
||||
/**
|
||||
* HWCM scoring (Liu and Gildea 2005), but F1 instead of precision.
|
||||
*/
|
||||
class HwcmScorer: public StatisticsBasedScorer
|
||||
{
|
||||
public:
|
||||
explicit HwcmScorer(const std::string& config = "");
|
||||
~HwcmScorer();
|
||||
|
||||
virtual void setReferenceFiles(const std::vector<std::string>& referenceFiles);
|
||||
virtual void prepareStats(std::size_t sid, const std::string& text, ScoreStats& entry);
|
||||
|
||||
virtual std::size_t NumberOfScores() const {
|
||||
return kHwcmOrder*3;
|
||||
}
|
||||
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
|
||||
|
||||
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const {
|
||||
return totals[2];
|
||||
}
|
||||
|
||||
//TODO: actually, we use trees which we store in place of alignment. Maybe use something analogous to Phrase Properties to cleanly store trees?
|
||||
bool useAlignment() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// data extracted from reference files
|
||||
std::vector<TreePointer> m_ref_trees;
|
||||
std::vector<std::vector<std::map<std::string, int> > > m_ref_hwc;
|
||||
std::vector<std::vector<int> > m_ref_lengths;
|
||||
|
||||
void extractHeadWordChain(TreePointer tree, std::vector<std::string> & history, std::vector<std::map<std::string, int> > & hwc);
|
||||
std::string getHead(TreePointer tree);
|
||||
|
||||
// no copying allowed
|
||||
HwcmScorer(const HwcmScorer&);
|
||||
HwcmScorer& operator=(const HwcmScorer&);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // MERT_HWCM_SCORER_H_
|
@ -64,7 +64,7 @@ double_conversion::StringToDoubleConverter converter(double_conversion::StringTo
|
||||
**/
|
||||
static pair<Edge*,size_t> ReadEdge(util::FilePiece &from, Graph &graph) {
|
||||
Edge* edge = graph.NewEdge();
|
||||
StringPiece line = NextLine(from);
|
||||
StringPiece line = from.ReadLine(); //Don't allow comments within edge lists
|
||||
util::TokenIter<util::MultiCharacter> pipes(line, util::MultiCharacter(" ||| "));
|
||||
//Target
|
||||
for (util::TokenIter<util::SingleCharacter, true> i(*pipes, util::SingleCharacter(' ')); i; ++i) {
|
||||
|
@ -153,6 +153,41 @@ void InterpolatedScorer::score(const candidates_t& candidates, const diffs_t& di
|
||||
|
||||
}
|
||||
|
||||
/** Interpolated scorer gets a vector of sufficient statistics, calls all scorers with corresponding statistics,
|
||||
and combines them with weights **/
|
||||
float InterpolatedScorer::calculateScore(const std::vector<ScoreStatsType>& totals) const
|
||||
{
|
||||
size_t scorerNum = 0;
|
||||
size_t last = 0;
|
||||
float score = 0;
|
||||
for (ScopedVector<Scorer>::const_iterator itsc = m_scorers.begin();
|
||||
itsc != m_scorers.end(); ++itsc) {
|
||||
int numScoresScorer = (*itsc)->NumberOfScores();
|
||||
std::vector<ScoreStatsType> totals_scorer(totals.begin()+last, totals.begin()+last+numScoresScorer);
|
||||
score += (*itsc)->calculateScore(totals_scorer) * m_scorer_weights[scorerNum];
|
||||
last += numScoresScorer;
|
||||
scorerNum++;
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
|
||||
float InterpolatedScorer::getReferenceLength(const std::vector<ScoreStatsType>& totals) const
|
||||
{
|
||||
size_t scorerNum = 0;
|
||||
size_t last = 0;
|
||||
float refLen = 0;
|
||||
for (ScopedVector<Scorer>::const_iterator itsc = m_scorers.begin();
|
||||
itsc != m_scorers.end(); ++itsc) {
|
||||
int numScoresScorer = (*itsc)->NumberOfScores();
|
||||
std::vector<ScoreStatsType> totals_scorer(totals.begin()+last, totals.begin()+last+numScoresScorer);
|
||||
refLen += (*itsc)->getReferenceLength(totals_scorer) * m_scorer_weights[scorerNum];
|
||||
last += numScoresScorer;
|
||||
scorerNum++;
|
||||
}
|
||||
return refLen;
|
||||
}
|
||||
|
||||
void InterpolatedScorer::setReferenceFiles(const vector<string>& referenceFiles)
|
||||
{
|
||||
for (ScopedVector<Scorer>::iterator itsc = m_scorers.begin();
|
||||
|
@ -39,6 +39,10 @@ public:
|
||||
|
||||
virtual void setScoreData(ScoreData* data);
|
||||
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& totals) const;
|
||||
|
||||
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const;
|
||||
|
||||
/**
|
||||
* Set the factors, which should be used for this metric
|
||||
*/
|
||||
|
@ -29,6 +29,8 @@ SemposOverlapping.cpp
|
||||
InterpolatedScorer.cpp
|
||||
Point.cpp
|
||||
PerScorer.cpp
|
||||
HwcmScorer.cpp
|
||||
../moses/FF/InternalTree.cpp
|
||||
Scorer.cpp
|
||||
ScorerFactory.cpp
|
||||
Optimizer.cpp
|
||||
|
@ -144,7 +144,7 @@ void MeteorScorer::prepareStats(size_t sid, const string& text, ScoreStats& entr
|
||||
entry.set(stats_str);
|
||||
}
|
||||
|
||||
float MeteorScorer::calculateScore(const vector<int>& comps) const
|
||||
float MeteorScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
string score;
|
||||
stringstream input;
|
||||
@ -181,7 +181,7 @@ void MeteorScorer::setReferenceFiles(const vector<string>& referenceFiles) {}
|
||||
|
||||
void MeteorScorer::prepareStats(size_t sid, const string& text, ScoreStats& entry) {}
|
||||
|
||||
float MeteorScorer::calculateScore(const vector<int>& comps) const
|
||||
float MeteorScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
// Should never be reached
|
||||
return 0.0;
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
return 23;
|
||||
}
|
||||
|
||||
virtual float calculateScore(const std::vector<int>& comps) const;
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
|
||||
|
||||
private:
|
||||
// Meteor and process IO
|
||||
|
@ -139,7 +139,7 @@ ostream& operator<<(ostream& o, const MiraWeightVector& e)
|
||||
for(size_t i=0; i<e.m_weights.size(); i++) {
|
||||
if(abs(e.m_weights[i])>1e-8) {
|
||||
if(i>0) o << " ";
|
||||
cerr << i << ":" << e.m_weights[i];
|
||||
o << i << ":" << e.m_weights[i];
|
||||
}
|
||||
}
|
||||
return o;
|
||||
|
@ -79,10 +79,10 @@ void PerScorer::prepareStats(size_t sid, const string& text, ScoreStats& entry)
|
||||
entry.set(stats_str);
|
||||
}
|
||||
|
||||
float PerScorer::calculateScore(const vector<int>& comps) const
|
||||
float PerScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
float denom = comps[2];
|
||||
float num = comps[0] - max(0,comps[1]-comps[2]);
|
||||
float num = comps[0] - max(0.0f,comps[1]-comps[2]);
|
||||
if (denom == 0) {
|
||||
// This shouldn't happen!
|
||||
return 0.0;
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
virtual std::size_t NumberOfScores() const {
|
||||
return 3;
|
||||
}
|
||||
virtual float calculateScore(const std::vector<int>& comps) const;
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
|
||||
|
||||
private:
|
||||
// no copying allowed
|
||||
|
@ -234,7 +234,7 @@ void PermutationScorer::prepareStats(size_t sid, const string& text, ScoreStats&
|
||||
}
|
||||
|
||||
//Will just be final score
|
||||
statscore_t PermutationScorer::calculateScore(const vector<int>& comps) const
|
||||
statscore_t PermutationScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
//cerr << "*******PermutationScorer::calculateScore" ;
|
||||
//cerr << " " << comps[0]/comps[1] << endl;
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
statscore_t calculateScore(const std::vector<int>& scores) const;
|
||||
statscore_t calculateScore(const std::vector<ScoreStatsType>& scores) const;
|
||||
PermutationScorer(const PermutationScorer&);
|
||||
~PermutationScorer() {};
|
||||
PermutationScorer& operator=(const PermutationScorer&);
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "ScoreArray.h"
|
||||
#include "ScoreStats.h"
|
||||
|
||||
@ -108,7 +109,7 @@ public:
|
||||
inline int getName(std::size_t idx) const {
|
||||
idx2name::const_iterator i = m_index_to_array_name.find(idx);
|
||||
if (i != m_index_to_array_name.end())
|
||||
throw std::runtime_error("there is no entry at index " + idx);
|
||||
throw std::runtime_error("there is no entry at index " + boost::lexical_cast<std::string>(idx));
|
||||
return i->second;
|
||||
}
|
||||
};
|
||||
|
@ -42,6 +42,19 @@ public:
|
||||
*/
|
||||
virtual std::size_t NumberOfScores() const = 0;
|
||||
|
||||
/**
|
||||
* Calculate score based on a vector of sufficient statistics.
|
||||
*/
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& totals) const = 0;
|
||||
|
||||
float calculateSentenceLevelBackgroundScore(const std::vector<ScoreStatsType>& totals, const std::vector<ScoreStatsType>& bg) {
|
||||
std::vector<ScoreStatsType> stats(totals.size());
|
||||
for(size_t i=0; i<stats.size(); i++)
|
||||
stats[i] = totals[i]+bg[i];
|
||||
// Get score and scale by reference length (as per Chiang et al 08)
|
||||
return calculateScore(stats) * getReferenceLength(stats);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the reference files. This must be called before prepareStats().
|
||||
*/
|
||||
@ -97,6 +110,11 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Based on vector of sufficient statistics, return length of reference.
|
||||
*/
|
||||
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const = 0;
|
||||
|
||||
/**
|
||||
* Set the score data, prior to scoring.
|
||||
*/
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "SemposScorer.h"
|
||||
#include "PermutationScorer.h"
|
||||
#include "MeteorScorer.h"
|
||||
#include "HwcmScorer.h"
|
||||
#include "Reference.h"
|
||||
|
||||
using namespace std;
|
||||
@ -32,6 +33,7 @@ vector<string> ScorerFactory::getTypes()
|
||||
types.push_back(string("SEMPOS"));
|
||||
types.push_back(string("LRSCORE"));
|
||||
types.push_back(string("METEOR"));
|
||||
types.push_back(string("HWCM"));
|
||||
return types;
|
||||
}
|
||||
|
||||
@ -56,6 +58,8 @@ Scorer* ScorerFactory::getScorer(const string& type, const string& config)
|
||||
return (PermutationScorer*) new PermutationScorer(type, config);
|
||||
} else if (type == "METEOR") {
|
||||
return new MeteorScorer(config);
|
||||
} else if (type == "HWCM") {
|
||||
return new HwcmScorer(config);
|
||||
} else {
|
||||
if (type.find(',') != string::npos) {
|
||||
return new InterpolatedScorer(type, config);
|
||||
|
@ -33,9 +33,9 @@ void SemposOverlappingFactory::SetOverlapping(SemposOverlapping* ovr)
|
||||
g_overlapping = ovr;
|
||||
}
|
||||
|
||||
vector<int> CapMicroOverlapping::prepareStats(const sentence_t& cand, const sentence_t& ref)
|
||||
vector<ScoreStatsType> CapMicroOverlapping::prepareStats(const sentence_t& cand, const sentence_t& ref)
|
||||
{
|
||||
vector<int> stats(2);
|
||||
vector<ScoreStatsType> stats(2);
|
||||
sentence_t intersection;
|
||||
|
||||
set_intersection(cand.begin(), cand.end(), ref.begin(), ref.end(),
|
||||
@ -53,12 +53,12 @@ vector<int> CapMicroOverlapping::prepareStats(const sentence_t& cand, const sent
|
||||
refSum += semposScorer->weight(it->first);
|
||||
}
|
||||
|
||||
stats[0] = (int)(multCoeff * interSum);
|
||||
stats[1] = (int)(multCoeff * refSum);
|
||||
stats[0] = (ScoreStatsType)(multCoeff * interSum);
|
||||
stats[1] = (ScoreStatsType)(multCoeff * refSum);
|
||||
return stats;
|
||||
}
|
||||
|
||||
float CapMicroOverlapping::calculateScore(const vector<int>& stats) const
|
||||
float CapMicroOverlapping::calculateScore(const vector<ScoreStatsType>& stats) const
|
||||
{
|
||||
if (stats.size() != 2) {
|
||||
throw std::runtime_error("Size of stats vector has to be 2");
|
||||
@ -67,9 +67,9 @@ float CapMicroOverlapping::calculateScore(const vector<int>& stats) const
|
||||
return stats[0] / static_cast<float>(stats[1]);
|
||||
}
|
||||
|
||||
vector<int> CapMacroOverlapping::prepareStats(const sentence_t& cand, const sentence_t& ref)
|
||||
vector<ScoreStatsType> CapMacroOverlapping::prepareStats(const sentence_t& cand, const sentence_t& ref)
|
||||
{
|
||||
vector<int> stats(2 * kMaxNOC);
|
||||
vector<ScoreStatsType> stats(2 * kMaxNOC);
|
||||
sentence_t intersection;
|
||||
|
||||
set_intersection(cand.begin(), cand.end(), ref.begin(), ref.end(),
|
||||
@ -92,7 +92,7 @@ vector<int> CapMacroOverlapping::prepareStats(const sentence_t& cand, const sent
|
||||
return stats;
|
||||
}
|
||||
|
||||
float CapMacroOverlapping::calculateScore(const vector<int>& stats) const
|
||||
float CapMacroOverlapping::calculateScore(const vector<ScoreStatsType>& stats) const
|
||||
{
|
||||
if (stats.size() != 2 * kMaxNOC) {
|
||||
// TODO: Add some comments. The number "38" looks like a magic number.
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
namespace MosesTuning
|
||||
{
|
||||
|
||||
@ -31,8 +33,8 @@ class SemposOverlapping
|
||||
{
|
||||
public:
|
||||
virtual ~SemposOverlapping() {}
|
||||
virtual std::vector<int> prepareStats(const sentence_t& cand, const sentence_t& ref) = 0;
|
||||
virtual float calculateScore(const std::vector<int>& stats) const = 0;
|
||||
virtual std::vector<ScoreStatsType> prepareStats(const sentence_t& cand, const sentence_t& ref) = 0;
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& stats) const = 0;
|
||||
virtual std::size_t NumberOfScores() const = 0;
|
||||
};
|
||||
|
||||
@ -61,8 +63,8 @@ public:
|
||||
CapMicroOverlapping(const SemposScorer* sempos) : semposScorer(sempos) {}
|
||||
~CapMicroOverlapping() {}
|
||||
|
||||
virtual std::vector<int> prepareStats(const sentence_t& cand, const sentence_t& ref);
|
||||
virtual float calculateScore(const std::vector<int>& stats) const;
|
||||
virtual std::vector<ScoreStatsType> prepareStats(const sentence_t& cand, const sentence_t& ref);
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& stats) const;
|
||||
virtual std::size_t NumberOfScores() const {
|
||||
return 2;
|
||||
}
|
||||
@ -83,8 +85,8 @@ public:
|
||||
CapMacroOverlapping(const SemposScorer* sempos) : semposScorer(sempos) {}
|
||||
~CapMacroOverlapping() {}
|
||||
|
||||
virtual std::vector<int> prepareStats(const sentence_t& cand, const sentence_t& ref);
|
||||
virtual float calculateScore(const std::vector<int>& stats) const;
|
||||
virtual std::vector<ScoreStatsType> prepareStats(const sentence_t& cand, const sentence_t& ref);
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& stats) const;
|
||||
virtual std::size_t NumberOfScores() const {
|
||||
return kMaxNOC * 2;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
virtual std::size_t NumberOfScores() const {
|
||||
return m_ovr->NumberOfScores();
|
||||
}
|
||||
virtual float calculateScore(const std::vector<int>& comps) const {
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const {
|
||||
return m_ovr->calculateScore(comps);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ void StatisticsBasedScorer::score(const candidates_t& candidates, const diffs_t
|
||||
throw runtime_error("No candidates supplied");
|
||||
}
|
||||
int numCounts = m_score_data->get(0,candidates[0]).size();
|
||||
vector<int> totals(numCounts);
|
||||
vector<ScoreStatsType> totals(numCounts);
|
||||
for (size_t i = 0; i < candidates.size(); ++i) {
|
||||
ScoreStats stats = m_score_data->get(i,candidates[i]);
|
||||
if (stats.size() != totals.size()) {
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
#include "Scorer.h"
|
||||
|
||||
#include "util/exception.hh"
|
||||
|
||||
namespace MosesTuning
|
||||
{
|
||||
|
||||
@ -21,6 +23,8 @@ namespace MosesTuning
|
||||
*/
|
||||
class StatisticsBasedScorer : public Scorer
|
||||
{
|
||||
friend class HopeFearDecoder;
|
||||
|
||||
public:
|
||||
StatisticsBasedScorer(const std::string& name, const std::string& config);
|
||||
virtual ~StatisticsBasedScorer() {}
|
||||
@ -38,7 +42,12 @@ protected:
|
||||
/**
|
||||
* Calculate the actual score.
|
||||
*/
|
||||
virtual statscore_t calculateScore(const std::vector<int>& totals) const = 0;
|
||||
virtual statscore_t calculateScore(const std::vector<ScoreStatsType>& totals) const = 0;
|
||||
|
||||
virtual float getReferenceLength(const std::vector<ScoreStatsType>& totals) const {
|
||||
UTIL_THROW(util::Exception, "getReferenceLength not implemented for this scorer type.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// regularisation
|
||||
RegularisationType m_regularization_type;
|
||||
|
@ -101,7 +101,7 @@ void TerScorer::prepareStats ( size_t sid, const string& text, ScoreStats& entry
|
||||
entry.set ( stats_str );
|
||||
}
|
||||
|
||||
float TerScorer::calculateScore(const vector<int>& comps) const
|
||||
float TerScorer::calculateScore(const vector<ScoreStatsType>& comps) const
|
||||
{
|
||||
float denom = 1.0 * comps[1];
|
||||
float num = -1.0 * comps[0];
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
return kLENGTH + 1;
|
||||
}
|
||||
|
||||
virtual float calculateScore(const std::vector<int>& comps) const;
|
||||
virtual float calculateScore(const std::vector<ScoreStatsType>& comps) const;
|
||||
|
||||
private:
|
||||
const int kLENGTH;
|
||||
|
@ -33,7 +33,7 @@ typedef FeatureStatsType* featstats_t;
|
||||
typedef std::vector<FeatureStats> featarray_t;
|
||||
typedef std::vector<FeatureArray> featdata_t;
|
||||
|
||||
typedef int ScoreStatsType;
|
||||
typedef float ScoreStatsType;
|
||||
typedef ScoreStatsType* scorestats_t;
|
||||
//typedef std::vector<ScoreStatsType> scorestats_t;
|
||||
typedef std::vector<ScoreStats> scorearray_t;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "ScorerFactory.h"
|
||||
#include "Timer.h"
|
||||
#include "Util.h"
|
||||
#include "Data.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace MosesTuning;
|
||||
@ -30,17 +31,20 @@ const float g_alpha = 0.05;
|
||||
class EvaluatorUtil
|
||||
{
|
||||
public:
|
||||
static void evaluate(const string& candFile, int bootstrap);
|
||||
static void evaluate(const string& candFile, int bootstrap, bool nbest_mode);
|
||||
static float average(const vector<float>& list);
|
||||
static string int2string(int n);
|
||||
static vector<ScoreStats> loadNBest(const string& nBestFile);
|
||||
static vector<ScoreStats> loadCand(const string& candFile);
|
||||
|
||||
private:
|
||||
EvaluatorUtil() {}
|
||||
~EvaluatorUtil() {}
|
||||
};
|
||||
|
||||
void EvaluatorUtil::evaluate(const string& candFile, int bootstrap)
|
||||
{
|
||||
// load hypothesis from candidate output
|
||||
vector<ScoreStats> EvaluatorUtil::loadCand(const string& candFile) {
|
||||
|
||||
ifstream cand(candFile.c_str());
|
||||
if (!cand.good()) throw runtime_error("Error opening candidate file");
|
||||
|
||||
@ -53,6 +57,34 @@ void EvaluatorUtil::evaluate(const string& candFile, int bootstrap)
|
||||
g_scorer->prepareStats(entries.size(), line, scoreentry);
|
||||
entries.push_back(scoreentry);
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
// load 1-best hypothesis from n-best file (useful if relying on alignment/tree information)
|
||||
vector<ScoreStats> EvaluatorUtil::loadNBest(const string& nBestFile) {
|
||||
vector<ScoreStats> entries;
|
||||
|
||||
Data data(g_scorer);
|
||||
data.loadNBest(nBestFile, true);
|
||||
const ScoreDataHandle & score_data = data.getScoreData();
|
||||
for (size_t i = 0; i != score_data->size(); i++) {
|
||||
entries.push_back(score_data->get(i, 0));
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
|
||||
void EvaluatorUtil::evaluate(const string& candFile, int bootstrap, bool nbest_input)
|
||||
{
|
||||
|
||||
vector<ScoreStats> entries;
|
||||
|
||||
if (nbest_input) {
|
||||
entries = loadNBest(candFile);
|
||||
}
|
||||
else {
|
||||
entries = loadCand(candFile);
|
||||
}
|
||||
|
||||
int n = entries.size();
|
||||
if (bootstrap) {
|
||||
@ -131,6 +163,7 @@ void usage()
|
||||
cerr << "\tThis is of the form NAME1:VAL1,NAME2:VAL2 etc " << endl;
|
||||
cerr << "[--reference|-R] comma separated list of reference files" << endl;
|
||||
cerr << "[--candidate|-C] comma separated list of candidate files" << endl;
|
||||
cerr << "[--nbest|-n] comma separated list of nbest files (only 1-best is evaluated)" << endl;
|
||||
cerr << "[--factors|-f] list of factors passed to the scorer (e.g. 0|2)" << endl;
|
||||
cerr << "[--filter|-l] filter command which will be used to preprocess the sentences" << endl;
|
||||
cerr << "[--bootstrap|-b] number of booststraped samples (default 0 - no bootstraping)" << endl;
|
||||
@ -162,6 +195,7 @@ static struct option long_options[] = {
|
||||
{"scconfig", required_argument, 0, 'c'},
|
||||
{"reference", required_argument, 0, 'R'},
|
||||
{"candidate", required_argument, 0, 'C'},
|
||||
{"nbest", required_argument, 0, 'n'},
|
||||
{"bootstrap", required_argument, 0, 'b'},
|
||||
{"rseed", required_argument, 0, 'r'},
|
||||
{"factors", required_argument, 0, 'f'},
|
||||
@ -176,6 +210,7 @@ struct ProgramOption {
|
||||
vector<string> scorer_configs;
|
||||
string reference;
|
||||
string candidate;
|
||||
string nbest;
|
||||
vector<string> scorer_factors;
|
||||
vector<string> scorer_filter;
|
||||
int bootstrap;
|
||||
@ -185,6 +220,7 @@ struct ProgramOption {
|
||||
ProgramOption()
|
||||
: reference(""),
|
||||
candidate(""),
|
||||
nbest(""),
|
||||
bootstrap(0),
|
||||
seed(0),
|
||||
has_seed(false) { }
|
||||
@ -195,7 +231,7 @@ void ParseCommandOptions(int argc, char** argv, ProgramOption* opt)
|
||||
int c;
|
||||
int option_index;
|
||||
int last_scorer_index = -1;
|
||||
while ((c = getopt_long(argc, argv, "s:c:R:C:b:r:f:l:h", long_options, &option_index)) != -1) {
|
||||
while ((c = getopt_long(argc, argv, "s:c:R:C:n:b:r:f:l:h", long_options, &option_index)) != -1) {
|
||||
switch(c) {
|
||||
case 's':
|
||||
opt->scorer_types.push_back(string(optarg));
|
||||
@ -205,6 +241,7 @@ void ParseCommandOptions(int argc, char** argv, ProgramOption* opt)
|
||||
last_scorer_index++;
|
||||
break;
|
||||
case 'c':
|
||||
if (last_scorer_index == -1) throw runtime_error("You need to specify a scorer before its config string.");
|
||||
opt->scorer_configs[last_scorer_index] = string(optarg);
|
||||
break;
|
||||
case 'R':
|
||||
@ -213,6 +250,9 @@ void ParseCommandOptions(int argc, char** argv, ProgramOption* opt)
|
||||
case 'C':
|
||||
opt->candidate = string(optarg);
|
||||
break;
|
||||
case 'n':
|
||||
opt->nbest = string(optarg);
|
||||
break;
|
||||
case 'b':
|
||||
opt->bootstrap = atoi(optarg);
|
||||
break;
|
||||
@ -221,9 +261,11 @@ void ParseCommandOptions(int argc, char** argv, ProgramOption* opt)
|
||||
opt->has_seed = true;
|
||||
break;
|
||||
case 'f':
|
||||
if (last_scorer_index == -1) throw runtime_error("You need to specify a scorer before its list of factors.");
|
||||
opt->scorer_factors[last_scorer_index] = string(optarg);
|
||||
break;
|
||||
case 'l':
|
||||
if (last_scorer_index == -1) throw runtime_error("You need to specify a scorer before its filter.");
|
||||
opt->scorer_filter[last_scorer_index] = string(optarg);
|
||||
break;
|
||||
default:
|
||||
@ -271,8 +313,13 @@ int main(int argc, char** argv)
|
||||
if (option.reference.length() == 0) throw runtime_error("You have to specify at least one reference file.");
|
||||
split(option.reference, ',', refFiles);
|
||||
|
||||
if (option.candidate.length() == 0) throw runtime_error("You have to specify at least one candidate file.");
|
||||
split(option.candidate, ',', candFiles);
|
||||
if (option.candidate.length() == 0 && option.nbest.length() == 0) throw runtime_error("You have to specify at least one candidate (or n-best) file.");
|
||||
if (option.candidate.length() > 0 && option.nbest.length() > 0) throw runtime_error("You can either specify candidate files or n-best files, but not both.");
|
||||
bool nbest_input = option.nbest.length() > 0;
|
||||
if (nbest_input)
|
||||
split(option.nbest, ',', candFiles);
|
||||
else
|
||||
split(option.candidate, ',', candFiles);
|
||||
|
||||
if (candFiles.size() > 1) g_has_more_files = true;
|
||||
if (option.scorer_types.size() > 1) g_has_more_scorers = true;
|
||||
@ -283,7 +330,7 @@ int main(int argc, char** argv)
|
||||
g_scorer->setFactors(option.scorer_factors[i]);
|
||||
g_scorer->setFilter(option.scorer_filter[i]);
|
||||
g_scorer->setReferenceFiles(refFiles);
|
||||
EvaluatorUtil::evaluate(*fileIt, option.bootstrap);
|
||||
EvaluatorUtil::evaluate(*fileIt, option.bootstrap, nbest_input);
|
||||
delete g_scorer;
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,9 @@ de recherches du Canada
|
||||
#include "MiraFeatureVector.h"
|
||||
#include "MiraWeightVector.h"
|
||||
|
||||
#include "Scorer.h"
|
||||
#include "ScorerFactory.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace MosesTuning;
|
||||
|
||||
@ -57,6 +60,8 @@ int main(int argc, char** argv)
|
||||
string denseInitFile;
|
||||
string sparseInitFile;
|
||||
string type = "nbest";
|
||||
string sctype = "BLEU";
|
||||
string scconfig = "";
|
||||
vector<string> scoreFiles;
|
||||
vector<string> featureFiles;
|
||||
vector<string> referenceFiles; //for hg mira
|
||||
@ -67,6 +72,7 @@ int main(int argc, char** argv)
|
||||
float decay = 0.999; // Pseudo-corpus decay \gamma
|
||||
int n_iters = 60; // Max epochs J
|
||||
bool streaming = false; // Stream all k-best lists?
|
||||
bool streaming_out = false; // Stream output after each sentence?
|
||||
bool no_shuffle = false; // Don't shuffle, even for in memory version
|
||||
bool model_bg = false; // Use model for background corpus
|
||||
bool verbose = false; // Verbose updates
|
||||
@ -78,6 +84,8 @@ int main(int argc, char** argv)
|
||||
desc.add_options()
|
||||
("help,h", po::value(&help)->zero_tokens()->default_value(false), "Print this help message and exit")
|
||||
("type,t", po::value<string>(&type), "Either nbest or hypergraph")
|
||||
("sctype", po::value<string>(&sctype), "the scorer type (default BLEU)")
|
||||
("scconfig,c", po::value<string>(&scconfig), "configuration string passed to scorer")
|
||||
("scfile,S", po::value<vector<string> >(&scoreFiles), "Scorer data files")
|
||||
("ffile,F", po::value<vector<string> > (&featureFiles), "Feature data files")
|
||||
("hgdir,H", po::value<string> (&hgDir), "Directory containing hypergraphs")
|
||||
@ -90,6 +98,7 @@ int main(int argc, char** argv)
|
||||
("dense-init,d", po::value<string>(&denseInitFile), "Weight file for dense features. This should have 'name= value' on each line, or (legacy) should be the Moses mert 'init.opt' format.")
|
||||
("sparse-init,s", po::value<string>(&sparseInitFile), "Weight file for sparse features")
|
||||
("streaming", po::value(&streaming)->zero_tokens()->default_value(false), "Stream n-best lists to save memory, implies --no-shuffle")
|
||||
("streaming-out", po::value(&streaming_out)->zero_tokens()->default_value(false), "Stream weights to stdout after each sentence")
|
||||
("no-shuffle", po::value(&no_shuffle)->zero_tokens()->default_value(false), "Don't shuffle hypotheses before each epoch")
|
||||
("model-bg", po::value(&model_bg)->zero_tokens()->default_value(false), "Use model instead of hope for BLEU background")
|
||||
("verbose", po::value(&verbose)->zero_tokens()->default_value(false), "Verbose updates")
|
||||
@ -209,25 +218,27 @@ int main(int argc, char** argv)
|
||||
|
||||
MiraWeightVector wv(initParams);
|
||||
|
||||
// Initialize background corpus
|
||||
vector<ValType> bg;
|
||||
for(int j=0; j<kBleuNgramOrder; j++) {
|
||||
bg.push_back(kBleuNgramOrder-j);
|
||||
bg.push_back(kBleuNgramOrder-j);
|
||||
// Initialize scorer
|
||||
if(sctype != "BLEU" && type == "hypergraph") {
|
||||
UTIL_THROW(util::Exception, "hypergraph mira only supports BLEU");
|
||||
}
|
||||
bg.push_back(kBleuNgramOrder);
|
||||
boost::scoped_ptr<Scorer> scorer(ScorerFactory::getScorer(sctype, scconfig));
|
||||
|
||||
// Initialize background corpus
|
||||
vector<ValType> bg(scorer->NumberOfScores(), 1);
|
||||
|
||||
boost::scoped_ptr<HopeFearDecoder> decoder;
|
||||
if (type == "nbest") {
|
||||
decoder.reset(new NbestHopeFearDecoder(featureFiles, scoreFiles, streaming, no_shuffle, safe_hope));
|
||||
decoder.reset(new NbestHopeFearDecoder(featureFiles, scoreFiles, streaming, no_shuffle, safe_hope, scorer.get()));
|
||||
} else if (type == "hypergraph") {
|
||||
decoder.reset(new HypergraphHopeFearDecoder(hgDir, referenceFiles, initDenseSize, streaming, no_shuffle, safe_hope, hgPruning, wv));
|
||||
decoder.reset(new HypergraphHopeFearDecoder(hgDir, referenceFiles, initDenseSize, streaming, no_shuffle, safe_hope, hgPruning, wv, scorer.get()));
|
||||
} else {
|
||||
UTIL_THROW(util::Exception, "Unknown batch mira type: '" << type << "'");
|
||||
}
|
||||
|
||||
// Training loop
|
||||
cerr << "Initial BLEU = " << decoder->Evaluate(wv.avg()) << endl;
|
||||
if (!streaming_out)
|
||||
cerr << "Initial BLEU = " << decoder->Evaluate(wv.avg()) << endl;
|
||||
ValType bestBleu = 0;
|
||||
for(int j=0; j<n_iters; j++) {
|
||||
// MIRA train for one epoch
|
||||
@ -275,6 +286,8 @@ int main(int argc, char** argv)
|
||||
}
|
||||
iNumExamples++;
|
||||
++sentenceIndex;
|
||||
if (streaming_out)
|
||||
cout << wv << endl;
|
||||
}
|
||||
// Training Epoch summary
|
||||
cerr << iNumUpdates << "/" << iNumExamples << " updates"
|
||||
|
@ -143,7 +143,7 @@ vector< vector<const Word*> > MosesDecoder::runDecoder(const std::string& source
|
||||
string filename)
|
||||
{
|
||||
// run the decoder
|
||||
m_manager = new Moses::Manager(0,*m_sentence, search);
|
||||
m_manager = new Moses::Manager(*m_sentence, search);
|
||||
m_manager->ProcessSentence();
|
||||
TrellisPathList nBestList;
|
||||
m_manager->CalcNBest(nBestSize, nBestList, distinct);
|
||||
@ -220,7 +220,7 @@ vector< vector<const Word*> > MosesDecoder::runChartDecoder(const std::string& s
|
||||
size_t epoch)
|
||||
{
|
||||
// run the decoder
|
||||
m_chartManager = new ChartManager(0,*m_sentence);
|
||||
m_chartManager = new ChartManager(*m_sentence);
|
||||
m_chartManager->ProcessSentence();
|
||||
ChartKBestExtractor::KBestVec nBestList;
|
||||
m_chartManager->CalcNBest(nBestSize, nBestList, distinct);
|
||||
|
@ -12,6 +12,8 @@ exe TMining : TransliterationMining.cpp ../moses//moses ;
|
||||
|
||||
exe 1-1-Extraction : 1-1-Extraction.cpp ../moses//moses ;
|
||||
|
||||
exe prunePhraseTable : prunePhraseTable.cpp ../moses//moses ..//boost_program_options ;
|
||||
|
||||
local with-cmph = [ option.get "with-cmph" ] ;
|
||||
if $(with-cmph) {
|
||||
exe processPhraseTableMin : processPhraseTableMin.cpp ../moses//moses ;
|
||||
@ -44,4 +46,4 @@ $(TOP)//boost_iostreams
|
||||
$(TOP)//boost_program_options
|
||||
;
|
||||
|
||||
alias programs : 1-1-Extraction TMining generateSequences processPhraseTable processLexicalTable queryPhraseTable queryLexicalTable programsMin programsProbing merge-sorted ;
|
||||
alias programs : 1-1-Extraction TMining generateSequences processPhraseTable processLexicalTable queryPhraseTable queryLexicalTable programsMin programsProbing merge-sorted prunePhraseTable ;
|
||||
|
227
misc/prunePhraseTable.cpp
Normal file
227
misc/prunePhraseTable.cpp
Normal file
@ -0,0 +1,227 @@
|
||||
// $Id$
|
||||
// vim:tabstop=2
|
||||
|
||||
/***********************************************************************
|
||||
Moses - factored phrase-based language decoder
|
||||
Copyright (C) 2014- University of Edinburgh
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
Prune the phrase table using the same translation pruning that Moses uses during decoding.
|
||||
**/
|
||||
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include "moses/InputPath.h"
|
||||
#include "moses/Parameter.h"
|
||||
#include "moses/TranslationModel/PhraseDictionary.h"
|
||||
#include "moses/StaticData.h"
|
||||
|
||||
#include "util/file_piece.hh"
|
||||
#include "util/string_piece.hh"
|
||||
#include "util/tokenize_piece.hh"
|
||||
#include "util/double-conversion/double-conversion.h"
|
||||
#include "util/exception.hh"
|
||||
|
||||
|
||||
using namespace Moses;
|
||||
using namespace std;
|
||||
|
||||
namespace po = boost::program_options;
|
||||
typedef multimap<float,string> Lines;
|
||||
|
||||
static void usage(const po::options_description& desc, char** argv) {
|
||||
cerr << "Usage: " + string(argv[0]) + " [options] input-file output-file" << endl;
|
||||
cerr << desc << endl;
|
||||
}
|
||||
|
||||
//Find top n translations of source, and send them to output
|
||||
static void outputTopN(Lines lines, size_t maxPhrases, ostream& out) {
|
||||
size_t count = 0;
|
||||
for (Lines::const_reverse_iterator i = lines.rbegin(); i != lines.rend(); ++i) {
|
||||
out << i->second << endl;
|
||||
++count;
|
||||
if (count >= maxPhrases) break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
static void outputTopN(const Phrase& sourcePhrase, const multimap<float,const TargetPhrase*>& targetPhrases,
|
||||
size_t maxPhrases, const PhraseDictionary* phraseTable,
|
||||
const vector<FactorType> & input, const vector<FactorType> & output, ostream& out) {
|
||||
size_t count = 0;
|
||||
for (multimap<float,const TargetPhrase*>::const_reverse_iterator i
|
||||
= targetPhrases.rbegin(); i != targetPhrases.rend() && count < maxPhrases; ++i, ++count) {
|
||||
const TargetPhrase* targetPhrase = i->second;
|
||||
out << sourcePhrase.GetStringRep(input);
|
||||
out << " ||| ";
|
||||
out << targetPhrase->GetStringRep(output);
|
||||
out << " ||| ";
|
||||
const ScoreComponentCollection scores = targetPhrase->GetScoreBreakdown();
|
||||
vector<float> phraseScores = scores.GetScoresForProducer(phraseTable);
|
||||
for (size_t j = 0; j < phraseScores.size(); ++j) {
|
||||
out << exp(phraseScores[j]) << " ";
|
||||
}
|
||||
out << "||| ";
|
||||
const AlignmentInfo& align = targetPhrase->GetAlignTerm();
|
||||
for (AlignmentInfo::const_iterator j = align.begin(); j != align.end(); ++j) {
|
||||
out << j->first << "-" << j->second << " ";
|
||||
}
|
||||
out << endl;
|
||||
}
|
||||
}*/
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
bool help;
|
||||
string input_file;
|
||||
string config_file;
|
||||
size_t maxPhrases = 100;
|
||||
|
||||
|
||||
po::options_description desc("Allowed options");
|
||||
desc.add_options()
|
||||
("help,h", po::value(&help)->zero_tokens()->default_value(false), "Print this help message and exit")
|
||||
("input-file,i", po::value<string>(&input_file), "Input file")
|
||||
("config-file,f", po::value<string>(&config_file), "Config file")
|
||||
("max-phrases,n", po::value<size_t>(&maxPhrases), "Maximum target phrases per source phrase")
|
||||
;
|
||||
|
||||
po::options_description cmdline_options;
|
||||
cmdline_options.add(desc);
|
||||
po::variables_map vm;
|
||||
po::parsed_options parsed = po::command_line_parser(argc,argv).
|
||||
options(cmdline_options).run();
|
||||
po::store(parsed, vm);
|
||||
po::notify(vm);
|
||||
if (help) {
|
||||
usage(desc, argv);
|
||||
exit(0);
|
||||
}
|
||||
if (input_file.empty()) {
|
||||
cerr << "ERROR: Please specify an input file" << endl << endl;
|
||||
usage(desc, argv);
|
||||
exit(1);
|
||||
}
|
||||
if (config_file.empty()) {
|
||||
cerr << "ERROR: Please specify a config file" << endl << endl;
|
||||
usage(desc, argv);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
vector<string> mosesargs;
|
||||
mosesargs.push_back(argv[0]);
|
||||
mosesargs.push_back("-f");
|
||||
mosesargs.push_back(config_file);
|
||||
|
||||
boost::scoped_ptr<Parameter> params(new Parameter());
|
||||
char** mosesargv = new char*[mosesargs.size()];
|
||||
for (size_t i = 0; i < mosesargs.size(); ++i) {
|
||||
mosesargv[i] = new char[mosesargs[i].length() + 1];
|
||||
strcpy(mosesargv[i], mosesargs[i].c_str());
|
||||
}
|
||||
|
||||
if (!params->LoadParam(mosesargs.size(), mosesargv)) {
|
||||
params->Explain();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!StaticData::LoadDataStatic(params.get(),argv[0])) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
|
||||
//Find the phrase table to manage the target phrases
|
||||
PhraseDictionary* phraseTable = NULL;
|
||||
const vector<FeatureFunction*>& ffs = FeatureFunction::GetFeatureFunctions();
|
||||
for (size_t i = 0; i < ffs.size(); ++i) {
|
||||
PhraseDictionary* maybePhraseTable = dynamic_cast< PhraseDictionary*>(ffs[i]);
|
||||
if (maybePhraseTable) {
|
||||
UTIL_THROW_IF(phraseTable,util::Exception,"Can only score translations with one phrase table");
|
||||
phraseTable = maybePhraseTable;
|
||||
}
|
||||
}
|
||||
UTIL_THROW_IF(!phraseTable,util::Exception,"Unable to find scoring phrase table");
|
||||
|
||||
|
||||
//
|
||||
//Load and prune the phrase table. This is taken (with mods) from moses/TranslationModel/RuleTable/LoaderStandard.cpp
|
||||
//
|
||||
|
||||
std::ostream *progress = NULL;
|
||||
IFVERBOSE(1) progress = &std::cerr;
|
||||
util::FilePiece in(input_file.c_str(), progress);
|
||||
|
||||
// reused variables
|
||||
vector<float> scoreVector;
|
||||
StringPiece line;
|
||||
|
||||
double_conversion::StringToDoubleConverter converter(double_conversion::StringToDoubleConverter::NO_FLAGS, NAN, NAN, "inf", "nan");
|
||||
|
||||
string previous;
|
||||
Lines lines;
|
||||
|
||||
|
||||
while(true) {
|
||||
try {
|
||||
line = in.ReadLine();
|
||||
} catch (const util::EndOfFileException &e) {
|
||||
break;
|
||||
}
|
||||
|
||||
util::TokenIter<util::MultiCharacter> pipes(line, "|||");
|
||||
StringPiece sourcePhraseString(*pipes);
|
||||
StringPiece targetPhraseString(*++pipes);
|
||||
StringPiece scoreString(*++pipes);
|
||||
scoreVector.clear();
|
||||
for (util::TokenIter<util::AnyCharacter, true> s(scoreString, " \t"); s; ++s) {
|
||||
int processed;
|
||||
float score = converter.StringToFloat(s->data(), s->length(), &processed);
|
||||
UTIL_THROW_IF2(isnan(score), "Bad score " << *s);
|
||||
scoreVector.push_back(FloorScore(TransformScore(score)));
|
||||
}
|
||||
|
||||
if (sourcePhraseString != previous) {
|
||||
outputTopN(lines, maxPhrases, cout);
|
||||
previous = sourcePhraseString.as_string();
|
||||
lines.clear();
|
||||
}
|
||||
|
||||
ScoreComponentCollection scores;
|
||||
scores.Assign(phraseTable,scoreVector);
|
||||
float score = scores.InnerProduct(staticData.GetAllWeights());
|
||||
lines.insert(pair<float,string>(score,line.as_string()));
|
||||
|
||||
}
|
||||
if (!lines.empty()) {
|
||||
outputTopN(lines, maxPhrases, cout);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,150 +0,0 @@
|
||||
// $Id$
|
||||
|
||||
/***********************************************************************
|
||||
Moses - factored phrase-based language decoder
|
||||
Copyright (c) 2006 University of Edinburgh
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the University of Edinburgh nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
***********************************************************************/
|
||||
|
||||
// example file on how to use moses library
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include "moses/TypeDef.h"
|
||||
#include "moses/Sentence.h"
|
||||
#include "moses/FactorTypeSet.h"
|
||||
#include "moses/ChartKBestExtractor.h"
|
||||
#include "moses/OutputCollector.h"
|
||||
#include "moses/ChartHypothesis.h"
|
||||
#include "search/applied.hh"
|
||||
#include "moses/ChartManager.h"
|
||||
|
||||
namespace Moses
|
||||
{
|
||||
class FactorCollection;
|
||||
class ScoreComponentCollection;
|
||||
}
|
||||
|
||||
namespace MosesChartCmd
|
||||
{
|
||||
|
||||
/** Helper class that holds misc variables to write data out to command line.
|
||||
*/
|
||||
class IOWrapper
|
||||
{
|
||||
protected:
|
||||
typedef std::vector<std::pair<Moses::Word, Moses::WordsRange> > ApplicationContext;
|
||||
|
||||
long m_translationId;
|
||||
|
||||
const std::vector<Moses::FactorType> &m_inputFactorOrder;
|
||||
const std::vector<Moses::FactorType> &m_outputFactorOrder;
|
||||
const Moses::FactorMask &m_inputFactorUsed;
|
||||
std::ostream *m_outputSearchGraphStream;
|
||||
std::ostream *m_detailedTranslationReportingStream;
|
||||
std::ostream *m_detailedTreeFragmentsTranslationReportingStream;
|
||||
//DIMw
|
||||
std::ostream *m_detailedAllTranslationReportingStream;
|
||||
std::ostream *m_alignmentInfoStream;
|
||||
std::ostream *m_unknownsStream;
|
||||
std::string m_inputFilePath;
|
||||
std::istream *m_inputStream;
|
||||
Moses::OutputCollector *m_detailOutputCollector;
|
||||
Moses::OutputCollector *m_detailTreeFragmentsOutputCollector;
|
||||
//DIMw
|
||||
Moses::OutputCollector *m_detailAllOutputCollector;
|
||||
Moses::OutputCollector *m_nBestOutputCollector;
|
||||
Moses::OutputCollector *m_searchGraphOutputCollector;
|
||||
Moses::OutputCollector *m_singleBestOutputCollector;
|
||||
Moses::OutputCollector *m_alignmentInfoCollector;
|
||||
Moses::OutputCollector *m_unknownsCollector;
|
||||
|
||||
typedef std::set< std::pair<size_t, size_t> > Alignments;
|
||||
std::size_t OutputAlignmentNBest(Alignments &retAlign, const Moses::ChartKBestExtractor::Derivation &derivation, std::size_t startTarget);
|
||||
size_t OutputAlignment(Alignments &retAlign, const Moses::ChartHypothesis *hypo, size_t startTarget);
|
||||
void OutputAlignment(std::vector< std::set<size_t> > &retAlignmentsS2T, const Moses::AlignmentInfo &ai);
|
||||
void OutputTranslationOption(std::ostream &out, ApplicationContext &applicationContext, const Moses::ChartHypothesis *hypo, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputTranslationOption(std::ostream &out, ApplicationContext &applicationContext, const search::Applied *applied, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputTranslationOptions(std::ostream &out, ApplicationContext &applicationContext, const Moses::ChartHypothesis *hypo, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputTranslationOptions(std::ostream &out, ApplicationContext &applicationContext, const search::Applied *applied, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputTreeFragmentsTranslationOptions(std::ostream &out, ApplicationContext &applicationContext, const Moses::ChartHypothesis *hypo, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputTreeFragmentsTranslationOptions(std::ostream &out, ApplicationContext &applicationContext, const search::Applied *applied, const Moses::Sentence &sentence, long translationId);
|
||||
void ReconstructApplicationContext(const Moses::ChartHypothesis &hypo,
|
||||
const Moses::Sentence &sentence,
|
||||
ApplicationContext &context);
|
||||
void ReconstructApplicationContext(const search::Applied *applied,
|
||||
const Moses::Sentence &sentence,
|
||||
ApplicationContext &context);
|
||||
void WriteApplicationContext(std::ostream &out,
|
||||
const ApplicationContext &context);
|
||||
|
||||
void OutputAllFeatureScores(const Moses::ScoreComponentCollection &features
|
||||
, std::ostream &out);
|
||||
void OutputFeatureScores( std::ostream& out
|
||||
, const Moses::ScoreComponentCollection &features
|
||||
, const Moses::FeatureFunction *ff
|
||||
, std::string &lastName );
|
||||
|
||||
public:
|
||||
IOWrapper(const std::vector<Moses::FactorType> &inputFactorOrder
|
||||
, const std::vector<Moses::FactorType> &outputFactorOrder
|
||||
, const Moses::FactorMask &inputFactorUsed
|
||||
, size_t nBestSize
|
||||
, const std::string &nBestFilePath
|
||||
, const std::string &inputFilePath="");
|
||||
~IOWrapper();
|
||||
|
||||
Moses::InputType* GetInput(Moses::InputType *inputType);
|
||||
void OutputBestHypo(const Moses::ChartHypothesis *hypo, long translationId);
|
||||
void OutputBestHypo(search::Applied applied, long translationId);
|
||||
void OutputBestHypo(const std::vector<const Moses::Factor*>& mbrBestHypo, long translationId);
|
||||
void OutputBestNone(long translationId);
|
||||
void OutputNBestList(const std::vector<boost::shared_ptr<Moses::ChartKBestExtractor::Derivation> > &nBestList, long translationId);
|
||||
void OutputNBestList(const std::vector<search::Applied> &nbest, long translationId);
|
||||
void OutputDetailedTranslationReport(const Moses::ChartHypothesis *hypo, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputDetailedTranslationReport(const search::Applied *applied, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputDetailedTreeFragmentsTranslationReport(const Moses::ChartHypothesis *hypo, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputDetailedTreeFragmentsTranslationReport(const search::Applied *applied, const Moses::Sentence &sentence, long translationId);
|
||||
void OutputDetailedAllTranslationReport(const std::vector<boost::shared_ptr<Moses::ChartKBestExtractor::Derivation> > &nBestList, const Moses::ChartManager &manager, const Moses::Sentence &sentence, long translationId);
|
||||
void Backtrack(const Moses::ChartHypothesis *hypo);
|
||||
|
||||
void ResetTranslationId();
|
||||
|
||||
Moses::OutputCollector *GetSearchGraphOutputCollector() {
|
||||
return m_searchGraphOutputCollector;
|
||||
}
|
||||
|
||||
void OutputAlignment(size_t translationId , const Moses::ChartHypothesis *hypo);
|
||||
void OutputUnknowns(const std::vector<Moses::Phrase*> &, long);
|
||||
|
||||
static void FixPrecision(std::ostream &, size_t size=3);
|
||||
};
|
||||
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
exe moses_chart : Main.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp ../moses//moses $(TOP)//boost_iostreams ..//boost_filesystem ..//z ;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user