From cdc8f8f37f439d543c40723b47a1460b633fb227 Mon Sep 17 00:00:00 2001 From: Ulrich Germann Date: Mon, 28 Oct 2013 21:59:05 +0000 Subject: [PATCH] Fixed header includes to reflect recent reorganization of the file structure by HH. --- moses/TranslationModel/UG/mm/Jamfile | 16 ++++++++-------- moses/TranslationModel/UG/mm/Makefile | 8 ++++---- moses/TranslationModel/UG/mm/custom-pt.cc | 6 +++--- moses/TranslationModel/UG/mm/mmlex-build.cc | 2 +- moses/TranslationModel/UG/mm/mtt-build.cc | 9 +++++---- moses/TranslationModel/UG/mm/mtt.count.cc | 8 ++++---- moses/TranslationModel/UG/mm/symal2mam.cc | 4 ++-- moses/TranslationModel/UG/mm/ug_bitext.h | 10 +++++----- .../UG/mm/ug_lexical_phrase_scorer2.h | 2 +- moses/TranslationModel/UG/mm/ug_mmbitext.h | 6 +++--- .../TranslationModel/UG/mm/ug_tsa_array_entry.cc | 2 +- 11 files changed, 37 insertions(+), 36 deletions(-) diff --git a/moses/TranslationModel/UG/mm/Jamfile b/moses/TranslationModel/UG/mm/Jamfile index 6ec6e879a..4d23a2f40 100644 --- a/moses/TranslationModel/UG/mm/Jamfile +++ b/moses/TranslationModel/UG/mm/Jamfile @@ -1,36 +1,36 @@ exe mtt-build : mtt-build.cc -$(TOP)/moses/generic//generic +$(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams $(TOP)//boost_program_options -$(TOP)/moses/mm//mm +$(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/util//kenutil ; exe mtt-dump : mtt-dump.cc -$(TOP)/moses/generic//generic +$(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams $(TOP)//boost_program_options -$(TOP)/moses/mm//mm +$(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/util//kenutil ; exe symal2mam : symal2mam.cc -$(TOP)/moses/generic//generic +$(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams $(TOP)//boost_program_options -$(TOP)/moses/mm//mm +$(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/util//kenutil ; exe custom-pt : custom-pt.cc -$(TOP)/moses/generic//generic +#$(TOP)/moses/generic//generic $(TOP)//boost_iostreams $(TOP)//boost_program_options -$(TOP)/moses/mm//mm +$(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/util//kenutil ; diff --git a/moses/TranslationModel/UG/mm/Makefile b/moses/TranslationModel/UG/mm/Makefile index 48281953a..117752ee5 100644 --- a/moses/TranslationModel/UG/mm/Makefile +++ b/moses/TranslationModel/UG/mm/Makefile @@ -28,9 +28,9 @@ MAKEFLAGS += --warn-undefined-variables HOST ?= $(shell hostname) HOSTTYPE ?= $(shell uname -m) -MOSES_ROOT = ${HOME}/code/moses/master/mosesdecoder +MOSES_ROOT = ${HOME}/code/mosesdecoder WDIR = build/${HOSTTYPE}/${OPTI} -VPATH = ${HOME}/code/moses/master/mosesdecoder/ +VPATH = ${HOME}/code/mosesdecoder/ CXXFLAGS = ${PROF} -ggdb -Wall -O${OPTI} ${INCLUDES} CXXFLAGS += -DMAX_NUM_FACTORS=4 CXXFLAGS += -DKENLM_MAX_ORDER=5 @@ -50,7 +50,7 @@ REQLIBS = m z pthread lzma ${BZLIB} \ # icuuc icuio icui18n \ LIBS = $(addprefix -l, ${REQLIBS} moses) -LIBDIRS = -L${HOME}/code/moses/master/mosesdecoder/lib +LIBDIRS = -L${HOME}/code/mosesdecoder/lib BINDIR = bin ifeq "$(OPTI)" "0" BINPREF = debug. @@ -81,7 +81,7 @@ clean: custom-pt: ${BINDIR}/${BINPREF}custom-pt echo $^ -INMOGEN = $(wildcard ${MOSES_ROOT}/moses/generic/*/*.cpp) +INMOGEN = $(wildcard ${MOSES_ROOT}/moses/TranslationModel/UG/generic/*/*.cpp) OBJ = $(patsubst %.cc,%.o,$(wildcard $(patsubst %.h,%.cc,$(wildcard *.h)))) OBJ += $(patsubst %.cpp,%.o,${INMOGEN}) EXE = $(patsubst %.cc,%.o,$(filter-out $(patsubst %.h,%.cc,$(wildcard *.h)),$(wildcard *.cc))) diff --git a/moses/TranslationModel/UG/mm/custom-pt.cc b/moses/TranslationModel/UG/mm/custom-pt.cc index a7fb4ebde..b7d19d498 100644 --- a/moses/TranslationModel/UG/mm/custom-pt.cc +++ b/moses/TranslationModel/UG/mm/custom-pt.cc @@ -8,9 +8,9 @@ #include #include -#include "moses/generic/sorting/VectorIndexSorter.h" -#include "moses/generic/sampling/Sampling.h" -#include "moses/generic/file_io/ug_stream.h" +#include "moses/TranslationModel/UG/generic/sorting/VectorIndexSorter.h" +#include "moses/TranslationModel/UG/generic/sampling/Sampling.h" +#include "moses/TranslationModel/UG/generic/file_io/ug_stream.h" #include #include diff --git a/moses/TranslationModel/UG/mm/mmlex-build.cc b/moses/TranslationModel/UG/mm/mmlex-build.cc index 3855522d0..9acdcd218 100644 --- a/moses/TranslationModel/UG/mm/mmlex-build.cc +++ b/moses/TranslationModel/UG/mm/mmlex-build.cc @@ -15,7 +15,7 @@ #include #include -#include "moses/generic/program_options/ug_get_options.h" +#include "moses/TranslationModel/UG/generic/program_options/ug_get_options.h" // #include "ug_translation_finder.h" // #include "ug_sorters.h" // #include "ug_corpus_sampling.h" diff --git a/moses/TranslationModel/UG/mm/mtt-build.cc b/moses/TranslationModel/UG/mm/mtt-build.cc index 1e7474a6a..31a893bd9 100644 --- a/moses/TranslationModel/UG/mm/mtt-build.cc +++ b/moses/TranslationModel/UG/mm/mtt-build.cc @@ -25,12 +25,13 @@ #include "ug_mm_ttrack.h" #include "tpt_pickler.h" #include "ug_deptree.h" -#include "moses/generic/sorting/VectorIndexSorter.h" +#include "moses/TranslationModel/UG/generic/sorting/VectorIndexSorter.h" #include "ug_im_tsa.h" using namespace std; using namespace ugdiss; using namespace Moses; +using namespace boost; namespace po=boost::program_options; int with_pfas; @@ -360,10 +361,10 @@ build_mmTSA(string infile, string outfile) { size_t mypid = fork(); if(mypid) return mypid; - mmTtrack T(infile); + shared_ptr > T(new mmTtrack(infile)); bdBitset filter; - filter.resize(T.size(),true); - imTSA S(&T,filter,(quiet?NULL:&cerr)); + filter.resize(T->size(),true); + imTSA S(T,filter,(quiet?NULL:&cerr)); S.save_as_mm_tsa(outfile); exit(0); } diff --git a/moses/TranslationModel/UG/mm/mtt.count.cc b/moses/TranslationModel/UG/mm/mtt.count.cc index fce01106e..423c12ec7 100644 --- a/moses/TranslationModel/UG/mm/mtt.count.cc +++ b/moses/TranslationModel/UG/mm/mtt.count.cc @@ -11,11 +11,11 @@ #include #include "ug_typedefs.h" #include "tpt_pickler.h" -#include "moses/generic/sorting/VectorIndexSorter.h" -#include "moses/generic/sampling/Sampling.h" -#include "moses/generic/file_io/ug_stream.h" +#include "moses/TranslationModel/UG/generic/sorting/VectorIndexSorter.h" +#include "moses/TranslationModel/UG/generic/sampling/Sampling.h" +#include "moses/TranslationModel/UG/generic/file_io/ug_stream.h" #include -#include "moses/generic/program_options/ug_get_options.h" +#include "moses/TranslationModel/UG/generic/program_options/ug_get_options.h" using namespace std; using namespace ugdiss; diff --git a/moses/TranslationModel/UG/mm/symal2mam.cc b/moses/TranslationModel/UG/mm/symal2mam.cc index 8fa97df0d..2dcffd02a 100644 --- a/moses/TranslationModel/UG/mm/symal2mam.cc +++ b/moses/TranslationModel/UG/mm/symal2mam.cc @@ -11,8 +11,8 @@ #include "ug_deptree.h" #include "tpt_tokenindex.h" #include "tpt_pickler.h" -#include "moses/generic/program_options/ug_get_options.h" -#include "moses/generic/file_io/ug_stream.h" +#include "moses/TranslationModel/UG/generic/program_options/ug_get_options.h" +#include "moses/TranslationModel/UG/generic/file_io/ug_stream.h" #include #include diff --git a/moses/TranslationModel/UG/mm/ug_bitext.h b/moses/TranslationModel/UG/mm/ug_bitext.h index 534be2f1e..31773f976 100644 --- a/moses/TranslationModel/UG/mm/ug_bitext.h +++ b/moses/TranslationModel/UG/mm/ug_bitext.h @@ -26,9 +26,9 @@ #include #include -#include "moses/generic/sorting/VectorIndexSorter.h" -#include "moses/generic/sampling/Sampling.h" -#include "moses/generic/file_io/ug_stream.h" +#include "moses/TranslationModel/UG/generic/sorting/VectorIndexSorter.h" +#include "moses/TranslationModel/UG/generic/sampling/Sampling.h" +#include "moses/TranslationModel/UG/generic/file_io/ug_stream.h" #include "moses/Util.h" #include "util/exception.hh" @@ -734,8 +734,8 @@ namespace Moses { this->V2->open(base+L2+".tdx"); this->V2->iniReverseIndex(); mmTSA& i1 = *reinterpret_cast*>(this->I1.get()); mmTSA& i2 = *reinterpret_cast*>(this->I2.get()); - i1.open(base+L1+".sfa", this->T1.get()); - i2.open(base+L2+".sfa", this->T2.get()); + i1.open(base+L1+".sfa", this->T1); + i2.open(base+L2+".sfa", this->T2); assert(this->T1->size() == this->T2->size()); } diff --git a/moses/TranslationModel/UG/mm/ug_lexical_phrase_scorer2.h b/moses/TranslationModel/UG/mm/ug_lexical_phrase_scorer2.h index f04550380..0383676ac 100644 --- a/moses/TranslationModel/UG/mm/ug_lexical_phrase_scorer2.h +++ b/moses/TranslationModel/UG/mm/ug_lexical_phrase_scorer2.h @@ -5,7 +5,7 @@ #ifndef __ug_lexical_phrase_scorer_h #define __ug_lexical_phrase_scorer_h -#include "moses/generic/file_io/ug_stream.h" +#include "moses/TranslationModel/UG/generic/file_io/ug_stream.h" #include "tpt_tokenindex.h" #include #include diff --git a/moses/TranslationModel/UG/mm/ug_mmbitext.h b/moses/TranslationModel/UG/mm/ug_mmbitext.h index 18bc5aa15..e7378e7f6 100644 --- a/moses/TranslationModel/UG/mm/ug_mmbitext.h +++ b/moses/TranslationModel/UG/mm/ug_mmbitext.h @@ -20,9 +20,9 @@ #include #include -#include "moses/generic/sorting/VectorIndexSorter.h" -#include "moses/generic/sampling/Sampling.h" -#include "moses/generic/file_io/ug_stream.h" +#include "moses/TranslationModel/UG/generic/sorting/VectorIndexSorter.h" +#include "moses/TranslationModel/UG/generic/sampling/Sampling.h" +#include "moses/TranslationModel/UG/generic/file_io/ug_stream.h" #include "ug_typedefs.h" #include "ug_mm_ttrack.h" diff --git a/moses/TranslationModel/UG/mm/ug_tsa_array_entry.cc b/moses/TranslationModel/UG/mm/ug_tsa_array_entry.cc index f19f047c0..2eb3f7a1f 100644 --- a/moses/TranslationModel/UG/mm/ug_tsa_array_entry.cc +++ b/moses/TranslationModel/UG/mm/ug_tsa_array_entry.cc @@ -1,6 +1,6 @@ #include "ug_tsa_array_entry.h" #include "ug_ttrack_position.h" -#include "moses/generic/sampling/Sampling.h" +#include "moses/TranslationModel/UG/generic/sampling/Sampling.h" // (c) 2007-2010 Ulrich Germann