public class CoreNlpParser extends Object implements InformationExtractionParser
Modifier and Type | Class and Description |
---|---|
static class |
CoreNlpParser.TripleReference
TripleReference holds a triple reference and characteristics
that allow for de-duplication.
|
Modifier and Type | Field and Description |
---|---|
static String |
MATCHEDEXPRESSION_RESULT_PREFIX_RELATIONMENTION
The prefix for matched epxression results for RelationMention definitions.
|
static String |
PIPELINE_PROPERTY_PREFIX
The prefix for properties to be sent to the pipeline.
|
REGEXRULE_MARKER
Constructor and Description |
---|
CoreNlpParser()
Default constructor for an CoreNlpParser.
|
Modifier and Type | Method and Description |
---|---|
protected InformationExtractionRelationTriple[] |
determineBestTriples()
Determines the set of "best triples" from the complete set of triples
across all sentences.
|
InformationExtraction |
getInformationExtraction()
Gets the InformationExtraction being processed.
|
AttributeValueTable |
getSettings()
Gets the effective settings for the current parse.
|
static long |
getTempFileCounter()
Gets a unique (to this JVM) temp file counter.
|
void |
initialize(InformationExtractionParserSpecification spec)
Initialize this instance.
|
void |
parse(InformationExtraction ext)
Performs a parse of the target InformationExtraction,
without a handler context.
|
void |
parse(InformationExtraction ext,
InformationExtractionHandlerDispatcher handler)
Performs a parse of the target InformationExtraction,
with a handler context.
|
void |
setInformationExtraction(InformationExtraction ext)
Sets the InformationExtraction being processed.
|
public static final String PIPELINE_PROPERTY_PREFIX
public static final String MATCHEDEXPRESSION_RESULT_PREFIX_RELATIONMENTION
public CoreNlpParser()
public void initialize(InformationExtractionParserSpecification spec) throws IfsException
Called immediately after construction (via the default constructor) and used so that the implementation can initialize session-independent state.
initialize
in interface InformationExtractionParser
spec
- The specification for a given implementation.IfsException
- if the operation fails.public AttributeValueTable getSettings()
public static long getTempFileCounter()
public void setInformationExtraction(InformationExtraction ext)
ext
- the InformationExtraction being processedpublic InformationExtraction getInformationExtraction()
public void parse(InformationExtraction ext) throws IfsException
parse
in interface InformationExtractionParser
ext
- the target InformationExtractionIfsException
- if the operation failspublic void parse(InformationExtraction ext, InformationExtractionHandlerDispatcher handler) throws IfsException
parse
in interface InformationExtractionParser
ext
- the target InformationExtractionhandler
- the handler requesting the parse (can be null)IfsException
- if the operation failsprotected InformationExtractionRelationTriple[] determineBestTriples() throws IfsException
IfsException
- if the operation failsCopyright © 2023. All rights reserved.