#ifndef _PHRASE_H_ #define _PHRASE_H_ #include #include #include #include "phrase_builder.h" using namespace std; namespace extractor { class Phrase { public: friend Phrase PhraseBuilder::Build(const vector& phrase); int Arity() const; int GetChunkLen(int index) const; vector Get() const; int GetSymbol(int position) const; int GetNumSymbols() const; vector GetWords() const; bool operator<(const Phrase& other) const; friend ostream& operator<<(ostream& os, const Phrase& phrase); private: vector symbols; vector var_pos; vector words; }; } // namespace extractor #endif