summaryrefslogtreecommitdiff
path: root/decoder/apply_models.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-02-10 18:45:13 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-02-10 18:45:13 -0500
commit9a695967a5e4efc987b61bb3df90c0558c678512 (patch)
tree2ba3feb890e5fa1565fdffed6b58756d5ab30e08 /decoder/apply_models.h
parent70fdb6cd8774cbd0114fe0d630781bab309e0d87 (diff)
multipass decoding
Diffstat (limited to 'decoder/apply_models.h')
-rw-r--r--decoder/apply_models.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/decoder/apply_models.h b/decoder/apply_models.h
index 81fa068e..a85694aa 100644
--- a/decoder/apply_models.h
+++ b/decoder/apply_models.h
@@ -1,6 +1,8 @@
#ifndef _APPLY_MODELS_H_
#define _APPLY_MODELS_H_
+#include <iostream>
+
struct ModelSet;
struct Hypergraph;
struct SentenceMetadata;
@@ -20,6 +22,14 @@ enum {
IntersectionConfiguration(exhaustive_t /* t */) : algorithm(0), pop_limit() {}
};
+inline std::ostream& operator<<(std::ostream& os, const IntersectionConfiguration& c) {
+ if (c.algorithm == 0) { os << "FULL"; }
+ else if (c.algorithm == 1) { os << "CUBE:k=" << c.pop_limit; }
+ else if (c.algorithm == 2) { os << "N_ALGORITHMS"; }
+ else os << "OTHER";
+ return os;
+}
+
void ApplyModelSet(const Hypergraph& in,
const SentenceMetadata& smeta,
const ModelSet& models,