#ifndef _APPLY_FSA_MODELS_H_ #define _APPLY_FSA_MODELS_H_ #include #include #include "feature_vector.h" #include "cfg.h" struct FsaFeatureFunction; struct Hypergraph; struct SentenceMetadata; struct ApplyFsaBy { enum { BU_CUBE, BU_FULL, EARLEY, N_ALGORITHMS }; int pop_limit; // only applies to BU_FULL so far bool IsBottomUp() const { return algorithm==BU_FULL || algorithm==BU_CUBE; } int BottomUpAlgorithm() const; int algorithm; std::string name() const; friend inline std::ostream &operator << (std::ostream &o,ApplyFsaBy const& c) { o << c.name(); if (c.algorithm==BU_CUBE) o << "("<