public abstract class XMLDocumentFactory extends XMLDocument implements IDocumentFactory
COREFERENCE, COREFERENCE_END, COREFERENCE_HEAD, COREFERENCE_MENTION, COREFERENCE_MENTION_FROM, COREFERENCE_MENTION_REPRESENTATIVE, COREFERENCE_MENTION_TO, COREFERENCE_SENTENCE, COREFERENCE_START, COREFERENCE_TEXT, coreferences, COREFERENCES, DEPENDENCY, DEPENDENCY_TYPE, DEPENDENT, DEPENDENT_IDX, DOCUMENT, domDocument, ENTAILMENT, ENTAILMENT_SCORE, entailments, ENTAILMENTS, GOVERNOR, GOVERNOR_IDX, grammaticalStructures, GRAPH, GRAPH_DEPENDENCIES, GRAPH_MODE, GRAPH_PROVIDER, GRAPH_ROOT, GRAPH_ROOT_IDX, GRAPH_ROOTS, GRAPH_SET, GSNODE, GSNODE_ANNOTATION, GSNODE_ANNOTATION_KEY, GSNODE_DEPENDENT, GSNODE_GOVERNOR, GSNODE_HEAD, GSNODE_IDX, GSNODE_LEMMA, GSNODE_RELATION, GSNODE_SCORE, GSNODE_VALUE, GSNODE_WORD, GSNODE_WORD_IDX, GSTRUCTURE, GSTRUCTURE_FORMAT, NAMED_ENTITIES, NAMED_ENTITY, NAMED_ENTITY_ANIMACY, NAMED_ENTITY_FROM, NAMED_ENTITY_GENDER, NAMED_ENTITY_NUMBER, NAMED_ENTITY_TO, NAMED_ENTITY_WORD, namedEntities, PARSE, PARSE_FORMAT, PARSE_NODE, PARSE_NODE_IDX, PARSE_NODE_LEMMA, PARSE_NODE_SCORE, PARSE_NODE_VALUE, PARSE_NODE_WORD, PARSE_NODE_WORD_IDX, parses, poses, RELATION, ROOT, ROOT_FORMAT, segments, semanticGraphs, SENTENCE, SENTENCE_BEGIN, SENTENCE_END, SENTENCE_FROM, SENTENCE_IDX, SENTENCE_TEXT, SENTENCE_TO, SENTENCES, SENTIMENT, SENTIMENT_CLASS, SENTIMENT_VALUE, sentiments, stanfordMode, text, TEXT, TOKEN, TOKEN_BEGIN, TOKEN_END, TOKEN_FROM, TOKEN_IDX, TOKEN_LEMMA, TOKEN_NER, TOKEN_NORM_NER, TOKEN_POS, TOKEN_SENTIMENT, TOKEN_SPEAKER, TOKEN_TO, TOKEN_WORD, tokens, TOKENS, TRIPLE, TRIPLE_OBJECT, TRIPLE_RELATION, TRIPLE_SUBJECT, triples, TRIPLES, typedDependencies, TYPEDDEPENDENCIES, TYPEDDEPENDENCIES_MODE, TYPEDDEPENDENCIES_PROVIDER, TYPEDDEPENDENCIES_SET, TYPEDDEPENDENCIES_STYLE, url
Constructor and Description |
---|
XMLDocumentFactory(java.net.URL url)
Constructor
|
Modifier and Type | Method and Description |
---|---|
AAnalysis |
getAnalysis(int sentenceIdx)
Get (sentence) analysis artifact
|
ACoreferences |
getCoreferences()
Get coreferences artifact
|
java.util.List<Entailment> |
getEntailments(int sentenceIdx)
Get entailments
|
AGrammaticalStructure |
getGrammaticalStructure(int sentenceIdx)
Get grammatical structure artifact
|
ANamedEntities |
getNamedEntities(int sentenceIdx)
Get named entities artifact
|
AParseTree |
getParseTree(int sentenceIdx)
Get parse artifact
|
APartsOfSpeech |
getPoses(int sentenceIdx)
Get parts-of-speech artifact
|
ARelationDependents |
getRelationDependents(int sentenceIdx)
Get relation dependents artifact
|
java.lang.String |
getReport(int sentenceIdx,
boolean xMLFlag)
Get (sentence) analysis string
|
java.lang.String[] |
getReports(int sentenceIdx,
boolean xMLFlag)
Get (sentence) analysis strings
|
ASemanticGraph |
getSemanticGraph(int sentenceIdx,
TypedDependencyProvider provider,
TypedDependencyMode mode)
Get semantic graph artifact
|
java.util.Map<TypedDependencyProvider,java.util.Map<TypedDependencyMode,ASemanticGraph>> |
getSemanticGraphs(int sentenceIdx)
Get semantic graph artifacts
|
int |
getSentenceCount()
Get sentence count
|
java.util.List<SentenceSegment> |
getSentences()
Get sentences
|
Sentiment |
getSentiment(int sentenceIdx)
Get sentiment
|
TypedDependencyMode[] |
getSupportedModes()
Get supported typed dependency modes
|
TypedDependencyProvider[] |
getSupportedProviders()
Get supported typed dependency providers
|
java.lang.String |
getText()
Get text
|
ATextAnalysis |
getTextAnalysis(TypedDependencyProvider provider,
TypedDependencyMode mode)
Get text analysis
|
java.lang.String |
getTextReport(TypedDependencyProvider provider,
TypedDependencyMode mode,
boolean xMLModeFlag)
Get text report
|
java.lang.String[] |
getTextReports(TypedDependencyProvider provider,
TypedDependencyMode mode,
boolean xMLModeFlag)
Get text reports
|
java.util.List<Token> |
getTokens(int sentenceIdx)
Get tokens
|
java.util.List<Triple> |
getTriples(int sentenceIdx)
Get triples
|
java.util.Map<TypedDependencyProvider,java.util.Map<TypedDependencyMode,ATypedDependencies>> |
getTypedDependencies(int sentenceIdx)
Get typed dependencies artifact
|
ATypedDependencies |
getTypedDependencies(int sentenceIdx,
TypedDependencyProvider provider,
TypedDependencyMode mode)
Get typed dependencies artifact
|
java.util.List<WordSegment> |
getWords()
Get words
|
boolean |
init(java.lang.String text)
Init processing
|
init
public XMLDocumentFactory(java.net.URL url)
url
- XML document URLpublic boolean init(java.lang.String text)
IDocumentFactory
init
in interface IDocumentFactory
text
- input textpublic java.lang.String getText() throws java.lang.RuntimeException
IDocumentFactoryService
getText
in interface IDocumentFactoryService
java.lang.RuntimeException
public java.util.List<WordSegment> getWords() throws java.lang.RuntimeException
IDocumentFactoryService
getWords
in interface IDocumentFactoryService
java.lang.RuntimeException
public int getSentenceCount() throws java.lang.RuntimeException
IDocumentFactoryService
getSentenceCount
in interface IDocumentFactoryService
java.lang.RuntimeException
public java.util.List<SentenceSegment> getSentences() throws java.lang.RuntimeException
IDocumentFactoryService
getSentences
in interface IDocumentFactoryService
java.lang.RuntimeException
public java.util.List<Token> getTokens(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getTokens
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
- runtime exceptionpublic APartsOfSpeech getPoses(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getPoses
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public AParseTree getParseTree(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getParseTree
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public AGrammaticalStructure getGrammaticalStructure(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getGrammaticalStructure
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public ARelationDependents getRelationDependents(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getRelationDependents
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public ATypedDependencies getTypedDependencies(int sentenceIdx, TypedDependencyProvider provider, TypedDependencyMode mode) throws java.lang.RuntimeException
IDocumentFactoryService
getTypedDependencies
in interface IDocumentFactoryService
sentenceIdx
- sentence indexprovider
- typed dependency providermode
- typed dependency modejava.lang.RuntimeException
public java.util.Map<TypedDependencyProvider,java.util.Map<TypedDependencyMode,ATypedDependencies>> getTypedDependencies(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getTypedDependencies
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public ASemanticGraph getSemanticGraph(int sentenceIdx, TypedDependencyProvider provider, TypedDependencyMode mode) throws java.lang.RuntimeException
IDocumentFactoryService
getSemanticGraph
in interface IDocumentFactoryService
sentenceIdx
- sentence indexprovider
- typed dependency providermode
- typed dependency modejava.lang.RuntimeException
public java.util.Map<TypedDependencyProvider,java.util.Map<TypedDependencyMode,ASemanticGraph>> getSemanticGraphs(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getSemanticGraphs
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public ANamedEntities getNamedEntities(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getNamedEntities
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public Sentiment getSentiment(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getSentiment
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public java.util.List<Entailment> getEntailments(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getEntailments
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public java.util.List<Triple> getTriples(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getTriples
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public ACoreferences getCoreferences() throws java.lang.RuntimeException
IDocumentFactoryService
getCoreferences
in interface IDocumentFactoryService
java.lang.RuntimeException
public AAnalysis getAnalysis(int sentenceIdx) throws java.lang.RuntimeException
IDocumentFactoryService
getAnalysis
in interface IDocumentFactoryService
sentenceIdx
- sentence indexjava.lang.RuntimeException
public ATextAnalysis getTextAnalysis(TypedDependencyProvider provider, TypedDependencyMode mode) throws java.lang.RuntimeException
IDocumentFactoryService
getTextAnalysis
in interface IDocumentFactoryService
provider
- providermode
- modejava.lang.RuntimeException
public java.lang.String[] getReports(int sentenceIdx, boolean xMLFlag) throws java.lang.RuntimeException
IDocumentFactoryService
getReports
in interface IDocumentFactoryService
sentenceIdx
- sentence indexxMLFlag
- XML format requestedjava.lang.RuntimeException
public java.lang.String getReport(int sentenceIdx, boolean xMLFlag) throws java.lang.RuntimeException
IDocumentFactoryService
getReport
in interface IDocumentFactoryService
sentenceIdx
- sentence indexxMLFlag
- XML format requestedjava.lang.RuntimeException
public java.lang.String getTextReport(TypedDependencyProvider provider, TypedDependencyMode mode, boolean xMLModeFlag) throws java.lang.RuntimeException
getTextReport
in interface IDocumentFactoryService
mode
- typed dependency modexMLModeFlag
- xml formprovider
- providerjava.lang.RuntimeException
- exceptionpublic java.lang.String[] getTextReports(TypedDependencyProvider provider, TypedDependencyMode mode, boolean xMLModeFlag) throws java.lang.RuntimeException
getTextReports
in interface IDocumentFactoryService
mode
- typed dependency modexMLModeFlag
- xml formprovider
- providerjava.lang.RuntimeException
- exceptionpublic TypedDependencyProvider[] getSupportedProviders()
IDocumentFactoryService
getSupportedProviders
in interface IDocumentFactoryService
public TypedDependencyMode[] getSupportedModes()
IDocumentFactoryService
getSupportedModes
in interface IDocumentFactoryService