concordia-library/concordia/hash_generator.hpp
rjawor 3a03b01f42 std vectors
Former-commit-id: 5816e87c856f7edc242cc707851a0e2ad05aeb38
2015-04-15 10:55:26 +02:00

48 lines
1.1 KiB
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/sentence_anonymizer.hpp"
#include "concordia/concordia_config.hpp"
#include "concordia/concordia_exception.hpp"
/*!
Class for generating a sentence hash.
*/
using namespace std;
class HashGenerator {
public:
explicit HashGenerator(boost::shared_ptr<ConcordiaConfig> config)
throw(ConcordiaException);
/*! Destructor.
*/
virtual ~HashGenerator();
vector<INDEX_CHARACTER_TYPE> generateHash(const string & sentence)
throw(ConcordiaException);
vector<string> generateTokenVector(const string & sentence);
void serializeWordMap();
private:
boost::shared_ptr<WordMap> _wordMap;
boost::shared_ptr<SentenceAnonymizer> _sentenceAnonymizer;
string _wordMapFilePath;
};
#endif