28namespace LinguisticProcessing
31namespace EventAnalysis
37Paragraph::Paragraph(): m_sentences(),m_otherentities(),m_evententities(),m_dates(),m_length(0),m_position(0),m_id(0)
45 m_otherentities.clear();
46 m_evententities.second.clear();
54 LDEBUG <<
"Paragraph::extractEventEntitiesBeforeVertex m_evententities.first " << m_evententities.first;
55 std::deque<LinguisticGraphVertex> evententities;
58 bool end =m_evententities.second.empty();
67 evententities.push_back(v_event);
68 m_evententities.second.pop_front();
69 end =m_evententities.second.empty();
72 return make_pair(m_evententities.first,evententities);
80 if (m_otherentities.find(t)!=m_otherentities.end())
85 if (m_evententities.first==t && m_evententities.second.size()> 0)
return true;
92 std::map<Common::MediaticData::EntityType, std::deque<LinguisticGraphVertex> >
entities;
96 bool end =(*iT).second.empty();
97 std::deque<LinguisticGraphVertex> d;
107 d.push_back(v_entity);
108 (*iT).second.pop_front();
109 end =(*iT).second.empty();
112 if(d.size()>0)
entities[(*iT).first]=d;
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, LinguisticVertexProperties > LinguisticGraph
Property to identify the chains in the graph.
#define EVENTANALYZERLOGINIT
std::map< Common::MediaticData::EntityType, std::deque< LinguisticGraphVertex > > extractEntitiesBeforeVertex(LinguisticGraphVertex v, LinguisticGraph *graph)
std::pair< Common::MediaticData::EntityType, std::deque< LinguisticGraphVertex > > extractEventEntitiesBeforeVertex(LinguisticGraphVertex v, LinguisticGraph *graph)
bool has_entity(Common::MediaticData::EntityType t) const
holds surface data of a token
uint64_t position() const
static const struct TextHtmlEntity entities[]