diff options
author | Chris Dyer <redpony@gmail.com> | 2010-01-18 21:57:23 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2010-01-18 21:57:23 -0500 |
commit | a216521744cd4bf1c9935d99c5e53e4198301b57 (patch) | |
tree | 40eadfa52a7a28687857107927345f76dd73bdad /training | |
parent | a8a6ba7789074cd87b197a3d43da82ec11c3f4b5 (diff) |
add alignment visualization tool
Diffstat (limited to 'training')
-rw-r--r-- | training/atools.cc | 10 |
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>¬_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>(); |