public class KBPEnsembleExtractor extends 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 Optional<String> |
PREDICTIONS |
static 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<String,Double> |
classify(KBPRelationExtractor.KBPInput input)
Classify the given sentence into the relation it expresses, with the associated
confidence.
|
static void |
main(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 Optional<String> PREDICTIONS
@ArgumentParser.Option(name="test", gloss="The dataset to test on") public static File TEST_FILE
public final KBPRelationExtractor[] extractors
public KBPEnsembleExtractor(KBPRelationExtractor... extractors)
extractors - A varargs list of extractors to union together.public Pair<String,Double> classify(KBPRelationExtractor.KBPInput input)
KBPRelationExtractorclassify in interface KBPRelationExtractorpublic static void main(String[] args) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundException