public interface KBPRelationExtractor
Modifier and Type | Interface and Description |
---|---|
static class |
KBPRelationExtractor.Accuracy
A class to compute the accuracy of a relation extractor.
|
static class |
KBPRelationExtractor.KBPInput |
static class |
KBPRelationExtractor.NERTag
A list of valid KBP NER tags.
|
static class |
KBPRelationExtractor.RelationType
Known relation types (last updated for the 2013 shared task).
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NO_RELATION
The special tag for no relation.
|
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.
|
default KBPRelationExtractor.Accuracy |
computeAccuracy(java.util.stream.Stream<Pair<KBPRelationExtractor.KBPInput,java.lang.String>> examples,
java.util.Optional<java.io.PrintStream> predictOut) |
static java.util.List<Pair<KBPRelationExtractor.KBPInput,java.lang.String>> |
readDataset(java.io.File conllInputFile)
Read a dataset from a CoNLL formatted input file
|
static final java.lang.String NO_RELATION
Pair<java.lang.String,java.lang.Double> classify(KBPRelationExtractor.KBPInput input)
static java.util.List<Pair<KBPRelationExtractor.KBPInput,java.lang.String>> readDataset(java.io.File conllInputFile) throws java.io.IOException
conllInputFile
- The input file, formatted as a TSVjava.io.IOException
default KBPRelationExtractor.Accuracy computeAccuracy(java.util.stream.Stream<Pair<KBPRelationExtractor.KBPInput,java.lang.String>> examples, java.util.Optional<java.io.PrintStream> predictOut)