|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopennlp.tools.coref.AbstractLinker
public abstract class AbstractLinker
Provides a default implementation of many of the methods in Linker
that
most implementations of Linker
will want to extend.
Field Summary |
---|
Fields inherited from interface opennlp.tools.coref.Linker |
---|
COMBINED_NPS, DESCRIPTOR, ISA, NP, PRONOUN_MODIFIER, PROPER_NOUN_MODIFIER |
Constructor Summary | |
---|---|
AbstractLinker(String project,
LinkerMode mode)
Creates a new linker using the models in the specified project directory and using the specified mode. |
|
AbstractLinker(String project,
LinkerMode mode,
boolean useDiscourseModel)
Creates a new linker using the models in the specified project directory, using the specified mode, and combining coreferent entities based on the specified value. |
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 . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractLinker(String project, LinkerMode mode)
project
- The location of the models or other data needed by this linker.mode
- The mode the linker should be run in: testing, training, or evaluation.public AbstractLinker(String project, LinkerMode mode, boolean useDiscourseModel)
project
- The location of the models or other data needed by this linker.mode
- The mode the linker should be run in: testing, training, or evaluation.useDiscourseModel
- Specifies whether coreferent mention should be combined or not.Method Detail |
---|
public HeadFinder getHeadFinder()
Linker
getHeadFinder
in interface Linker
public DiscourseEntity[] getEntities(Mention[] mentions)
Linker
getEntities
in interface Linker
mentions
- A array of mentions.
public void setEntities(Mention[] mentions)
Linker
setEntities
in interface Linker
mentions
- The mentions to be used to train the linker.public void train() throws IOException
Linker
setEntities
.
train
in interface Linker
IOException
public MentionFinder getMentionFinder()
Linker
getMentionFinder
in interface Linker
public MentionContext[] constructMentionContexts(Mention[] mentions)
Linker
constructMentionContexts
in interface Linker
mentions
- The mention of a document.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |