concrete.communication package¶
-
class
concrete.communication.ttypes.
Communication
(id=None, uuid=None, type=None, text=None, startTime=None, endTime=None, communicationTaggingList=None, metadata=None, keyValueMap=None, lidList=None, sectionList=None, entityMentionSetList=None, entitySetList=None, situationMentionSetList=None, situationSetList=None, originalText=None, sound=None, communicationMetadata=None)¶ Bases:
object
A single communication instance, containing linguistic contentgenerated by a single speaker or author. This type is used forboth inter-personal communications (such as phone calls orconversations) and third-party communications (such as newsarticles).Each communication instance is grounded by its original(unannotated) contents, which should be stored in either the“text” field (for text communications) or the “audio” field (foraudio communications). If the communication is not available inits original form, then these fields should store thecommunication in the least-processed form available.Attributes:- id: Stable identifier for this communication, identifying both thename of the source corpus and the document that it corresponds toin that corpus.- uuid: Universally unique identifier for this communication instance.This is generated randomly, and can not be mapped back to thesource corpus. It is used as a target for symbolic “pointers”.- type: A short, corpus-specific term characterizing the nature of thecommunication; may change in a future version of concrete.Often used for filtering. For example, Gigaword usesthe type “story” to distinguish typical news articles fromweekly summaries (“multi”), editorial advisories (“advis”), etc.At present, this value is typically a literal form from theoriginating corpus: as a result, a type marked ‘other’ may havedifferent meanings across different corpora.- text: The full text contents of this communication in its originalform, or in the least-processed form available, if the originalis not available.- startTime: The time when this communication started (in unix time UTC –i.e., seconds since January 1, 1970).- endTime: The time when this communication ended (in unix time UTC –i.e., seconds since January 1, 1970).- communicationTaggingList: A list of CommunicationTagging objects that can support thisCommunication. CommunicationTagging objects can be used toannotate Communications with topics, gender identification, etc.- metadata: metadata.AnnotationMetadata to support this particular communication.Communications derived from other communications shouldindicate in this metadata object their dependencyto the original communication ID.- keyValueMap: A catch-all store of keys and values. Use sparingly!- lidList: Theories about the languages that are present in thiscommunication.- sectionList: Theory about the block structure of this communication.- entityMentionSetList: Theories about which spans of text are used to mention entitiesin this communication.- entitySetList: Theories about what entities are discussed in thiscommunication, with pointers to individual mentions.- situationMentionSetList: Theories about what situations are explicitly mentioned in thiscommunication.- situationSetList: Theories about what situations are asserted in thiscommunication.- originalText: Optional original text field that points back to an originalcommunication.This field can be populated for sake of convenience when creating“perspective” communication (communications that are based onhighly destructive changes to an original communication [e.g.,via MT]). This allows developers to quickly access the originaltext that this perspective communication is based off of.- sound: The full audio contents of this communication in its originalform, or in the least-processed form available, if the originalis not available.- communicationMetadata: Metadata about this specific Communication, such as informationabout its author, information specific to this Communicationor Communications like it (info from an API, for example), etc.-
read
(iprot)¶
-
validate
()¶
-
write
(oprot)¶
-
-
class
concrete.communication.ttypes.
CommunicationSet
(communicationIdList=None, corpus=None, entityMentionClusterList=None, entityClusterList=None, situationMentionClusterList=None, situationClusterList=None)¶ Bases:
object
A structure that represents a collection of Communications.Attributes:- communicationIdList: A list of Communication UUIDs that this CommunicationSetrepresents.This field may be absent if this CommunicationSet representsa large corpus. If absent, ‘corpus’ field should be present.- corpus: The name of a corpus or other document body that thisCommunicationSet represents.Should be present if ‘communicationIdList’ is absent.- entityMentionClusterList: A list of Clustering objects that represent agroup of EntityMentions that are a part of thisCommunicationSet.- entityClusterList: A list of Clustering objects that represent agroup of Entities that are a part of thisCommunicationSet.- situationMentionClusterList: A list of Clustering objects that represent agroup of SituationMentions that are a part of thisCommunicationSet.- situationClusterList: A list of Clustering objects that represent agroup of Situations that are a part of thisCommunicationSet.-
read
(iprot)¶
-
validate
()¶
-
write
(oprot)¶
-
-
class
concrete.communication.ttypes.
CommunicationTagging
(uuid=None, metadata=None, taggingType=None, tagList=None, confidenceList=None)¶ Bases:
object
A structure that represents a ‘tagging’ of a Communication. Thesemight be labels or annotations on a particular communcation.For example, this structure might be used to describe the topicsdiscussed in a Communication. The taggingType might be ‘topic’, andthe tagList might include ‘politics’ and ‘science’.Attributes:- uuid: A unique identifier for this CommunicationTagging object.- metadata: AnnotationMetadata to support this CommunicationTagging object.- taggingType: A string that captures the type of this CommunicationTaggingobject. For example: ‘topic’ or ‘gender’.- tagList: A list of strings that represent different tags related to the taggingType.For example, if the taggingType is ‘topic’, some example tags might be‘politics’, ‘science’, etc.- confidenceList: A list of doubles, parallel to the list of strings in tagList,that indicate the confidences of each tag.-
read
(iprot)¶
-
validate
()¶
-
write
(oprot)¶
-