summaryrefslogtreecommitdiff
path: root/training
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2010-01-18 21:57:23 -0500
committerChris Dyer <redpony@gmail.com>2010-01-18 21:57:23 -0500
commita216521744cd4bf1c9935d99c5e53e4198301b57 (patch)
tree40eadfa52a7a28687857107927345f76dd73bdad /training
parenta8a6ba7789074cd87b197a3d43da82ec11c3f4b5 (diff)
add alignment visualization tool
Diffstat (limited to 'training')
-rw-r--r--training/atools.cc10
1 files changed, 10 insertions, 0 deletions
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<bool>& in, const Array2D<bool>&not_used, Array2D<bool>* 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<class C> static void AddCommand() {
int main(int argc, char **argv) {
AddCommand<ConvertCommand>();
+ AddCommand<DisplayCommand>();
AddCommand<InvertCommand>();
AddCommand<IntersectCommand>();
AddCommand<UnionCommand>();