concrete.entities.ttypes module¶
-
class
concrete.entities.ttypes.
Entity
(uuid=None, id=None, mentionIdList=None, rawMentionList=None, type=None, confidence=None, canonicalName=None)¶ Bases:
object
A single referent (or “entity”) that is referred to at least oncein a given communication, along with pointers to all of thereferences to that referent. The referent’s type (e.g., is it aperson, or a location, or an organization, etc) is also recorded.Because each Entity contains pointers to all references to areferent with a given communication, an Entity can bethought of as a coreference set.Attributes:- uuid: Unique identifier for this entity.- id: A corpus-specific and stable id such as a Freebase midor a DBpedia id.- mentionIdList: An list of pointers to all of the mentions of this Entity’sreferent. (type=EntityMention)- rawMentionList: An list of pointers to all of the sentences which contain amention of this Entity.- type: The basic type of this entity’s referent.- confidence: Confidence score for this individual entity. You can also set aconfidence score for an entire EntitySet using the EntitySet’smetadata.- canonicalName: A string containing a representative, canonical, or “best” namefor this entity’s referent. This string may match one of thementions’ text strings, but it is not required to.-
read
(iprot)¶
-
validate
()¶
-
write
(oprot)¶
-
-
class
concrete.entities.ttypes.
EntityMention
(uuid=None, tokens=None, entityType=None, phraseType=None, confidence=None, text=None, childMentionIdList=None)¶ Bases:
object
A span of text with a specific referent, such as a person,organization, or time. Things that can be referred to by a mentionare called “entities.”It is left up to individual EntityMention taggers to decide whichreferent types and phrase types to identify. For example, someEntityMention taggers may only identify proper nouns, or may onlyidentify EntityMentions that refer to people.Each EntityMention consists of a sequence of tokens. This sequenceis usually annotated with information about the referent type(e.g., is it a person, or a location, or an organization, etc) aswell as the phrase type (is it a name, pronoun, common noun, etc.).EntityMentions typically consist of a single noun phrase; however,other phrase types may also be marked as mentions. Forexample, in the phrase “French hotel,” the adjective “French” mightbe marked as a mention for France.Attributes:- uuid- tokens: Pointer to sequence of tokens.Special note: In the case of PRO-drop, where there is no explicitmention, but an EntityMention is needed for downstream Entityanalysis, this field should be set to a TokenRefSequence with anempty tokenIndexList and the anchorTokenIndex set to the head/onlytoken of the verb/predicate from which the PRO was dropped.- entityType: The type of referent that is referred to by this mention.- phraseType: The phrase type of the tokens that constitute this mention.- confidence: A confidence score for this individual mention. You can alsoset a confidence score for an entire EntityMentionSet using theEntityMentionSet’s metadata.- text: The text content of this entity mention. This field istypically redundant with the string formed by cross-referencingthe ‘tokens.tokenIndexList’ field with this mention’stokenization. This field may not be generated by all analytics.- childMentionIdList: A list of pointers to the “child” EntityMentions of thisEntityMention.-
read
(iprot)¶
-
validate
()¶
-
write
(oprot)¶
-
-
class
concrete.entities.ttypes.
EntityMentionSet
(uuid=None, metadata=None, mentionList=None, linkingList=None)¶ Bases:
object
A theory about the set of entity mentions that are present in amessage. See also: EntityMentionThis type does not represent a coreference relationship, which is handled by Entity.This type is meant to represent the output of a entity-mention-identifier,which is often a part of an in-doc coreference system.Attributes:- uuid: Unique identifier for this set.- metadata: Information about where this set came from.- mentionList: List of mentions in this set.- linkingList: Entity linking annotations associated with this EntityMentionSet.-
read
(iprot)¶
-
validate
()¶
-
write
(oprot)¶
-
-
class
concrete.entities.ttypes.
EntitySet
(uuid=None, metadata=None, entityList=None, linkingList=None, mentionSetId=None)¶ Bases:
object
A theory about the set of entities that are present in amessage. See also: Entity.Attributes:- uuid: Unique identifier for this set.- metadata: Information about where this set came from.- entityList: List of entities in this set.- linkingList: Entity linking annotations associated with this EntitySet.- mentionSetId: An optional UUID pointer to an EntityMentionSet.If this field is present, consumers can assume that allEntity objects in this EntitySet have EntityMentions that are includedin the named EntityMentionSet.-
read
(iprot)¶
-
validate
()¶
-
write
(oprot)¶
-