concrete.entities package

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 once
in a given communication, along with pointers to all of the
references to that referent. The referent’s type (e.g., is it a
person, or a location, or an organization, etc) is also recorded.

Because each Entity contains pointers to all references to a
referent with a given communication, an Entity can be
thought of as a coreference set.

Attributes:
- uuid: Unique identifier for this entity.
- id: A corpus-specific and stable id such as a Freebase mid
or a DBpedia id.
- mentionIdList: An list of pointers to all of the mentions of this Entity’s
referent. (type=EntityMention)
- rawMentionList: An list of pointers to all of the sentences which contain a
mention of this Entity.
- type: The basic type of this entity’s referent.
- confidence: Confidence score for this individual entity. You can also set a
confidence score for an entire EntitySet using the EntitySet’s
metadata.
- canonicalName: A string containing a representative, canonical, or “best” name
for this entity’s referent. This string may match one of the
mentions’ 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 mention
are called “entities.”

It is left up to individual EntityMention taggers to decide which
referent types and phrase types to identify. For example, some
EntityMention taggers may only identify proper nouns, or may only
identify EntityMentions that refer to people.

Each EntityMention consists of a sequence of tokens. This sequence
is usually annotated with information about the referent type
(e.g., is it a person, or a location, or an organization, etc) as
well 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. For
example, in the phrase “French hotel,” the adjective “French” might
be 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 explicit
mention, but an EntityMention is needed for downstream Entity
analysis, this field should be set to a TokenRefSequence with an
empty tokenIndexList and the anchorTokenIndex set to the head/only
token 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 also
set a confidence score for an entire EntityMentionSet using the
EntityMentionSet’s metadata.
- text: The text content of this entity mention. This field is
typically redundant with the string formed by cross-referencing
the ‘tokens.tokenIndexList’ field with this mention’s
tokenization. This field may not be generated by all analytics.
- childMentionIdList: A list of pointers to the “child” EntityMentions of this
EntityMention.

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 a
message. See also: EntityMention

This 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 a
message. 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 all
Entity objects in this EntitySet have EntityMentions that are included
in the named EntityMentionSet.

read(iprot)
validate()
write(oprot)