本文整理汇总了C++中common::xmlconfigurationfiles::GroupConfigurationStructure类的典型用法代码示例。如果您正苦于以下问题:C++ GroupConfigurationStructure类的具体用法?C++ GroupConfigurationStructure怎么用?C++ GroupConfigurationStructure使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GroupConfigurationStructure类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: init
void EntityTrackerXmlLogger::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
SELOGINIT;
LDEBUG << "EntityTrackerXmlLogger::init";
AbstractLinguisticLogger::init(unitConfiguration,manager);
m_language=manager->getInitializationParameters().media;
try
{
m_graph=unitConfiguration.getParamsValueAtKey("graph");
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
SELOGINIT;
LWARN << "No 'graph' parameter in unit configuration '"
<< unitConfiguration.getName() << "' ; using AnalysisGraph";
m_graph=string("AnalysisGraph");
}
try
{
string val=unitConfiguration.getParamsValueAtKey("compactFormat");
if (val=="yes" || val=="true" || val=="1") {
m_compactFormat=true;
}
}
catch (Common::XMLConfigurationFiles::NoSuchParam& ) {} // do nothing: optional
}
开发者ID:aymara,项目名称:lima,代码行数:32,代码来源:EntityTrackerXmlLogger.cpp
示例2: init
void ParagraphBoundariesFinder::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* /*manager*/)
{
/** @addtogroup ProcessUnitConfiguration
* - <b><group name="..." class="ParagraphBoundariesFinder"></b>
*/
try
{
m_graph=unitConfiguration.getParamsValueAtKey("graph");
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
// optional: keep default
}
try
{
m_paragraphSeparator=Common::Misc::utf8stdstring2limastring(unitConfiguration.getParamsValueAtKey("paragraphSeparator"));
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
// optional: keep default
}
}
开发者ID:aymara,项目名称:lima,代码行数:26,代码来源:ParagraphBoundariesFinder.cpp
示例3: LOGINIT
//***********************************************************************
void SpecificEntitiesLoader::
init(Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
LOGINIT("LP::SpecificEntities");
m_language=manager->getInitializationParameters().media;
AnalysisLoader::init(unitConfiguration,manager);
try {
m_graph=unitConfiguration.getParamsValueAtKey("graph");
}
catch (Common::XMLConfigurationFiles::NoSuchParam& ) {} // keep default value
try {
// may need to initialize a modex, to know about the entities in external file
deque<string> modex=unitConfiguration.getListsValueAtKey("modex");
for (deque<string>::const_iterator it=modex.begin(),it_end=modex.end();it!=it_end;it++) {
LDEBUG << "loader: initialize modex " << *it;
string filename=Common::MediaticData::MediaticData::single().getConfigPath()+"/"+*it;
Common::XMLConfigurationFiles::XMLConfigurationFileParser parser(filename);
Common::MediaticData::MediaticData::changeable().initEntityTypes(parser);
}
}
catch (Common::XMLConfigurationFiles::NoSuchList& ) {
LWARN << "loader: no modex specified in parameter: types in file loaded may not be known";
}
// Create a SAX parser object.
m_parser = new QXmlSimpleReader();
}
开发者ID:FaizaGara,项目名称:lima,代码行数:33,代码来源:SpecificEntitiesLoader.cpp
示例4: init
void GreedyPosTagger::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
/** @addtogroup ProcessUnitConfiguration
* - <b><group name="..." class="GreedyPosTagger"></b>
* - trigramMatrix : TrigramMatrix resource
* - bigramMatrix : BigramMatrix resource
* - ponctuforte : micro category for ponctu forte. default : 'PONCTU_FORTE'
*/
PTLOGINIT;
m_language=manager->getInitializationParameters().media;
m_macroAccessor=&(static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager().getPropertyAccessor("MACRO"));
m_microAccessor=&(static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager().getPropertyAccessor("MICRO"));
try
{
string trigrams=unitConfiguration.getParamsValueAtKey("trigramMatrix");
AbstractResource* res=LinguisticResources::single().getResource(m_language,trigrams);
m_trigramMatrix=static_cast<TrigramMatrix*>(res);
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
LERROR << "No param 'trigramMatrix' in GreedyPosTagger group for language " << (int)m_language;
throw InvalidConfiguration();
}
try
{
string bigrams=unitConfiguration.getParamsValueAtKey("bigramMatrix");
AbstractResource* res=LinguisticResources::single().getResource(m_language,bigrams);
m_bigramMatrix=static_cast<BigramMatrix*>(res);
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
LWARN << "No param 'bigramMatrix' in GreedyPosTagger group for language " << (int)m_language;
throw InvalidConfiguration();
}
try
{
std::string id=unitConfiguration.getParamsValueAtKey("ponctuforte");
m_microCatPonctuForte=static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager().getPropertyManager("MICRO").getPropertyValue(id);
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
LWARN << "No ponctuforte microcateg category for GreedyPosTagger ! use category PONCTU_FORTE";
m_microCatPonctuForte=static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager().getPropertyManager("MICRO").getPropertyValue("PONCTU_FORTE");
}
}
开发者ID:FaizaGara,项目名称:lima,代码行数:51,代码来源:greedyPosTagger.cpp
示例5: init
void EnchantSpellingAlternatives::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
MORPHOLOGINIT;
m_d->m_language = manager->getInitializationParameters().media;
try
{
m_d->m_enchantDictionary = enchant::Broker::instance()->request_dict(Common::MediaticData::MediaticData::changeable().getMediaId(m_d->m_language).substr(0,2));
}
catch (enchant::Exception& e)
{
LERROR << "Cannot get Enchant dictionary for language" << Common::MediaticData::MediaticData::changeable().getMediaId(m_d->m_language);
throw LimaException();
}
try
{
std::string dico=unitConfiguration.getParamsValueAtKey("dictionary");
AbstractResource* res= LinguisticResources::single().getResource(m_d->m_language,dico);
m_d->m_dictionary=static_cast<AbstractAnalysisDictionary*>(res);
}
catch (NoSuchParam& )
{
LERROR << "no param 'dictionary' in EnchantSpellingAlternatives group for language " << (int) m_d->m_language;
throw InvalidConfiguration();
}
}
开发者ID:FaizaGara,项目名称:lima,代码行数:27,代码来源:EnchantSpellingAlternatives.cpp
示例6: init
/** @addtogroup ResourceConfiguration
* - <b><group name="..." class="SentenceBoundsFinder"></b>
*/
void StopList::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
LIMA_UNUSED(manager);
DUMPERLOGINIT;
const string& resourcesPath=Common::MediaticData::MediaticData::single().getResourcesPath();
string stopListFileName;
try
{
stopListFileName=resourcesPath+"/"+unitConfiguration.getParamsValueAtKey("file");
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
LERROR << "No param 'file' in StopList configuration group ! ";
throw InvalidConfiguration();
}
std::ifstream stopListFile(stopListFileName.c_str(), std::ifstream::binary);
if (!stopListFile) {
LERROR << "invalid file " << stopListFileName;
throw InvalidConfiguration();
}
LimaString wword = Common::Misc::utf8stdstring2limastring(Common::Misc::readLine(stopListFile));
LDEBUG << "Loading stop list file: " << stopListFileName;
while (!wword.isEmpty())
{
insert(wword);
wword = Common::Misc::utf8stdstring2limastring(Common::Misc::readLine(stopListFile));
}
}
开发者ID:FaizaGara,项目名称:lima,代码行数:36,代码来源:StopList.cpp
示例7: init
void FsaAccessResource::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
/** @addtogroup ResourceConfiguration
* - <b><group name="..." class="FsaAccess"></b>
* - keyFile : file containing the compiled access keys
*/
ANALYSISDICTLOGINIT;
try
{
string keyfile=Common::MediaticData::MediaticData::single().getResourcesPath() + "/" + unitConfiguration.getParamsValueAtKey("keyFile");
FsaAccess::FsaAccessSpare16* fsaAccess=new FsaAccess::FsaAccessSpare16();
LDEBUG << "FsaAccessResource::init read keyFile" << keyfile.c_str();
fsaAccess->read(keyfile);
m_fsaAccess=fsaAccess;
}
catch (NoSuchParam& )
{
LERROR << "no param 'keyFile' in FsaAccessResource group for language " << (int) manager->getInitializationParameters().language << LENDL;
throw InvalidConfiguration();
}
catch (AccessByStringNotInitialized& )
{
LERROR << "keyfile "
<< Common::MediaticData::MediaticData::single().getResourcesPath()
<< "/"
<< unitConfiguration.getParamsValueAtKey("keyFile")
<< " no found for language "
<< (int) manager->getInitializationParameters().language << LENDL;
throw InvalidConfiguration();
}
}
开发者ID:pquentin,项目名称:lima,代码行数:34,代码来源:FsaAccessResource.cpp
示例8: init
void SyntacticAnalyzerSimplify::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
m_language=manager->getInitializationParameters().media;
std::string rules=unitConfiguration.getParamsValueAtKey("simplifyAutomaton");
m_recognizer = static_cast<Automaton::Recognizer*>(LinguisticResources::single().getResource(m_language,rules));
}
开发者ID:FaizaGara,项目名称:lima,代码行数:9,代码来源:SyntacticAnalyzer-simplify.cpp
示例9: init
void OrthographicAlternatives::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
MORPHOLOGINIT;
m_language = manager->getInitializationParameters().language;
try
{
string dico=unitConfiguration.getParamsValueAtKey("dictionary");
AbstractResource* res= LinguisticResources::single().getResource(m_language,dico);
m_dictionary=static_cast<AbstractAnalysisDictionary*>(res);
}
catch (NoSuchParam& )
{
LERROR << "no param 'dictionary' in OrthographicAlternatives group for language " << (int) m_language;
throw InvalidConfiguration();
}
try
{
string dico=unitConfiguration.getParamsValueAtKey("charChart");
AbstractResource* res= LinguisticResources::single().getResource(m_language,dico);
m_charChart=static_cast<CharChart*>(res);
}
catch (NoSuchParam& )
{
LERROR << "no param 'charChart' in OrthographicAlternatives group for language " << (int) m_language;
throw InvalidConfiguration();
}
try
{
string confident=unitConfiguration.getParamsValueAtKey("confidentMode");
m_confidentMode=(confident=="true");
}
catch (NoSuchParam& )
{
LWARN << "no param 'confidentMode' in OrthographicAlternatives group for language " << (int) m_language;
LWARN << "use default value : 'true'";
m_confidentMode=true;
}
}
开发者ID:aymara,项目名称:lima,代码行数:43,代码来源:OrthographicAlternatives.cpp
示例10: init
void SpecificEntitiesXmlLogger::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
SELOGINIT;
LDEBUG << "SpecificEntitiesXmlLogger::init";
AbstractTextualAnalysisDumper::init(unitConfiguration,manager);
m_language=manager->getInitializationParameters().media;
try
{
m_graph=unitConfiguration.getParamsValueAtKey("graph");
}
catch (Common::XMLConfigurationFiles::NoSuchParam& )
{
SELOGINIT;
LWARN << "No 'graph' parameter in unit configuration '"
<< unitConfiguration.getName() << "' ; using PosGraph";
m_graph=string("PosGraph");
}
try
{
string val=unitConfiguration.getParamsValueAtKey("compactFormat");
if (val=="yes" || val=="true" || val=="1") {
m_compactFormat=true;
}
}
catch (Common::XMLConfigurationFiles::NoSuchParam& ) {} // do nothing: optional
try {
std::string str=unitConfiguration.getParamsValueAtKey("followGraph");
if (str=="1" || str=="true" || str=="yes") {
m_followGraph=true;
}
else {
m_followGraph=false;
}
}
catch (Common::XMLConfigurationFiles::NoSuchParam& ) {} // keep default value
}
开发者ID:clemance,项目名称:lima,代码行数:42,代码来源:SpecificEntitiesXmlLogger.cpp
示例11:
//************************************************************************
bool
getBooleanParameter(Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
const std::string& param) {
string value=unitConfiguration.getParamsValueAtKey(param);
if (value == "yes" ||
value == "true" ||
value == "1") {
return true;
}
return false;
}
开发者ID:pquentin,项目名称:lima,代码行数:12,代码来源:ExternalProcessUnit.cpp
示例12: init
void LinearTextRepresentationDumper::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager) {
DUMPERLOGINIT;
m_language = manager->getInitializationParameters().media;
// a stop list is used ?
bool useStopList = false;
try {
string stopFlag = unitConfiguration.getParamsValueAtKey("useStopList");
useStopList = (stopFlag == "true");
}
catch (NoSuchParam& ) {
LWARN << "No param 'useStopList' in ltrDumper configuration group for language "
<< m_language << LENDL;
LWARN << "use default value: false" << LENDL;
}
if (useStopList) {
try {
string stoplist = unitConfiguration.getParamsValueAtKey("stopList");
m_stopList = static_cast<StopList*>(LinguisticResources::single().getResource(m_language, stoplist));
}
catch (NoSuchParam& ) {
LERROR << "LinearTextRepresentationDumper::init: No param 'stopList' in LinearTextRepresentationDumper configuration group for language " << m_language << LENDL;
throw InvalidConfiguration();
}
}
else {
m_stopList = 0;
}
try {
m_handler = unitConfiguration.getParamsValueAtKey("handler");
}
catch (NoSuchParam& ) {
DUMPERLOGINIT;
LERROR << "LinearTextRepresentationDumper::init: Missing parameter handler in LinearTextRepresentationDumper configuration" << LENDL;
throw InvalidConfiguration();
}
}
开发者ID:pquentin,项目名称:lima,代码行数:40,代码来源:linearTextRepresentationDumper.cpp
示例13: init
void EasyXmlDumper::init(Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
DUMPERLOGINIT;
LDEBUG << "EasyXmlDumper:: easyXmlDumper init!";
m_language = manager->getInitializationParameters().media;
m_propertyCodeManager = &(static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager());
try
{
m_typeMapping = unitConfiguration.getMapAtKey("typeMapping");
m_srcTag = unitConfiguration.getMapAtKey("srcTag");
m_tgtTag = unitConfiguration.getMapAtKey("tgtTag");
}
catch (NoSuchParam& )
{
LERROR << "EasyXmlDumper::init: parameter not found (typeMapping, srcTag and tgtTag must be specified)";
return;
}
try
{
m_graph = unitConfiguration.getParamsValueAtKey("graph");
}
catch (NoSuchParam& )
{
LDEBUG << "EasyXmlDumper:: graph parameter not found, using PosGraph";
m_graph = string("PosGraph");
}
try
{
m_handler=unitConfiguration.getParamsValueAtKey("handler");
}
catch (NoSuchParam& )
{
DUMPERLOGINIT;
LERROR << "EasyXmlDumper::init: Missing parameter handler in EasyXmlDumper configuration";
throw InvalidConfiguration();
}
}
开发者ID:FaizaGara,项目名称:lima,代码行数:38,代码来源:easyXmlDumper.cpp
示例14: init
//***********************************************************************
void AbstractTextualAnalysisDumper::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
m_language = manager->getInitializationParameters().media;
try
{
m_handlerName=unitConfiguration.getParamsValueAtKey("handler");
}
catch (NoSuchParam& ) { } // do nothing, optional
try
{
m_outputSuffix=unitConfiguration.getParamsValueAtKey("outputSuffix");
}
catch (NoSuchParam& ) {} // do nothing, optional
try
{
m_outputFile=unitConfiguration.getParamsValueAtKey("outputFile");
}
catch (NoSuchParam& ) {} // do nothing, optional
try
{
string val=unitConfiguration.getParamsValueAtKey("append");
if (val=="true" || val=="yes" || val=="1") {
m_append=true;
}
else {
m_append=false;
}
}
catch (NoSuchParam& ) {} // keep default value
}
开发者ID:pquentin,项目名称:lima,代码行数:38,代码来源:AbstractTextualAnalysisDumper.cpp
示例15: init
//***********************************************************************
void SegmentationDataXmlLogger::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
LOGINIT("LP::Segmentation");
LDEBUG << "SegmentationDataXmlLogger::init" << LENDL;
AbstractLinguisticLogger::init(unitConfiguration,manager);
try {
m_data=unitConfiguration.getParamsValueAtKey("data");
}
catch (Common::XMLConfigurationFiles::NoSuchParam& ) {} // do nothing, keep default
}
开发者ID:pquentin,项目名称:lima,代码行数:16,代码来源:SegmentationDataXmlLogger.cpp
示例16: init
void FullTokenXmlLogger::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
AbstractLinguisticLogger::init(unitConfiguration,manager);
try
{
m_graphId=unitConfiguration.getParamsValueAtKey("graph");
}
catch (NoSuchParam& )
{
m_graphId=string("AnalysisGraph");
}
m_language=manager->getInitializationParameters().media;
m_propertyCodeManager= &(static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager());
}
开发者ID:pquentin,项目名称:lima,代码行数:17,代码来源:FullTokenXmlLogger.cpp
示例17: init
//***********************************************************************
void EventTemplateDataXmlLogger::init(Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
LOGINIT("LP::EventAnalysis");
LDEBUG << "EventTemplateDataXmlLogger::init";
AbstractTextualAnalysisDumper::init(unitConfiguration,manager);
try {
m_eventData=unitConfiguration.getParamsValueAtKey("eventTemplateData");
}
catch (Common::XMLConfigurationFiles::NoSuchParam& ) {
LDEBUG << "EventTemplateDataXmlLogger: no parameter 'eventTemplateData', use default ('"<<m_eventData << "')";
// not an error, keep default
}
}
开发者ID:FaizaGara,项目名称:lima,代码行数:18,代码来源:EventTemplateDataXmlLogger.cpp
示例18: init
void WordSenseXmlLogger::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
AbstractLinguisticLogger::init(unitConfiguration,manager);
try
{
// DTD
m_outputSuffix=unitConfiguration.getParamsValueAtKey("outputSuffix");
}
catch (NoSuchParam& )
{
m_outputSuffix=string(".senses")+".xml";
}
m_language=manager->getInitializationParameters().media;
}
开发者ID:FaizaGara,项目名称:lima,代码行数:19,代码来源:WordSenseXmlLogger.cpp
示例19: init
void CorefSolvingXmlLogger::init(
Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
AbstractLinguisticLogger::init(unitConfiguration,manager);
try
{
// DTD
m_outputSuffix=unitConfiguration.getParamsValueAtKey("outputSuffix")+".xml";
}
catch (NoSuchParam& )
{
m_outputSuffix=string(".coref")+".xml";
}
m_language=manager->getInitializationParameters().media;
//m_propertyCodeManager= &(static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager());
}
开发者ID:Geekking,项目名称:lima,代码行数:20,代码来源:CorefSolvingXmlLogger.cpp
示例20: init
void GeoDumper::init(Common::XMLConfigurationFiles::GroupConfigurationStructure& unitConfiguration,
Manager* manager)
{
m_language=manager->getInitializationParameters().media;
std::string m_graph; try
{
m_graph=unitConfiguration.getParamsValueAtKey("graph");
}
catch (NoSuchParam& ) { } // optional (default value exists)
// read handler in conf file
try
{
m_handler=unitConfiguration.getParamsValueAtKey("handler");
}
catch (NoSuchParam& )
{
DUMPERLOGINIT;
LERROR << "GeoDumper::init: Missing parameter handler in BowDumper configuration";
throw InvalidConfiguration();
}
//optional parameters to configure output format
try {
m_sep=unitConfiguration.getParamsValueAtKey("separator");
}
catch (NoSuchParam) { }
try {
m_sepPOS=unitConfiguration.getParamsValueAtKey("separatorPOS");
}
catch (NoSuchParam) { }
try {
std::string str=unitConfiguration.getParamsValueAtKey("printPosition");
if (str=="1" || str=="yes") { m_printPosition=true; }
}
catch (NoSuchParam&) { }
try {
m_property=unitConfiguration.getParamsValueAtKey("property");
}
catch (NoSuchParam&) { }
m_propertyAccessor=&static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager().getPropertyAccessor(m_property);
m_propertyManager=&static_cast<const Common::MediaticData::LanguageData&>(Common::MediaticData::MediaticData::single().mediaData(m_language)).getPropertyCodeManager().getPropertyManager(m_property);
}
开发者ID:FaizaGara,项目名称:lima,代码行数:46,代码来源:GeoDumper.cpp
注:本文中的common::xmlconfigurationfiles::GroupConfigurationStructure类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论