From 93618c0fcce1544bf948172d04e764f53073cf8a Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 10 Feb 2011 18:45:13 -0500 Subject: multipass decoding --- decoder/apply_models.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'decoder/apply_models.h') 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 + 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, -- cgit v1.2.3