public class KBPTokensregexExtractor extends java.lang.Object implements KBPRelationExtractor
Modifier and Type | Class and Description |
---|---|
static class |
KBPTokensregexExtractor.Object
IMPORTANT: Don't rename this class without updating the rules defs file.
|
static class |
KBPTokensregexExtractor.Subject
IMPORTANT: Don't rename this class without updating the rules defs file.
|
KBPRelationExtractor.Accuracy, KBPRelationExtractor.KBPInput, KBPRelationExtractor.NERTag, KBPRelationExtractor.RelationType
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIR |
protected static Redwood.RedwoodChannels |
logger |
static java.util.Optional<java.lang.String> |
PREDICTIONS |
static java.io.File |
TEST_FILE |
NO_RELATION
Constructor and Description |
---|
KBPTokensregexExtractor(java.lang.String tokensregexDir) |
KBPTokensregexExtractor(java.lang.String tokensregexDir,
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 static final Redwood.RedwoodChannels logger
@ArgumentParser.Option(name="dir", gloss="The tokensregex 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 KBPTokensregexExtractor(java.lang.String tokensregexDir)
public KBPTokensregexExtractor(java.lang.String tokensregexDir, boolean verbose)
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