36namespace LinguisticProcessing
38namespace MorphologicAnalysis
60 for (deque<string>::iterator it=cats.begin();
65 LDEBUG <<
"default category : " << microId;
68 m_defaultProperties.push_back(microId);
72 LWARN <<
"micro categorie seems to be undefined !";
80 LWARN <<
"SimpleDefaultCateogries: no default properties defined !";
81 m_defaultProperties.push_back(
L_NONE);
87 m_charChart = std::dynamic_pointer_cast< FlatTokenizer::CharChart >(res);
91 LERROR <<
"no param 'charChart' in SimpleDefaultCateogries group for language " << (int)m_language;
107 LINFO <<
"MorphologicalAnalysis: starting process DefaultProperties";
109 auto tokenList=std::dynamic_pointer_cast<AnalysisGraph>(analysis.
getData(
"AnalysisGraph"));
112 affectPropertiesOnePath(*tokenList);
122 LINFO <<
"MorphologicalAnalysis: ending process SimpleDefaultProperties";
129void SimpleDefaultProperties::affectPropertiesOnePath(
132 graph_traits<LinguisticGraph>::vertex_iterator vBegin, vEnd, v;
133 boost::tie(vBegin, vEnd) = vertices(*(anagraph.
getGraph()));
136 for (v = vBegin; v != vEnd; v++)
139 if (currentData == 0)
146 if (currentData->empty())
155 for (vector<LinguisticCode>::const_iterator it=m_defaultProperties.begin();
156 it!=m_defaultProperties.end();
160 currentData->push_back(elem);
#define SIMPLEDEFAULTPROPERTIES_CLASSID
Defines a Factory to create Object of type Base.
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
std::shared_ptr< AnalysisData > getData(const QString &id)
return AnalysisData by id
bool empty(const LinguisticCode &l) const
Test if the given code has property data.
Provide tools to manage a specific property.
const PropertyAccessor & getPropertyAccessor() const
give the corresponding PropertyAccessor
LinguisticCode getPropertyValue(const std::string &symbolicValue) const
Get the coded property value from the symbolic value.
std::string & getParamsValueAtKey(const std::string &key)
std::deque< std::string > & getListsValueAtKey(const std::string &key)
return a message when a 'list' was not found
return a message when a 'param' was not found
Manage initialization of InitializableObjects using configuration module and parameters.
const InitializationParameters & getInitializationParameters() const
get Initialization Parameters
Use this exception to signal an error in one of the configuration files.
An AnalysisData containing a LinguisticGraph with a language and an id.
const LinguisticGraph * getGraph(void) const
Returns the underlying graph structure.
Holds morphosyntactic informations.
holds surface data of a token
const LimaString & stringForm() const
StringsPoolIndex form() const
SimpleDefaultProperties()
LimaStatusCode process(AnalysisContent &analysis) const override
Each token of the specified path without dictionnary entry is searched into the specified dictionary.
virtual ~SimpleDefaultProperties()
void init(Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
initialize with parameters from configuration file.
static const MediaticData & single()
const singleton accessor
static MediaticData & changeable()
singleton accessor
static void logElapsedTime(const std::string &mess, const std::string &taskCategory=std::string(""))
log the number of microseconds since last UpdateCurrentTime
static void updateCurrentTime(const std::string &taskCategory=std::string(""))
store current time for new elapsed time computation
SimpleFactory< MediaProcessUnit, SimpleDefaultProperties > simpleDefaultPropertiesFactory(SIMPLEDEFAULTPROPERTIES_CLASSID)
StringsPoolIndex inflectedForm
StringsPoolIndex normalizedForm
LinguisticCode properties
launch exception related to the configuration file parsing