public class DefaultNonReferentialResolver extends Object implements NonReferentialResolver
NonReferentialResolver
interface.Constructor and Description |
---|
DefaultNonReferentialResolver(String projectName,
String name,
ResolverMode mode) |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(MentionContext ec)
Designates that the specified mention be used for training.
|
protected List<String> |
getFeatures(MentionContext mention) |
protected List<String> |
getNonReferentialFeatures(MentionContext mention)
Returns a list of features used to predict whether the specified mention is non-referential.
|
double |
getNonReferentialProbability(MentionContext mention)
Returns the probability that the specified mention doesn't refer to any previous mention.
|
void |
train()
Trains a model based on the events given to this resolver via #addEvent.
|
public DefaultNonReferentialResolver(String projectName, String name, ResolverMode mode) throws IOException
IOException
public double getNonReferentialProbability(MentionContext mention)
NonReferentialResolver
getNonReferentialProbability
in interface NonReferentialResolver
mention
- The mention under consideration.public void addEvent(MentionContext ec)
NonReferentialResolver
addEvent
in interface NonReferentialResolver
ec
- The mention to be used. The mention id is used to determine
whether this mention is referential or non-referential.protected List<String> getFeatures(MentionContext mention)
protected List<String> getNonReferentialFeatures(MentionContext mention)
mention
- The mention under consideration.public void train() throws IOException
NonReferentialResolver
train
in interface NonReferentialResolver
IOException
- When the model can not be written out.Copyright © 2016 The Apache Software Foundation. All rights reserved.