43 QMultiMap<Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > >
m_roles;
55m_predicateType(bnep.m_predicateType),
56m_position(bnep.m_position),
57m_length(bnep.m_length),
129const QMultiMap<Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > >&
BoWPredicate::roles()
const
134QMultiMap<Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > >&
BoWPredicate::roles()
152 std::set< uint64_t > result;
153 for (
auto it = m_d->
m_roles.begin(); it != m_d->
m_roles.end(); it++)
155 std::set< uint64_t > vertices = (*it)->getVertices();
156 for (std::set< uint64_t >::const_iterator it2 = vertices.begin(); it2 != vertices.end(); it2++)
180 std::ostringstream oss;
187 std::ostringstream oss;
194 std::ostringstream oss;
199 << it.value()->getOutputUTF8String();
205 << it.value()->getOutputUTF8String();
MediaticData::EntityType m_predicateType
void setRoles(QMultiMap< Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > > pRoles)
QMultiMap< Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > > m_roles
std::string getRolesUtf8String(void) const
get a string of the roles, of the kind : role1=value1;role2=value2
This is a BoW element used to represent a predicate (n-ary relation, template or semantic frame).
friend class BoWPredicatePrivate
virtual std::string getIdUTF8String(void) const override
function used to identify a bowtoken in a text (used in BowDumper)
MediaticData::EntityType getPredicateType(void) const
virtual BoWPredicate * clone() const override
virtual uint64_t getPosition(void) const override
virtual void setPosition(const uint64_t pos) override
void setRoles(QMultiMap< Common::MediaticData::EntityType, boost::shared_ptr< Common::BagOfWords::AbstractBoWElement > > &pRoles)
virtual uint64_t getLength(void) const override
virtual std::string getOutputUTF8String(const Common::PropertyCode::PropertyManager *macroManager=0) const override
get a string of the predicate for output function
bool operator==(const BoWPredicate &)
BoWPredicate & operator=(const BoWPredicate &)
virtual void setLength(const uint64_t len) override
virtual Lima::LimaString getString(void) const override
virtual std::set< uint64_t > getVertices() const override
returns the vertices of the predicate and the roles
void setPredicateType(const MediaticData::EntityType &)
const QMultiMap< Common::MediaticData::EntityType, boost::shared_ptr< AbstractBoWElement > > & roles() const
Provide tools to manage a specific property.
static const MediaticData & single()
const singleton accessor
std::string limastring2utf8stdstring(const Lima::LimaString &phrase, uint32_t size0)
Convert a wide string to a string , in dest up to size bytes.