From a216521744cd4bf1c9935d99c5e53e4198301b57 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 18 Jan 2010 21:57:23 -0500 Subject: add alignment visualization tool --- training/atools.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/training/atools.cc b/training/atools.cc index cf238371..85806bdb 100644 --- a/training/atools.cc +++ b/training/atools.cc @@ -75,6 +75,15 @@ struct FMeasureCommand : public Command { int num_in_ref; }; +struct DisplayCommand : public Command { + string Name() const { return "display"; } + bool RequiresTwoOperands() const { return false; } + void Apply(const Array2D& in, const Array2D¬_used, Array2D* x) { + *x = in; + cout << *x << endl; + } +}; + struct ConvertCommand : public Command { string Name() const { return "convert"; } bool RequiresTwoOperands() const { return false; } @@ -309,6 +318,7 @@ template static void AddCommand() { int main(int argc, char **argv) { AddCommand(); + AddCommand(); AddCommand(); AddCommand(); AddCommand(); -- cgit v1.2.3