Constructor
new CorefChain(mentions)
- Source:
 
Create an CorefChain
Parameters:
| Name | Type | Description | 
|---|---|---|
mentions | 
            
            Array.<CorefMention> | 
Methods
(static) fromJSON(data) → {CorefChain}
- Source:
 
Get an instance of CorefChain from a given JSON of sentence corefs
Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            Array.<CorefMentionJSON> | The sentence corefs data, as returned by CoreNLP API service  | 
        
Returns:
sentenchain - A new CorefChain instance
- Type
 - CorefChain
 
document(doc) → {Document}
- Source:
 
Gets or sets a Document reference for the current coref-chain
Parameters:
| Name | Type | Default | Description | 
|---|---|---|---|
doc | 
            
            Document | 
                
                    null
                
                 | 
            
            
Returns:
doc
- Type
 - Document
 
fromDocument(doc) → {CorefChain}
- Source:
 
Update an instance of CorefChain with Document references to Sentence(s) and their Token(s)
Parameters:
| Name | Type | Description | 
|---|---|---|
doc | 
            
            Document | a Document object, the same one used to generate corefs annotations  | 
        
Returns:
chain - The current chain instance
- Type
 - CorefChain
 
fromJSON(data) → {CorefChain}
- Source:
 
Update an instance of CorefChain with data provided by a JSON
Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            Array.<CorefMentionJSON> | A sentence corefs mentions chain, as returned by CoreNLP API service  | 
        
Returns:
chain - The current chain instance
- Type
 - CorefChain
 
mention(index) → {CorefMention}
- Source:
 
Retrieves a CorefMention at the index specified
Parameters:
| Name | Type | Description | 
|---|---|---|
index | 
            
            number | 
Returns:
mention
- Type
 - CorefMention
 
mentions() → {Array.<CorefMention>}
- Source:
 
Retrieves all the contained CorefMention instances
Returns:
mentions
- Type
 - Array.<CorefMention>
 
nonRepresentatives() → {Array.<CorefMention>}
- Source:
 
Retrieves all the non-representative mentions
Returns:
mentions
- Type
 - Array.<CorefMention>
 
representative() → {CorefMention}
- Source:
 
Retrieves the first representative mention
Returns:
mention
- Type
 - CorefMention