opennlp.tools.coref
Interface Linker

All Known Implementing Classes:
AbstractLinker, DefaultLinker, TreebankLinker

public interface Linker

A linker provides an interface for finding mentions, getMentionFinder, and creating entities out of those mentions, getEntities. This interface also allows for the training of a resolver with the method setEntitites which is used to give the resolver mentions whose entityId fields indicate which mentions refer to the same entity and the train method which compiles all the information provided via calls to setEntities into a model.


Field Summary
static String COMBINED_NPS
          String constant used to label a mention which consists of two or more noun phrases.
static String DESCRIPTOR
          String constant used to label a mention which is a description.
static String ISA
          String constant used to label an mention in an appositive relationship.
static String NP
          String constant used to label a mention which consists of a single noun phrase.
static String PRONOUN_MODIFIER
          String constant used to label a mention which is a pronoun.
static String PROPER_NOUN_MODIFIER
          String constant used to label a mention which is a proper noun modifying another noun.
 
Method Summary
 MentionContext[] constructMentionContexts(Mention[] mentions)
          Creates mention contexts for the specified mention exents.
 DiscourseEntity[] getEntities(Mention[] mentions)
          Returns a list of entities which group the mentions into entity classes.
 HeadFinder getHeadFinder()
          Returns the head finder associated with this linker.
 MentionFinder getMentionFinder()
          Returns the mention finder for this linker.
 void setEntities(Mention[] mentions)
          Indicated that the specified mentions can be used to train this linker.
 void train()
          Trains the linker based on the data specified via calls to setEntities.
 

Field Detail

DESCRIPTOR

static final String DESCRIPTOR
String constant used to label a mention which is a description.

See Also:
Constant Field Values

ISA

static final String ISA
String constant used to label an mention in an appositive relationship.

See Also:
Constant Field Values

COMBINED_NPS

static final String COMBINED_NPS
String constant used to label a mention which consists of two or more noun phrases.

See Also:
Constant Field Values

NP

static final String NP
String constant used to label a mention which consists of a single noun phrase.

See Also:
Constant Field Values

PROPER_NOUN_MODIFIER

static final String PROPER_NOUN_MODIFIER
String constant used to label a mention which is a proper noun modifying another noun.

See Also:
Constant Field Values

PRONOUN_MODIFIER

static final String PRONOUN_MODIFIER
String constant used to label a mention which is a pronoun.

See Also:
Constant Field Values
Method Detail

setEntities

void setEntities(Mention[] mentions)
Indicated that the specified mentions can be used to train this linker. This requires that the coreference relationship between the mentions have been labeled in the mention's id field.

Parameters:
mentions - The mentions to be used to train the linker.

getEntities

DiscourseEntity[] getEntities(Mention[] mentions)
Returns a list of entities which group the mentions into entity classes.

Parameters:
mentions - A array of mentions.
Returns:
An array of discourse entities.

constructMentionContexts

MentionContext[] constructMentionContexts(Mention[] mentions)
Creates mention contexts for the specified mention exents. These are used to compute coreference features over.

Parameters:
mentions - The mention of a document.
Returns:
mention contexts for the specified mention exents.

train

void train()
           throws IOException
Trains the linker based on the data specified via calls to setEntities.

Throws:
IOException

getMentionFinder

MentionFinder getMentionFinder()
Returns the mention finder for this linker. This can be used to get the mentions of a Parse.

Returns:
The object which finds mentions for this linker.

getHeadFinder

HeadFinder getHeadFinder()
Returns the head finder associated with this linker.

Returns:
The head finder associated with this linker.


Copyright © 2010. All Rights Reserved.