concordia-library/concordia/concordia_config.hpp

104 lines
2.2 KiB
C++
Raw Normal View History

2013-10-24 17:08:58 +02:00
#ifndef CONCORDIA_CONFIG_HDR
#define CONCORDIA_CONFIG_HDR
#include <string>
#include <list>
#include <libconfig.h++>
#include "concordia/concordia_exception.hpp"
/*!
Class representing the Concordia configuration.
*/
class ConcordiaConfig {
public:
/*!
Constructor.
\param configFilePath path of the configuration file (see \ref running3 for file specification).
\throws ConcordiaException
*/
explicit ConcordiaConfig(const std::string & configFilePath)
throw(ConcordiaException);
2013-10-24 17:08:58 +02:00
/*! Destructor.
*/
virtual ~ConcordiaConfig();
/*! Getter for the puddle file path parameter.
\returns file path of the puddle tagset
*/
std::string & getPuddleTagsetFilePath() {
2013-10-24 17:08:58 +02:00
return _puddleTagsetFilePath;
}
std::string & getWordMapFilePath() {
2013-11-28 16:47:57 +01:00
return _wordMapFilePath;
}
std::string & getHashedIndexFilePath() {
2013-11-28 16:47:57 +01:00
return _hashedIndexFilePath;
}
std::string & getMarkersFilePath() {
return _markersFilePath;
}
std::string & getSuffixArrayFilePath() {
2013-11-28 16:47:57 +01:00
return _suffixArrayFilePath;
}
std::string & getHtmlTagsFilePath() {
return _htmlTagsFilePath;
}
std::string & getSpaceSymbolsFilePath() {
return _spaceSymbolsFilePath;
}
std::string & getStopWordsFilePath() {
return _stopWordsFilePath;
}
std::string & getNamedEntitiesFilePath() {
return _namedEntitiesFilePath;
}
std::string & getStopSymbolsFilePath() {
return _stopSymbolsFilePath;
}
double getAnubisThreshold() {
return _anubisThreshold;
}
2013-10-24 17:08:58 +02:00
private:
libconfig::Config _config;
2013-10-24 17:08:58 +02:00
std::string _puddleTagsetFilePath;
2013-10-24 17:08:58 +02:00
std::string _wordMapFilePath;
2013-11-28 16:47:57 +01:00
std::string _hashedIndexFilePath;
2013-11-28 16:47:57 +01:00
std::string _markersFilePath;
std::string _suffixArrayFilePath;
2013-11-28 16:47:57 +01:00
std::string _htmlTagsFilePath;
std::string _spaceSymbolsFilePath;
std::string _stopWordsFilePath;
std::string _namedEntitiesFilePath;
std::string _stopSymbolsFilePath;
double _anubisThreshold;
std::string _readConfigParameterStr(const std::string & name)
2013-10-24 17:08:58 +02:00
throw(ConcordiaException);
};
#endif