concrete.util.references module¶
Add reference variables for each UUID
“pointer” in a
Communication
-
concrete.util.references.
add_references_to_communication
(comm)¶ Create references for each
UUID
‘pointer’Parameters: comm (Communication) – A Concrete Communication object, will be modified by this function The Concrete schema uses
UUID
objects as internal pointers between Concrete objects. This function adds member variables to Concrete objects that are references to the Concrete objects identified by theUUID
.For example, each
Entity
has a mentionIdlist that lists the UUIDs of theEntityMention
objects for thatEntity
. This function adds a mentionList variable to theEntity
that is a list of references to the actualEntityMention
objects. This allows you to access theEntityMention
objects using:entity.mentionListThis function adds these reference variables:
- tokenization to each
TokenRefSequence
- entityMention to each
Argument
- sentence backpointer to each
Tokenization
- parentMention backpointer to appropriate
EntityMention
And adds these lists of reference variables:
- mentionList to each
Entity
- situationMention to each
Argument
- mentionList to each
Situation
- childMentionList to each
EntityMention
For variables that represent optional lists of
UUID
objects (e.g. situation.mentionIdList), Python Thrift will set the variable to None if the list is not provided. When this function adds a list-of-references variable (in this case, situation.mentionList) for an omitted optional list, it sets the new variable to None - it DOES NOT leave the variable undefined.- tokenization to each