Coreference Resolution

This library is responsible for handling coreference resolution parsing from the XML output

class corenlp_xml.coreference.Coreference(document, element)[source]

Reflects a grouping of mentions

mentions[source]

Returns mentions

Returns:list of mentions
Return type:list
representative[source]

Representative mention

Returns:representative Mention
Return type:corenlp_xml.coreference.Mention
class corenlp_xml.coreference.Mention(coref, element)[source]

Reflects a given mention

head[source]

The token serving as the “head” of the mention

Getter:the token corresponding to the head
Type:corenlp_xml.document.Token
representative[source]

Interprets and normalizes the “representative” attribute”

Getter:determines whether the mention is representative
Type:bool
sentence[source]

The sentence related to this mention

Getter:returns the sentence this mention relates to
Type:corenlp_xml.document.Sentence
siblings[source]

Accesses other mentions in this coref group

Getter:the other mentions for this coref group
Type:list of corenlp_xml.coreference.Mention
tokens[source]

A list of tokens related to this mention

Getter:returns a list of tokens relating to this mention
Type:list of corenlp_xml.document.Token