public class DefaultLinker extends AbstractLinker
Modifier and Type | Field and Description |
---|---|
protected MaxentCompatibilityModel |
mcm |
corefProject, debug, entities, headFinder, linker, mentionFinder, mode, removeUnresolvedMentions, resolverNames, resolvers, SINGULAR_PRONOUN, useDiscourseModel
COMBINED_NPS, DESCRIPTOR, ISA, NP, PRONOUN_MODIFIER, PROPER_NOUN_MODIFIER
Constructor and Description |
---|
DefaultLinker(String modelDirectory,
LinkerMode mode)
Creates a new linker with the specified model directory, running in the specified mode.
|
DefaultLinker(String modelDirectory,
LinkerMode mode,
boolean useDiscourseModel)
Creates a new linker with the specified model directory, running in the specified mode which uses a discourse model
based on the specified parameter.
|
DefaultLinker(String modelDirectory,
LinkerMode mode,
boolean useDiscourseModel,
double fixedNonReferentialProbability)
Creates a new linker with the specified model directory, running in the specified mode which uses a discourse model
based on the specified parameter and uses the specified fixed non-referential probability.
|
Modifier and Type | Method and Description |
---|---|
protected Gender |
computeGender(MentionContext mention) |
protected Number |
computeNumber(MentionContext mention) |
protected void |
initHeadFinder()
Initializes the head finder for this linker.
|
protected void |
initMentionFinder()
Initializes the mention finder for this linker.
|
protected void |
initResolvers(LinkerMode mode,
double fixedNonReferentialProbability)
Initializes the resolvers used by this linker.
|
checkForMerges, constructMentionContexts, getEntities, getHeadFinder, getMentionFinder, resolve, setEntities, train, updateExtent
protected MaxentCompatibilityModel mcm
public DefaultLinker(String modelDirectory, LinkerMode mode) throws IOException
modelDirectory
- The directory where the models for this linker are kept.mode
- The mode that this linker is running in.IOException
- when the models can not be read or written to based on the mode.public DefaultLinker(String modelDirectory, LinkerMode mode, boolean useDiscourseModel) throws IOException
modelDirectory
- The directory where the models for this linker are kept.mode
- The mode that this linker is running in.useDiscourseModel
- Whether the model should use a discourse model or not.IOException
- when the models can not be read or written to based on the mode.public DefaultLinker(String modelDirectory, LinkerMode mode, boolean useDiscourseModel, double fixedNonReferentialProbability) throws IOException
modelDirectory
- The directory where the models for this linker are kept.mode
- The mode that this linker is running in.useDiscourseModel
- Whether the model should use a discourse model or not.fixedNonReferentialProbability
- The probability which resolvers are required to exceed to positi a coreference relationship.IOException
- when the models can not be read or written to based on the mode.protected void initResolvers(LinkerMode mode, double fixedNonReferentialProbability) throws IOException
mode
- The mode in which this linker is being used.fixedNonReferentialProbability
- IOException
protected void initHeadFinder()
protected void initMentionFinder()
protected Gender computeGender(MentionContext mention)
computeGender
in class AbstractLinker
protected Number computeNumber(MentionContext mention)
computeNumber
in class AbstractLinker
Copyright © 2019 The Apache Software Foundation. All rights reserved.