concordia-library/concordia/hash_generator.hpp
rjawor 4b921decae limits control
Former-commit-id: 83d90cb63b3f1447938d16010e66f4345dfe0617
2014-03-14 11:30:17 +01:00

43 lines
880 B
C++

#ifndef HASH_GENERATOR_HDR
#define HASH_GENERATOR_HDR
#include <string>
#include <map>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include "concordia/word_map.hpp"
#include "concordia/common/config.hpp"
#include "concordia/concordia_exception.hpp"
/*!
Class for generating a sentence hash.
*/
using namespace std;
class HashGenerator {
public:
explicit HashGenerator(const string & wordMapFilePath)
throw(ConcordiaException);
/*! Destructor.
*/
virtual ~HashGenerator();
boost::shared_ptr<vector<INDEX_CHARACTER_TYPE> >
generateHash(const string & sentence)
throw(ConcordiaException);
void serializeWordMap();
private:
boost::shared_ptr<WordMap> _wordMap;
string _wordMapFilePath;
};
#endif