56 m_costFunction(costFunction),
94 std::vector<LinguisticCode> m_predPredMicros;
96 inline bool operator<(
const PredData& pd)
const {
return m_predMicro<pd.m_predMicro; }
99 typedef std::map< LinguisticCode, std::vector<PredData> > MicroCatDataMap;
100 typedef typename std::map< LinguisticCode, std::vector<PredData> >::iterator MicroCatDataMapItr;
101 typedef typename std::vector<PredData>::iterator PredDataVectorItr;
102 typedef typename std::vector<PredData>::const_iterator PredDataVectorCItr;
107 std::vector<uint64_t> m_predStepIndexes;
108 MicroCatDataMap m_microCatsData;
111 typedef std::vector<StepData> StepDataVector;
112 typedef typename std::vector<StepData>::iterator StepDataVectorItr;
114 struct TargetVertexId
117 LinguisticCode m_categ;
118 std::vector<LinguisticCode> m_preds;
119 bool operator<(
const TargetVertexId& tvi)
const
121 if (m_sourceVx!=tvi.m_sourceVx)
return m_sourceVx<tvi.m_sourceVx;
122 if (m_categ!=tvi.m_categ)
return m_categ<tvi.m_categ;
123 return m_preds<tvi.m_preds;
127 const CostFunction m_costFunction;
128 LinguisticCode m_defaultCateg;
129 std::list<LinguisticCode> m_stopCategories;
130 const Common::PropertyCode::PropertyAccessor* m_microAccessor;
151 void initializeStepDataFromGraph(
154 LinguisticCode startMicro,
155 const std::list< LinguisticCode >& predCats,
157 StepDataVector& stepData)
const;
159 void performViterbiOnStepData(StepDataVector& stepData)
const;
173 StepDataVector& stepData,
174 Common::AnnotationGraphs::AnnotationData* annotationData)
const;
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, LinguisticVertexProperties > LinguisticGraph
Property to identify the chains in the graph.
#define LIMA_POSTAGGER_EXPORT
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
LimaStatusCode process(AnalysisContent &analysis) const override
Process on data in analysisContent.
ViterbiPosTagger(const CostFunction &costFunction)
void init(Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
initialize with parameters from configuration file.