Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorBarry Haddow <barry.haddow@gmail.com>2011-12-09 03:17:30 +0400
committerBarry Haddow <barry.haddow@gmail.com>2011-12-09 03:17:30 +0400
commit072848a4dfe3fac6c1398684bea46020611f9e3a (patch)
tree4b6a97f423ab929191802787c0983844afd9fd6d /misc
parent15091ab70ce249cb1c7b714d13fd5f477ddab3bf (diff)
parentcb5213ac438abb24a75dfdff5f7b8b7558518267 (diff)
Merge branch 'master' into bjam. Doesn't compile.
Conflicts: .gitignore Makefile.am config.h.in configure.in m4/boost.m4 moses/src/LM/Factory.cpp moses/src/LM/ParallelBackoff.h moses/src/LM/RandLM.h moses/src/Makefile.am moses/src/PDTAimp.h moses/src/Phrase.h moses/src/PhraseDictionaryTree.cpp moses/src/ScoreComponentCollection.h moses/src/ScoreIndexManager.cpp moses/src/StaticData.cpp moses/src/TargetPhrase.cpp moses/src/TranslationOptionCollection.cpp moses/src/TranslationSystem.cpp scripts/Makefile scripts/released-files
Diffstat (limited to 'misc')
-rw-r--r--misc/GenerateTuples.cpp12
-rw-r--r--misc/Jamfile9
-rw-r--r--misc/Makefile.am16
-rw-r--r--misc/queryLexicalTable.cpp2
4 files changed, 16 insertions, 23 deletions
diff --git a/misc/GenerateTuples.cpp b/misc/GenerateTuples.cpp
index e46e87e06..58e9697fd 100644
--- a/misc/GenerateTuples.cpp
+++ b/misc/GenerateTuples.cpp
@@ -110,7 +110,7 @@ struct GCData {
const std::vector<std::vector<float> >& b)
: pdicts(a),weights(b),totalTuples(0),distinctTuples(0) {
- assert(pdicts.size()==weights.size());
+ CHECK(pdicts.size()==weights.size());
std::set<FactorType> distinctOutFset;
inF.resize(pdicts.size());
outF.resize(pdicts.size());
@@ -152,7 +152,7 @@ void GeneratePerFactorTgtList(size_t factorType,PPtr pptr,GCData& data,Len2Cands
data.pdicts[factorType]->GetTargetCandidates(pptr,cands);
for(std::vector<FactorTgtCand>::const_iterator cand=cands.begin(); cand!=cands.end(); ++cand) {
- assert(data.weights[factorType].size()==cand->second.size());
+ CHECK(data.weights[factorType].size()==cand->second.size());
float costs=std::inner_product(data.weights[factorType].begin(),
data.weights[factorType].end(),
cand->second.begin(),
@@ -176,7 +176,7 @@ void GenerateTupleTgtCands(OutputFactor2TgtCandList& tCand,E2Costs& e2costs,GCDa
if(gotCands) {
// enumerate tuples
- assert(data.DistinctOutFactors()==tCand.size());
+ CHECK(data.DistinctOutFactors()==tCand.size());
std::vector<unsigned> radix(data.DistinctOutFactors());
for(size_t i=0; i<tCand.size(); ++i) radix[i]=tCand[i].size();
@@ -189,7 +189,7 @@ void GenerateTupleTgtCands(OutputFactor2TgtCandList& tCand,E2Costs& e2costs,GCDa
mPhrase e(radix.size());
float costs=0.0;
for(size_t j=0; j<radix.size(); ++j) {
- assert(tuples[radix.size()*i+j]<tCand[j].size());
+ CHECK(tuples[radix.size()*i+j]<tCand[j].size());
std::pair<float,vFactor> const& mycand=tCand[j][tuples[radix.size()*i+j]];
e[j]=mycand.second;
costs+=mycand.first;
@@ -198,7 +198,7 @@ void GenerateTupleTgtCands(OutputFactor2TgtCandList& tCand,E2Costs& e2costs,GCDa
bool mismatch=0;
for(size_t j=1; !mismatch && j<e.size(); ++j)
if(e[j].size()!=e[j-1].size()) mismatch=1;
- assert(mismatch==0);
+ CHECK(mismatch==0);
#endif
std::pair<E2Costs::iterator,bool> p=e2costs.insert(std::make_pair(e,costs));
if(p.second) ++data.distinctTuples;
@@ -244,7 +244,7 @@ void GenerateCandidates(const ConfusionNet& src,
//std::cerr<<"processing state "<<curr<<" stack size: "<<stack.size()<<"\n";
- assert(curr.end()<src.GetSize());
+ CHECK(curr.end()<src.GetSize());
const ConfusionNet::Column &currCol=src[curr.end()];
for(size_t colidx=0; colidx<currCol.size(); ++colidx) {
const Word& w=currCol[colidx].first;
diff --git a/misc/Jamfile b/misc/Jamfile
new file mode 100644
index 000000000..e8a133367
--- /dev/null
+++ b/misc/Jamfile
@@ -0,0 +1,9 @@
+exe processPhraseTable : GenerateTuples.cpp processPhraseTable.cpp ../moses/src//moses ;
+
+exe processLexicalTable : processLexicalTable.cpp ../moses/src//moses ;
+
+exe queryPhraseTable : queryPhraseTable.cpp ../moses/src//moses ;
+
+exe queryLexicalTable : queryLexicalTable.cpp ../moses/src//moses ;
+
+alias programs : processPhraseTable processLexicalTable queryPhraseTable queryLexicalTable ;
diff --git a/misc/Makefile.am b/misc/Makefile.am
deleted file mode 100644
index 729ad2e0b..000000000
--- a/misc/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-bin_PROGRAMS = processPhraseTable processLexicalTable queryLexicalTable queryPhraseTable
-
-processPhraseTable_SOURCES = GenerateTuples.cpp processPhraseTable.cpp
-processLexicalTable_SOURCES = processLexicalTable.cpp
-queryLexicalTable_SOURCES = queryLexicalTable.cpp
-queryPhraseTable_SOURCES = queryPhraseTable.cpp
-
-AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I$(top_srcdir)/moses/src $(BOOST_CPPFLAGS)
-
-processPhraseTable_LDADD = $(top_builddir)/moses/src/libmoses.la -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt $(top_srcdir)/util/libkenutil.la $(top_srcdir)/lm/libkenlm.la $(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS)
-
-processLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt $(top_srcdir)/util/libkenutil.la $(top_srcdir)/lm/libkenlm.la $(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS)
-
-queryLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt $(top_srcdir)/util/libkenutil.la $(top_srcdir)/lm/libkenlm.la $(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS)
-
-queryPhraseTable_LDADD = $(top_builddir)/moses/src/libmoses.la -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt $(top_srcdir)/util/libkenutil.la $(top_srcdir)/lm/libkenlm.la $(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS)
diff --git a/misc/queryLexicalTable.cpp b/misc/queryLexicalTable.cpp
index ef6e741c1..166549267 100644
--- a/misc/queryLexicalTable.cpp
+++ b/misc/queryLexicalTable.cpp
@@ -86,7 +86,7 @@ int main(int argc, char** argv)
if(use_context) {
c_mask.push_back(0);
}
- Phrase e(Output, 0),f(Input, 0),c(Output, 0);
+ Phrase e( 0),f(0),c(0);
e.CreateFromString(e_mask, query_e, "|");
f.CreateFromString(f_mask, query_f, "|");
c.CreateFromString(c_mask, query_c,"|");