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 inormation provided via calls to setEntities into a model.

Author:
Tom Morton

Field Summary
static java.lang.String COMBINED_NPS
          String constatant used to label a mention which consists of two or more noun phrases.
static java.lang.String DESCRIPTOR
          String constant used to label a mention which is a description.
static java.util.regex.Pattern designatorsPattern
          Regular expression for English corporate designators.
static java.util.regex.Pattern femalePronounPattern
          Regular expression for English female pronouns.
static java.util.regex.Pattern firstPersonPronounPattern
          Regular expression for English first person pronouns.
static java.util.regex.Pattern honorificsPattern
          Regular expression for English honorifics.
static java.lang.String ISA
          String constation used to label an mention in an appositive relationship.
static java.util.regex.Pattern malePronounPattern
          Regular expression for English male pronouns.
static java.util.regex.Pattern neuterPronounPattern
          Regular expression for English nueter pronouns.
static java.lang.String NP
          String constatant used to label a mention which consists of a single noun phrase.
static java.util.regex.Pattern pluralPronounPattern
          Regular expression for English plural pronouns.
static java.util.regex.Pattern pluralThirdPersonPronounPattern
          Regular expression for English plural third person pronouns.
static java.lang.String PRONOUN_MODIFIER
          String constatant used to label a mention which is a pronoun.
static java.lang.String PROPER_NOUN_MODIFIER
          String constatant used to label a mention which is a proper noun modifing another noun.
static java.util.regex.Pattern secondPersonPronounPattern
          Regular expression for English singular second person pronouns.
static java.util.regex.Pattern singularPronounPattern
          Regular expression for English singular pronouns.
static java.util.regex.Pattern singularThirdPersonPronounPattern
          Regular expression for English singular third person pronouns.
static java.util.regex.Pattern speechPronounPattern
          Regular expression for English speech pronouns.
static java.util.regex.Pattern thirdPersonPronounPattern
          Regular expression for English third person pronouns.
 
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 java.lang.String DESCRIPTOR
String constant used to label a mention which is a description.

See Also:
Constant Field Values

ISA

static final java.lang.String ISA
String constation used to label an mention in an appositive relationship.

See Also:
Constant Field Values

COMBINED_NPS

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

See Also:
Constant Field Values

NP

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

See Also:
Constant Field Values

PROPER_NOUN_MODIFIER

static final java.lang.String PROPER_NOUN_MODIFIER
String constatant used to label a mention which is a proper noun modifing another noun.

See Also:
Constant Field Values

PRONOUN_MODIFIER

static final java.lang.String PRONOUN_MODIFIER
String constatant used to label a mention which is a pronoun.

See Also:
Constant Field Values

singularThirdPersonPronounPattern

static final java.util.regex.Pattern singularThirdPersonPronounPattern
Regular expression for English singular third person pronouns.


pluralThirdPersonPronounPattern

static final java.util.regex.Pattern pluralThirdPersonPronounPattern
Regular expression for English plural third person pronouns.


speechPronounPattern

static final java.util.regex.Pattern speechPronounPattern
Regular expression for English speech pronouns.


malePronounPattern

static final java.util.regex.Pattern malePronounPattern
Regular expression for English male pronouns.


femalePronounPattern

static final java.util.regex.Pattern femalePronounPattern
Regular expression for English female pronouns.


neuterPronounPattern

static final java.util.regex.Pattern neuterPronounPattern
Regular expression for English nueter pronouns.


firstPersonPronounPattern

static final java.util.regex.Pattern firstPersonPronounPattern
Regular expression for English first person pronouns.


secondPersonPronounPattern

static final java.util.regex.Pattern secondPersonPronounPattern
Regular expression for English singular second person pronouns.


thirdPersonPronounPattern

static final java.util.regex.Pattern thirdPersonPronounPattern
Regular expression for English third person pronouns.


singularPronounPattern

static final java.util.regex.Pattern singularPronounPattern
Regular expression for English singular pronouns.


pluralPronounPattern

static final java.util.regex.Pattern pluralPronounPattern
Regular expression for English plural pronouns.


honorificsPattern

static final java.util.regex.Pattern honorificsPattern
Regular expression for English honorifics.


designatorsPattern

static final java.util.regex.Pattern designatorsPattern
Regular expression for English corporate designators.

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 java.io.IOException
Trains the linker based on the data specified via calls to setEntities.

Throws:
java.io.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 2008 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.