diff options
author | Kenneth Heafield <kenlm@kheafield.com> | 2012-02-10 14:13:44 -0500 |
---|---|---|
committer | Kenneth Heafield <kenlm@kheafield.com> | 2012-02-10 14:13:44 -0500 |
commit | 79c3acac4ea3e19e9626b7d104f6331b2f4b55fc (patch) | |
tree | 2f3ffdc4480c30903d28dde4e9dca712120251d3 | |
parent | 99f221dfd9b1c086baca8b675920f4aecea8aca9 (diff) | |
parent | 3b1851c8c4e5e7bec3e83177b5c08e566890517c (diff) |
Merge branch 'master' of github.com:redpony/cdec
-rwxr-xr-x | gi/pf/guess-translits.pl | 1 | ||||
-rw-r--r-- | training/Makefile.am | 4 | ||||
-rw-r--r-- | utils/Makefile.am | 4 | ||||
-rw-r--r-- | utils/atools.cc (renamed from training/atools.cc) | 13 |
4 files changed, 10 insertions, 12 deletions
diff --git a/gi/pf/guess-translits.pl b/gi/pf/guess-translits.pl index ab737121..aafec13a 100755 --- a/gi/pf/guess-translits.pl +++ b/gi/pf/guess-translits.pl @@ -28,6 +28,7 @@ while(<STDIN>) { my %b2a; for my $ap (@as) { my ($a,$b) = split /-/, $ap; + die "BAD INPUT: $_\n" unless defined $a && defined $b; $a2b{$a}->{$b} = 1; $b2a{$b}->{$a} = 1; } diff --git a/training/Makefile.am b/training/Makefile.am index 2a11ae52..d2f1ccc5 100644 --- a/training/Makefile.am +++ b/training/Makefile.am @@ -6,7 +6,6 @@ bin_PROGRAMS = \ mr_reduce_to_weights \ mr_optimize_reduce \ grammar_convert \ - atools \ plftools \ collapse_weights \ mpi_extract_reachable \ @@ -47,9 +46,6 @@ augment_grammar_LDADD = $(top_srcdir)/decoder/libcdec.a $(top_srcdir)/mteval/lib test_ngram_SOURCES = test_ngram.cc test_ngram_LDADD = $(top_srcdir)/decoder/libcdec.a $(top_srcdir)/mteval/libmteval.a $(top_srcdir)/utils/libutils.a ../klm/lm/libklm.a ../klm/util/libklm_util.a -lz -atools_SOURCES = atools.cc -atools_LDADD = $(top_srcdir)/decoder/libcdec.a $(top_srcdir)/utils/libutils.a -lz - model1_SOURCES = model1.cc ttables.cc model1_LDADD = $(top_srcdir)/decoder/libcdec.a $(top_srcdir)/utils/libutils.a -lz diff --git a/utils/Makefile.am b/utils/Makefile.am index a1ea8270..6e0678de 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,5 +1,5 @@ -bin_PROGRAMS = reconstruct_weights +bin_PROGRAMS = reconstruct_weights atools noinst_PROGRAMS = ts phmt mfcr_test TESTS = ts phmt mfcr_test @@ -17,6 +17,8 @@ endif reconstruct_weights_SOURCES = reconstruct_weights.cc +atools_SOURCES = atools.cc + noinst_LIBRARIES = libutils.a libutils_a_SOURCES = \ diff --git a/training/atools.cc b/utils/atools.cc index 42579627..c0a91731 100644 --- a/training/atools.cc +++ b/utils/atools.cc @@ -8,7 +8,6 @@ #include <boost/shared_ptr.hpp> #include "filelib.h" -#include "aligner.h" #include "alignment_pharaoh.h" namespace po = boost::program_options; @@ -79,7 +78,7 @@ struct FMeasureCommand : public Command { struct DisplayCommand : public Command { string Name() const { return "display"; } bool RequiresTwoOperands() const { return false; } - void Apply(const Array2D<bool>& in, const Array2D<bool>¬_used, Array2D<bool>* x) { + void Apply(const Array2D<bool>& in, const Array2D<bool>&, Array2D<bool>* x) { *x = in; cout << *x << endl; } @@ -88,7 +87,7 @@ struct DisplayCommand : public Command { struct ConvertCommand : public Command { string Name() const { return "convert"; } bool RequiresTwoOperands() const { return false; } - void Apply(const Array2D<bool>& in, const Array2D<bool>¬_used, Array2D<bool>* x) { + void Apply(const Array2D<bool>& in, const Array2D<bool>&, Array2D<bool>* x) { *x = in; } }; @@ -96,7 +95,7 @@ struct ConvertCommand : public Command { struct InvertCommand : public Command { string Name() const { return "invert"; } bool RequiresTwoOperands() const { return false; } - void Apply(const Array2D<bool>& in, const Array2D<bool>¬_used, Array2D<bool>* x) { + void Apply(const Array2D<bool>& in, const Array2D<bool>&, Array2D<bool>* x) { Array2D<bool>& res = *x; res.resize(in.height(), in.width()); for (int i = 0; i < in.height(); ++i) @@ -268,15 +267,15 @@ map<string, boost::shared_ptr<Command> > commands; void InitCommandLine(int argc, char** argv, po::variables_map* conf) { po::options_description opts("Configuration options"); ostringstream os; - os << "[REQ] Operation to perform:"; + os << "Operation to perform:"; for (map<string, boost::shared_ptr<Command> >::iterator it = commands.begin(); it != commands.end(); ++it) { os << ' ' << it->first; } string cstr = os.str(); opts.add_options() - ("input_1,i", po::value<string>(), "[REQ] Alignment 1 file, - for STDIN") - ("input_2,j", po::value<string>(), "[OPT] Alignment 2 file, - for STDIN") + ("input_1,i", po::value<string>(), "[REQUIRED] Alignment 1 file, - for STDIN") + ("input_2,j", po::value<string>(), "Alignment 2 file, - for STDIN") ("command,c", po::value<string>()->default_value("convert"), cstr.c_str()) ("help,h", "Print this help message and exit"); po::options_description clo("Command line options"); |