public class KBPSemgrexExtractor extends java.lang.Object implements KBPRelationExtractor
KBPRelationExtractor.Accuracy, KBPRelationExtractor.KBPInput, KBPRelationExtractor.NERTag, KBPRelationExtractor.RelationType
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIR |
protected Redwood.RedwoodChannels |
logger |
static java.util.Optional<java.lang.String> |
PREDICTIONS |
static java.io.File |
TEST_FILE |
NO_RELATION
Constructor and Description |
---|
KBPSemgrexExtractor(java.lang.String semgrexdir) |
KBPSemgrexExtractor(java.lang.String semgrexdir,
boolean verbose) |
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, wait
computeAccuracy, readDataset
protected final Redwood.RedwoodChannels logger
@ArgumentParser.Option(name="dir", gloss="The semgrex directory") public static java.lang.String DIR
@ArgumentParser.Option(name="test", gloss="The dataset to test on") public static java.io.File TEST_FILE
@ArgumentParser.Option(name="predictions", gloss="Dump model predictions to this file") public static java.util.Optional<java.lang.String> PREDICTIONS
public KBPSemgrexExtractor(java.lang.String semgrexdir) throws java.io.IOException
java.io.IOException
public KBPSemgrexExtractor(java.lang.String semgrexdir, boolean verbose) throws java.io.IOException
java.io.IOException
public Pair<java.lang.String,java.lang.Double> classify(KBPRelationExtractor.KBPInput input)
KBPRelationExtractor
classify
in interface KBPRelationExtractor
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException