diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-09-12 15:07:44 +0100 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-09-12 15:07:44 +0100 |
commit | 7f4c0920a290191775e091334581bcc21e6ec9e4 (patch) | |
tree | f24409d6e76e251b4f75124cb269a0ff9be00c27 /klm/alone/just_vocab.cc | |
parent | c26c35a9bcbb4d42ae50ad0a75c1b5fb59702bd1 (diff) |
Add the alone stuff, using a wrapper to the edge class.
Diffstat (limited to 'klm/alone/just_vocab.cc')
-rw-r--r-- | klm/alone/just_vocab.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/klm/alone/just_vocab.cc b/klm/alone/just_vocab.cc new file mode 100644 index 00000000..35aea5ed --- /dev/null +++ b/klm/alone/just_vocab.cc @@ -0,0 +1,14 @@ +#include "alone/read.hh" +#include "util/file_piece.hh" + +#include <iostream> + +int main() { + util::FilePiece f(0, "stdin", &std::cerr); + while (true) { + try { + alone::JustVocab(f, std::cout); + } catch (const util::EndOfFileException &e) { break; } + std::cout << '\n'; + } +} |