public class KBPEnsembleExtractor extends java.lang.Object implements KBPRelationExtractor
KBPRelationExtractor.Accuracy, KBPRelationExtractor.KBPInput, KBPRelationExtractor.NERTag, KBPRelationExtractor.RelationType| Modifier and Type | Field and Description |
|---|---|
KBPRelationExtractor[] |
extractors
The extractors to run, in the order of priority they should be run in.
|
protected static Redwood.RedwoodChannels |
logger |
static java.util.Optional<java.lang.String> |
PREDICTIONS |
static java.io.File |
TEST_FILE |
NO_RELATION| Constructor and Description |
|---|
KBPEnsembleExtractor(KBPRelationExtractor... extractors)
Creates a new ensemble extractor from the given argument extractors.
|
| Modifier and Type | Method and Description |
|---|---|
Pair<java.lang.String,java.lang.Double> |
classify(KBPRelationExtractor.KBPInput input)
Classify the given sentence into the relation it expresses, with the associated
confidence.
|
static void |
main(java.lang.String[] args) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeAccuracy, readDatasetprotected static final Redwood.RedwoodChannels logger
@ArgumentParser.Option(name="predictions", gloss="Dump model predictions to this file") public static java.util.Optional<java.lang.String> PREDICTIONS
@ArgumentParser.Option(name="test", gloss="The dataset to test on") public static java.io.File TEST_FILE
public final KBPRelationExtractor[] extractors
public KBPEnsembleExtractor(KBPRelationExtractor... extractors)
extractors - A varargs list of extractors to union together.public Pair<java.lang.String,java.lang.Double> classify(KBPRelationExtractor.KBPInput input)
KBPRelationExtractorclassify in interface KBPRelationExtractorpublic static void main(java.lang.String[] args)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundException