gate.creole.orthomatcher.SampleOrthoMatcher.SampleOrthoMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annie Show documentation
Show all versions of annie Show documentation
ANNIE is a general purpose information extraction system that
provides the building blocks of many other GATE applications.
package gate.creole.orthomatcher.SampleOrthoMatcher;
import gate.Resource;
import gate.creole.ResourceInstantiationException;
import gate.creole.orthomatcher.AnnotationOrthography;
import gate.creole.orthomatcher.OrthoMatcher;
/*
* This SampleOrthoMatcher shows you how to create your own Orthomatcher.
*/
public class SampleOrthoMatcher extends OrthoMatcher {
private static final long serialVersionUID = -1774167249206778293L;
@Override
public Resource init() throws ResourceInstantiationException {
super.setMinimumNicknameLikelihood(0.5); // the default value from the ANNIE/creole.xml
super.init();
AnnotationOrthography ortho = new SampleAnnotationOrthography(
this.getPersonType(),
this.getExtLists(),
this.getOrthography());
super.setOrthography(ortho);
return this;
}
}