public class EntityPhraseJsonParser extends Object
Modifier and Type | Class and Description |
---|---|
class |
EntityPhraseJsonParser.EntityPhraseJsonArray
EntityPhraseJsonArray holds a representation of a JSON array
in a raw format.
|
class |
EntityPhraseJsonParser.EntityPhraseJsonObject
EntityPhraseJsonObject holds a representation of an object holding
a potential entity phrase, in a raw format.
|
Modifier and Type | Field and Description |
---|---|
static int |
CHAR_REPLACE_ALL_ILLEGAL_CHARS
The enumerated value indicating to replace any illegal foldered object characters with dashes in a String.
|
static int |
CHAR_REPLACE_NEWLINES
The enumerated value indicating to replace any newline characters with spaces in a String.
|
static int |
CHAR_REPLACE_NONE
The enumerated value indicating not to replace any characters in a String.
|
static String |
INDENT
Amount to indent when building indented trees.
|
Constructor and Description |
---|
EntityPhraseJsonParser(InputStream stream)
Constructs a EntityPhraseJsonParser from an InputStream.
|
EntityPhraseJsonParser(Reader reader)
Constructs a EntityPhraseJsonParser from a Reader.
|
EntityPhraseJsonParser(String text)
Constructs a EntityPhraseJsonParser from literal JSON text.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(InformationExtractionDomainSpecification dspec)
Execute the prepared JSON, creating all of the phrases encountered.
|
List<String> |
getEventStrings()
Gets the parsed event strings.
|
List<String> |
getParsedJsonTree(String indent)
Gets the String list representation of the parsed object.
|
void |
parse()
Perform the parse for this instance.
|
void |
prepare(InformationExtractionDomainSpecification dspec)
Prepare the parsed JSON for execution.
|
public static final int CHAR_REPLACE_NONE
public static final int CHAR_REPLACE_NEWLINES
public static final int CHAR_REPLACE_ALL_ILLEGAL_CHARS
public static final String INDENT
public EntityPhraseJsonParser(String text)
text
- the JSON text.public EntityPhraseJsonParser(Reader reader)
reader
- the reader containing the JSONpublic EntityPhraseJsonParser(InputStream stream)
stream
- the stream containing the JSONpublic List<String> getEventStrings()
public List<String> getParsedJsonTree(String indent)
public void parse()
text
- the JSON text.public void prepare(InformationExtractionDomainSpecification dspec) throws IfsException
dspec
- the Domain SpecificationIfsException
- if the operation failspublic void execute(InformationExtractionDomainSpecification dspec) throws IfsException
dspec
- the Domain SpecificationIfsException
- if the operation failsCopyright © 2023. All rights reserved.