#ifndef INDEX_SEARCHER_HDR #define INDEX_SEARCHER_HDR #include #include #include #include "build/libdivsufsort/include/divsufsort.h" #include "concordia/hash_generator.hpp" #include "concordia/concordia_exception.hpp" /*! Class for searching the index with a sentence. */ using namespace std; class IndexSearcher { public: explicit IndexSearcher(); /*! Destructor. */ virtual ~IndexSearcher(); void loadIndex(const string & wordMapFilepath, const string & hashedIndexFilepath, const string & suffixArrayFilepath) throw(ConcordiaException); vector simpleSearch(const string & pattern) throw(ConcordiaException); private: boost::shared_ptr _hashGenerator; sauchar_t * _T; saidx_t * _SA; size_t _n; }; #endif