summaryrefslogtreecommitdiff
path: root/fast/main.cc
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-08-17 07:51:16 +0100
committerPatrick Simianer <p@simianer.de>2014-08-17 07:51:16 +0100
commit190f68c880eb27506669e95e2bc0493e2ec42c4c (patch)
tree26dbe66018a966613b2bf59761661131057a6ef5 /fast/main.cc
parent0b3cdb4ae2fa176ba74a48ff7a1616395079c151 (diff)
functional again
Diffstat (limited to 'fast/main.cc')
-rw-r--r--fast/main.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/fast/main.cc b/fast/main.cc
index 59e25d5..08fcfcf 100644
--- a/fast/main.cc
+++ b/fast/main.cc
@@ -1,4 +1,5 @@
#include "hypergraph.hh"
+#include <ctime>
int
@@ -6,9 +7,9 @@ main(int argc, char** argv)
{
Hg::Hypergraph hg;
G::Grammar g;
-//Hg::io::read(hg, g.rules, argv[1]);
- Hg::io::manual(hg, g.rules);
-
+ Hg::io::read(hg, g.rules, argv[1]);
+ //Hg::io::manual(hg, g.rules);
+ clock_t begin = clock();
Hg::Path p;
Hg::viterbi_path(hg, p);
vector<string> s;
@@ -16,7 +17,9 @@ main(int argc, char** argv)
for (auto it: s)
cout << it << " ";
cout << endl;
-
+ clock_t end = clock();
+ double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;
+ cout << elapsed_secs << " s" << endl;
return 0;
}