32namespace LinguisticProcessing {
83 for (deque<std::string>::const_iterator it=featureNames.begin(),
84 it_end=featureNames.end();it!=it_end;it++)
86 string featureName=(*it);
88 string::size_type i=featureName.find(
":");
89 if (i!=string::npos) {
90 complement=string(featureName,i+1);
91 featureName=string(featureName,0,i);
94 LDEBUG <<
"WordFeatures: initialize feature" << featureName;
96 back()->setName(featureName);
99 LERROR <<
"WordFeatures: feature" << featureName <<
"is not defined";
163 for (MorphoSyntacticData::const_iterator it=data->begin(),it_end=data->end();it!=it_end;it++) {
188 for (MorphoSyntacticData::const_iterator it=data->begin(),it_end=data->end();it!=it_end;it++) {
197m_propertyName(complement),
198m_propertyAccessor(0),
218 for (MorphoSyntacticData::const_iterator it=data->begin(),it_end=data->end();it!=it_end;it++) {
256 std::string typeName(
"NAN");
257 auto annot = std::dynamic_pointer_cast< Common::AnnotationGraphs::AnnotationData >(analysis.
getData(
"AnnotationData"));
259 std::set< AnnotationGraphVertex > matches = annot->matches(graph->
getGraphId(),v,
"annot");
260 for (std::set< AnnotationGraphVertex >::const_iterator it = matches.begin(); it != matches.end(); it++)
266 pointerValue<SpecificEntityAnnotation>();
287 std::string mxvalue(
"NAN");
288 auto annot = std::dynamic_pointer_cast< Common::AnnotationGraphs::AnnotationData >(analysis.
getData(
"AnnotationData"));
290 std::set< AnnotationGraphVertex > matches = annot->matches(graph->
getGraphId(),v,
"annot");
291 for (std::set< AnnotationGraphVertex >::const_iterator it = matches.begin(); it != matches.end(); it++)
297 pointerValue<SpecificEntityAnnotation>();
304 if (mxvalue ==
"NAN") {
307 auto it=data->begin(), it_end=data->end();
313 if (mxvalue ==
"" ) {
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
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
LinguisticCode readValue(const LinguisticCode &code) const
read a property in a coded int.
Provide tools to parse a property file, and deal with the property coding system.
const PropertyManager & getPropertyManager(const std::string &propertyName) const
Get the PropertyManager associated to a property.
const PropertyAccessor & getPropertyAccessor(const std::string &propertyName) const
Get the PropertyAccessor associated to a property.
const std::string & getPropertySymbolicValue(const LinguisticCode &value) const
The coded property value can hold several property data.
The main LIMA exception class.
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
FeatureLemmaSpecificEntity(MediaId language, const std::string &complement="")
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
FeatureLemma(MediaId language, const std::string &complement="")
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
FeaturePosition(MediaId language, const std::string &complement="")
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
FeatureProperty(MediaId language, const std::string &complement="")
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
FeatureSpecificEntity(MediaId language, const std::string &complement="")
FeatureStoredData(MediaId language, const std::string &complement="")
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
FeatureToken(MediaId language, const std::string &complement="")
std::string getValue(const LinguisticAnalysisStructure::AnalysisGraph *graph, LinguisticGraphVertex v, AnalysisContent &) const override
FeatureTstatus(MediaId language, const std::string &complement="")
An AnalysisData containing a LinguisticGraph with a language and an id.
const std::string & getGraphId(void) const
const LinguisticGraph * getGraph(void) const
Returns the underlying graph structure.
Holds morphosyntactic informations.
const Lima::LimaString & defaultKey() const
holds surface data of a token
uint64_t position() const
const TStatus & status() const
const LimaString & stringForm() const
A representation of a specific entity to store in the annotation graph.
Common::MediaticData::EntityType getType() const
void initialize(const std::deque< std::string > &featureNames)
Defines a Factory that automatically register to a MainFactory singleton.
static const MediaticData & single()
const singleton accessor
AnnotationGraph::vertex_descriptor AnnotationGraphVertex
std::string limastring2utf8stdstring(const Lima::LimaString &phrase, uint32_t size0)
Convert a wide string to a string , in dest up to size bytes.
LimaString utf8stdstring2limastring(const std::string &src)
FeatureExtractorFactory< FeatureStoredData > FeatureStoredDataFactory(FeatureStoredData_ID)
FeatureExtractorFactory< FeatureTstatus > FeatureTstatusFactory(FeatureTstatus_ID)
FeatureExtractorFactory< FeatureProperty > FeaturePropertyFactory(FeatureProperty_ID)
FeatureExtractorFactory< FeaturePosition > FeaturePositionFactory(FeaturePosition_ID)
FeatureExtractorFactory< FeatureSpecificEntity > FeatureSpecificEntityFactory(FeatureSpecificEntity_ID)
FeatureExtractorFactory< FeatureToken > FeatureTokenFactory(FeatureToken_ID)
FeatureExtractorFactory< FeatureLemma > FeatureLemmaFactory(FeatureLemma_ID)
FeatureExtractorFactory< FeatureInflectedForm > FeatureInflectedFormFactory(FeatureInflectedForm_ID)
FeatureExtractorFactory< FeatureLemmaSpecificEntity > FeatureLemmaSpecificEntityFactory(FeatureLemmaSpecificEntity_ID)