19 void operator()(std::ostream& out,
const Vertex& v)
const
22 const Common::PropertyCode::PropertyManager& macroManager = m_propertyCodeManager->getPropertyManager(
"MACRO");
23 const Common::PropertyCode::PropertyManager& microManager = m_propertyCodeManager->getPropertyManager(
"MICRO");
24 const FsaStringsPool& stringspool= Common::MediaticData::MediaticData::single().stringsPool(m_language);
29 LinguisticAnalysisStructure::MorphoSyntacticData* data=get(
vertex_data,*m_graph,v);
31 out <<
"[label=\"" << v <<
"\\l";
34 out <<
"no FullToken";
38 LinguisticAnalysisStructure::Token* token=get(
vertex_token,*m_graph,v);
39 if (m_display.size()==0)
41 out << token->stringForm() <<
" [" << microManager.getPropertyAccessor().readValue(data->begin()->properties) <<
"] ";
45 for (std::deque<std::string>::const_iterator it=m_display.begin();
46 it!=m_display.end(); it++)
48 if (it!=m_display.begin())
52 if ( *it ==
"position" )
54 out << token->position();
56 else if (*it ==
"length" )
58 out << token->length();
60 else if (*it ==
"tstatus" && token->status())
62 out << Common::Misc::limastring2utf8stdstring(token->status()->defaultKey());
64 else if (*it ==
"text")
74 else if (*it ==
"inflectedform" )
76 std::set<StringsPoolIndex> forms=data->allInflectedForms();
77 for (std::set<StringsPoolIndex>::const_iterator formItr=forms.begin();
81 if (formItr!=forms.begin())
87 if (index!=std::string::npos)
94 else if (*it ==
"lemme" )
96 std::set<StringsPoolIndex> forms=data->allLemma();
97 for (std::set<StringsPoolIndex>::const_iterator formItr=forms.begin();
101 if (formItr!=forms.begin())
107 if (index!=std::string::npos)
114 else if (*it ==
"symbolicmicrocategory" )
116 std::set<LinguisticCode> micros;
117 data->allValues(microManager.getPropertyAccessor(),micros);
118 for (std::set<LinguisticCode>::const_iterator it=micros.begin();
122 if (it!=micros.begin())
126 out << microManager.getPropertySymbolicValue(*it);
129 else if (*it ==
"numericmicrocategory" )
131 std::set<LinguisticCode> micros;
132 data->allValues(microManager.getPropertyAccessor(),micros);
133 for (std::set<LinguisticCode>::const_iterator it=micros.begin();
137 if (it!=micros.begin())
144 else if (*it ==
"symbolicmacrocategory" )
146 std::set<LinguisticCode> macros;
147 data->allValues(macroManager.getPropertyAccessor(),macros);
148 for (std::set<LinguisticCode>::const_iterator it=macros.begin();
152 if (it!=macros.begin()) out <<
"#";
153 out << macroManager.getPropertySymbolicValue(*it);
156 else if (*it ==
"numericmacrocategory" )
158 std::set<LinguisticCode> macros;
159 data->allValues(macroManager.getPropertyAccessor(),macros);
160 for (std::set<LinguisticCode>::const_iterator it=macros.begin();
164 if (it!=macros.begin()) out <<
"#";
168 else if (*it ==
"genders" )
170 const Common::PropertyCode::PropertyManager& genderManager = m_propertyCodeManager->getPropertyManager(
"GENDER");
171 std::set< LinguisticCode > genders;
172 data->allValues(genderManager.getPropertyAccessor(),genders);
173 std::set< LinguisticCode >::const_iterator itgenders, itgenders_end;
174 itgenders = genders.begin(); itgenders_end = genders.end();
175 if ( (itgenders != itgenders_end) && (*itgenders !=
NONE_1) )
177 out << genderManager.getPropertySymbolicValue(*itgenders);
180 for (; itgenders != itgenders_end; itgenders++)
184 out <<
"," << genderManager.getPropertySymbolicValue(*itgenders);
188 else if (*it ==
"numbers" )
190 const Common::PropertyCode::PropertyManager& numberManager = m_propertyCodeManager->getPropertyManager(
"NUMBER");
191 std::set< LinguisticCode > numbers;
192 data->allValues(numberManager.getPropertyAccessor(),numbers);
193 std::set< LinguisticCode >::const_iterator itnumbers, itnumbers_end;
194 itnumbers = numbers.begin(); itnumbers_end = numbers.end();
195 if ( (itnumbers != itnumbers_end) && (*itnumbers !=
NONE_1) )
197 out << numberManager.getPropertySymbolicValue(*itnumbers);
200 for (; itnumbers != itnumbers_end; itnumbers++)
202 out <<
"," << numberManager.getPropertySymbolicValue(*itnumbers);
204 else if (*it ==
"syntax" )
206 const Common::PropertyCode::PropertyManager& syntaxManager = m_propertyCodeManager->getPropertyManager(
"SYNTAX");
207 std::set< LinguisticCode > syntax;
208 data->allValues(syntaxManager.getPropertyAccessor(),syntax);
209 std::set< LinguisticCode >::const_iterator itn, itn_end;
210 itn= syntax.begin(); itn_end = syntax.end();
211 if ( (itn!= itn_end) && (*itn !=
NONE_1) )
213 out << syntaxManager.getPropertySymbolicValue(*itn);
216 for (; itn != itn_end; itn++)
228 out <<
"\",fontname=\"Monospace\",fontsize=\"9\"]";