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 content
generated by a single speaker or author. This type is used for
both inter-personal communications (such as phone calls or
conversations) and third-party communications (such as news
articles).

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 (for
audio communications). If the communication is not available in
its original form, then these fields should store the
communication in the least-processed form available.

Attributes:
- id: Stable identifier for this communication, identifying both the
name of the source corpus and the document that it corresponds to
in that corpus.
- uuid: Universally unique identifier for this communication instance.
This is generated randomly, and can not be mapped back to the
source corpus. It is used as a target for symbolic “pointers”.
- type: A short, corpus-specific term characterizing the nature of the
communication; may change in a future version of concrete.
Often used for filtering. For example, Gigaword uses
the type “story” to distinguish typical news articles from
weekly summaries (“multi”), editorial advisories (“advis”), etc.
At present, this value is typically a literal form from the
originating corpus: as a result, a type marked ‘other’ may have
different meanings across different corpora.
- text: The full text contents of this communication in its original
form, or in the least-processed form available, if the original
is 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 this
Communication. CommunicationTagging objects can be used to
annotate Communications with topics, gender identification, etc.
- metadata: metadata.AnnotationMetadata to support this particular communication.

Communications derived from other communications should
indicate in this metadata object their dependency
to the original communication ID.
- keyValueMap: A catch-all store of keys and values. Use sparingly!
- lidList: Theories about the languages that are present in this
communication.
- sectionList: Theory about the block structure of this communication.
- entityMentionSetList: Theories about which spans of text are used to mention entities
in this communication.
- entitySetList: Theories about what entities are discussed in this
communication, with pointers to individual mentions.
- situationMentionSetList: Theories about what situations are explicitly mentioned in this
communication.
- situationSetList: Theories about what situations are asserted in this
communication.
- originalText: Optional original text field that points back to an original
communication.

This field can be populated for sake of convenience when creating
“perspective” communication (communications that are based on
highly destructive changes to an original communication [e.g.,
via MT]). This allows developers to quickly access the original
text that this perspective communication is based off of.
- sound: The full audio contents of this communication in its original
form, or in the least-processed form available, if the original
is not available.
- communicationMetadata: Metadata about this specific Communication, such as information
about its author, information specific to this Communication
or 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 CommunicationSet
represents.

This field may be absent if this CommunicationSet represents
a large corpus. If absent, ‘corpus’ field should be present.
- corpus: The name of a corpus or other document body that this
CommunicationSet represents.

Should be present if ‘communicationIdList’ is absent.
- entityMentionClusterList: A list of Clustering objects that represent a
group of EntityMentions that are a part of this
CommunicationSet.
- entityClusterList: A list of Clustering objects that represent a
group of Entities that are a part of this
CommunicationSet.
- situationMentionClusterList: A list of Clustering objects that represent a
group of SituationMentions that are a part of this
CommunicationSet.
- situationClusterList: A list of Clustering objects that represent a
group of Situations that are a part of this
CommunicationSet.


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. These
might be labels or annotations on a particular communcation.

For example, this structure might be used to describe the topics
discussed in a Communication. The taggingType might be ‘topic’, and
the 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 CommunicationTagging
object. 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)