GrammarScope  4.0.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Private Member Functions | Private Attributes | List of all members
grammarscope.ejb.client.parser.DocumentFactory Class Reference
Inheritance diagram for grammarscope.ejb.client.parser.DocumentFactory:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.ejb.client.parser.DocumentFactory:
Collaboration graph
[legend]

Public Member Functions

 DocumentFactory (final Language language) throws Exception
 
boolean init (final String text)
 
List< TokengetTokens (final int sentenceIdx) throws RuntimeException
 
TypedDependencyMode[] getSupportedModes () throws RuntimeException
 
TypedDependencyProvider[] getSupportedProviders () throws RuntimeException
 
 DocumentFactory (final Language language) throws Exception
 
boolean init (final String text)
 
List< TokengetTokens (final int sentenceIdx) throws RuntimeException
 
TypedDependencyProvider[] getSupportedProviders () throws RuntimeException
 
TypedDependencyMode[] getSupportedModes () throws RuntimeException
 
- Public Member Functions inherited from grammarscope.glue.AbstractDocumentFactory
 AbstractDocumentFactory (final Language language)
 
String getText () throws RuntimeException
 
List< SentenceSegmentgetSentences () throws RuntimeException
 
int getSentenceCount () throws RuntimeException
 
List< WordSegmentgetWords () throws RuntimeException
 
AParseTree getParseTree (final int sentenceIdx) throws RuntimeException
 
APartsOfSpeech getPoses (final int sentenceIdx) throws RuntimeException
 
AGrammaticalStructure getGrammaticalStructure (final int sentenceIdx) throws RuntimeException
 
ARelationDependents getRelationDependents (final int sentenceIdx) throws RuntimeException
 
ATypedDependencies getTypedDependencies (final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) throws RuntimeException
 
Map< TypedDependencyProvider, Map< TypedDependencyMode, ATypedDependencies > > getTypedDependencies (final int sentenceIdx) throws RuntimeException
 
ASemanticGraph getSemanticGraph (final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) throws RuntimeException
 
Map< TypedDependencyProvider, Map< TypedDependencyMode, ASemanticGraph > > getSemanticGraphs (final int sentenceIdx) throws RuntimeException
 
ANamedEntities getNamedEntities (final int sentenceIdx) throws RuntimeException
 
Sentiment getSentiment (final int sentenceIdx) throws RuntimeException
 
List< EntailmentgetEntailments (final int sentenceIdx)
 
List< TriplegetTriples (final int sentenceIdx)
 
ACoreferences getCoreferences () throws RuntimeException
 
ATextAnalysis getTextAnalysis (final TypedDependencyProvider provider, final TypedDependencyMode mode) throws RuntimeException
 
AAnalysis getAnalysis (final int sentenceIdx) throws RuntimeException
 
String[] getReports (final int sentenceIdx, final boolean xMLFlag) throws RuntimeException
 
String getReport (final int sentenceIdx, final boolean xMLFlag) throws RuntimeException
 
String getTextReport (final TypedDependencyProvider provider, final TypedDependencyMode mode, final boolean xMLModeFlag) throws RuntimeException
 
String[] getTextReports (final TypedDependencyProvider provider, final TypedDependencyMode mode, final boolean xMLModeFlag) throws RuntimeException
 

Static Public Member Functions

static void main (final String[] args) throws Exception
 
static void main (final String[] args) throws Exception
 

Static Public Attributes

static final int nTests = 1
 
- Static Public Attributes inherited from grammarscope.glue.AbstractDocumentFactory
static final XMLPrinter xMLPrinter = stanfordMode ? new XMLPrinterStanford() : new XMLPrinterGrammarScope()
 

Protected Member Functions

Segmentation getSegmentation () throws RuntimeException
 
Tree getStanfordParseTree (final int sentenceIdx) throws RuntimeException
 
GrammaticalStructure getStanfordGrammaticalStructure (final int sentenceIdx) throws RuntimeException
 
Collection< TypedDependency > getStanfordTypedDependencies (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
Collection< TypedDependency > getStanfordTypedDependencies2 (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
SemanticGraph getStanfordSemanticGraph (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
SemanticGraph getStanfordSemanticGraph2 (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
List< NamedEntitygetStanfordNamedEntities (final int sentenceIdx) throws RuntimeException
 
Sentiment getStanfordSentiment (final int sentenceIdx) throws RuntimeException
 
List< EntailmentgetStanfordEntailments (final int sentenceIdx) throws RuntimeException
 
List< TriplegetStanfordTriples (final int sentenceIdx) throws RuntimeException
 
Coreferences getStanfordCoreferences () throws RuntimeException
 
Segmentation getSegmentation () throws RuntimeException
 
Tree getStanfordParseTree (final int sentenceIdx) throws RuntimeException
 
GrammaticalStructure getStanfordGrammaticalStructure (final int sentenceIdx) throws RuntimeException
 
Collection< TypedDependency > getStanfordTypedDependencies (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
Collection< TypedDependency > getStanfordTypedDependencies2 (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
SemanticGraph getStanfordSemanticGraph (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
SemanticGraph getStanfordSemanticGraph2 (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException
 
List< NamedEntitygetStanfordNamedEntities (final int sentenceIdx) throws RuntimeException
 
Sentiment getStanfordSentiment (final int sentenceIdx) throws RuntimeException
 
List< EntailmentgetStanfordEntailments (final int sentenceIdx) throws RuntimeException
 
List< TriplegetStanfordTriples (final int sentenceIdx) throws RuntimeException
 
Coreferences getStanfordCoreferences () throws RuntimeException
 

Static Private Member Functions

static void mainSync (final String[] args) throws Exception
 
static void mainAsync (final String[] args) throws Exception
 
static void mainSync (final String[] args) throws Exception
 
static void mainAsync (final String[] args) throws Exception
 

Private Attributes

TextAnalysis textAnalysis
 

Additional Inherited Members

- Protected Attributes inherited from grammarscope.glue.AbstractDocumentFactory
final Language language
 
String text
 
final RelationDependentsDirectFactory relationDependentsDirectFactory
 
final Cache< List< Token > > tokens
 
final Cache< Tree > parseTrees
 
final Cache< GrammaticalStructure > grammaticalStructures
 
final Map< TypedDependencyMode, Cache< Collection< TypedDependency > > > typedDependencies
 
final Map< TypedDependencyMode, Cache< Collection< TypedDependency > > > typedDependencies2
 

Detailed Description

Document factory implementation as Stanford Parser EJB client

Author
Bernard Bou

Constructor & Destructor Documentation

◆ DocumentFactory() [1/2]

grammarscope.ejb.client.parser.DocumentFactory.DocumentFactory ( final Language  language) throws Exception

Constructor

Parameters
languagelanguage
Exceptions
Exceptionexception

◆ DocumentFactory() [2/2]

grammarscope.ejb.client.parser.DocumentFactory.DocumentFactory ( final Language  language) throws Exception

Constructor

Parameters
languagelanguage
Exceptions
Exceptionexception

Member Function Documentation

◆ getSegmentation() [1/2]

Segmentation grammarscope.ejb.client.parser.DocumentFactory.getSegmentation ( ) throws RuntimeException
protected

Get segmentation

Returns
segmentation
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getSegmentation() [2/2]

Segmentation grammarscope.ejb.client.parser.DocumentFactory.getSegmentation ( ) throws RuntimeException
protected

Get segmentation

Returns
segmentation
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordCoreferences() [1/2]

Coreferences grammarscope.ejb.client.parser.DocumentFactory.getStanfordCoreferences ( ) throws RuntimeException
protected

Get coreferences

Returns
coreference data if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordCoreferences() [2/2]

Coreferences grammarscope.ejb.client.parser.DocumentFactory.getStanfordCoreferences ( ) throws RuntimeException
protected

Get coreferences

Returns
coreference data if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordEntailments() [1/2]

List<Entailment> grammarscope.ejb.client.parser.DocumentFactory.getStanfordEntailments ( final int  sentenceIdx) throws RuntimeException
protected

Get entailments

Parameters
sentenceIdxsentence index
Returns
entailments

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordEntailments() [2/2]

List<Entailment> grammarscope.ejb.client.parser.DocumentFactory.getStanfordEntailments ( final int  sentenceIdx) throws RuntimeException
protected

Get entailments

Parameters
sentenceIdxsentence index
Returns
entailments

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordGrammaticalStructure() [1/2]

GrammaticalStructure grammarscope.ejb.client.parser.DocumentFactory.getStanfordGrammaticalStructure ( final int  sentenceIdx) throws RuntimeException
protected

Get grammatical structure

Parameters
sentenceIdxsentence
Returns
grammatical structure if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordGrammaticalStructure() [2/2]

GrammaticalStructure grammarscope.ejb.client.parser.DocumentFactory.getStanfordGrammaticalStructure ( final int  sentenceIdx) throws RuntimeException
protected

Get grammatical structure

Parameters
sentenceIdxsentence
Returns
grammatical structure if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordNamedEntities() [1/2]

List<NamedEntity> grammarscope.ejb.client.parser.DocumentFactory.getStanfordNamedEntities ( final int  sentenceIdx) throws RuntimeException
protected

Get named entities

Parameters
sentenceIdxsentence index
Returns
list of named entities
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordNamedEntities() [2/2]

List<NamedEntity> grammarscope.ejb.client.parser.DocumentFactory.getStanfordNamedEntities ( final int  sentenceIdx) throws RuntimeException
protected

Get named entities

Parameters
sentenceIdxsentence index
Returns
list of named entities
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordParseTree() [1/2]

Tree grammarscope.ejb.client.parser.DocumentFactory.getStanfordParseTree ( final int  sentenceIdx) throws RuntimeException
protected

Get parse tree

Parameters
sentenceIdxsentence index
Returns
parse tree if successful
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordParseTree() [2/2]

Tree grammarscope.ejb.client.parser.DocumentFactory.getStanfordParseTree ( final int  sentenceIdx) throws RuntimeException
protected

Get parse tree

Parameters
sentenceIdxsentence index
Returns
parse tree if successful
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordSemanticGraph() [1/2]

SemanticGraph grammarscope.ejb.client.parser.DocumentFactory.getStanfordSemanticGraph ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get semantic graph

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
semantic graph if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordSemanticGraph() [2/2]

SemanticGraph grammarscope.ejb.client.parser.DocumentFactory.getStanfordSemanticGraph ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get semantic graph

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
semantic graph if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordSemanticGraph2() [1/2]

SemanticGraph grammarscope.ejb.client.parser.DocumentFactory.getStanfordSemanticGraph2 ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get semantic graph (workflow 2)

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
semantic graph if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordSemanticGraph2() [2/2]

SemanticGraph grammarscope.ejb.client.parser.DocumentFactory.getStanfordSemanticGraph2 ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get semantic graph (workflow 2)

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
semantic graph if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordSentiment() [1/2]

Sentiment grammarscope.ejb.client.parser.DocumentFactory.getStanfordSentiment ( final int  sentenceIdx) throws RuntimeException
protected

Get sentiment

Parameters
sentenceIdxsentence index
Returns
sentiment

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordSentiment() [2/2]

Sentiment grammarscope.ejb.client.parser.DocumentFactory.getStanfordSentiment ( final int  sentenceIdx) throws RuntimeException
protected

Get sentiment

Parameters
sentenceIdxsentence index
Returns
sentiment

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordTriples() [1/2]

List<Triple> grammarscope.ejb.client.parser.DocumentFactory.getStanfordTriples ( final int  sentenceIdx) throws RuntimeException
protected

Get triples

Parameters
sentenceIdxsentence index
Returns
triples

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordTriples() [2/2]

List<Triple> grammarscope.ejb.client.parser.DocumentFactory.getStanfordTriples ( final int  sentenceIdx) throws RuntimeException
protected

Get triples

Parameters
sentenceIdxsentence index
Returns
triples

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordTypedDependencies() [1/2]

Collection<TypedDependency> grammarscope.ejb.client.parser.DocumentFactory.getStanfordTypedDependencies ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get typed dependencies

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
typed dependencies if successful
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordTypedDependencies() [2/2]

Collection<TypedDependency> grammarscope.ejb.client.parser.DocumentFactory.getStanfordTypedDependencies ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get typed dependencies

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
typed dependencies if successful
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordTypedDependencies2() [1/2]

Collection<TypedDependency> grammarscope.ejb.client.parser.DocumentFactory.getStanfordTypedDependencies2 ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get typed dependencies (workflow 2)

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
typed dependencies if successful
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getStanfordTypedDependencies2() [2/2]

Collection<TypedDependency> grammarscope.ejb.client.parser.DocumentFactory.getStanfordTypedDependencies2 ( final int  sentenceIdx,
final TypedDependencyMode  mode 
) throws RuntimeException
protected

Get typed dependencies (workflow 2)

Parameters
sentenceIdxsentence
modetyped dependency mode
Returns
typed dependencies if successful
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getSupportedModes() [1/2]

TypedDependencyMode [] grammarscope.ejb.client.parser.DocumentFactory.getSupportedModes ( ) throws RuntimeException

Get supported typed dependency modes

Returns
array of supported typed dependency modes
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getSupportedModes() [2/2]

TypedDependencyMode [] grammarscope.ejb.client.parser.DocumentFactory.getSupportedModes ( ) throws RuntimeException

Get supported typed dependency modes

Returns
array of supported typed dependency modes
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getSupportedProviders() [1/2]

TypedDependencyProvider [] grammarscope.ejb.client.parser.DocumentFactory.getSupportedProviders ( ) throws RuntimeException

Get supported typed dependency providers

Returns
array of supported typed dependency providers
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getSupportedProviders() [2/2]

TypedDependencyProvider [] grammarscope.ejb.client.parser.DocumentFactory.getSupportedProviders ( ) throws RuntimeException

Get supported typed dependency providers

Returns
array of supported typed dependency providers
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getTokens() [1/2]

List<Token> grammarscope.ejb.client.parser.DocumentFactory.getTokens ( final int  sentenceIdx) throws RuntimeException

Get tokens

Parameters
sentenceIdxsentence index
Returns
tokens
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ getTokens() [2/2]

List<Token> grammarscope.ejb.client.parser.DocumentFactory.getTokens ( final int  sentenceIdx) throws RuntimeException

Get tokens

Parameters
sentenceIdxsentence index
Returns
tokens
Exceptions
RuntimeExceptionexception

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ init() [1/2]

boolean grammarscope.ejb.client.parser.DocumentFactory.init ( final String  text)

Init processing

Parameters
textinput text
Returns
true if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ init() [2/2]

boolean grammarscope.ejb.client.parser.DocumentFactory.init ( final String  text)

Init processing

Parameters
textinput text
Returns
true if successful

Reimplemented from grammarscope.glue.AbstractDocumentFactory.

◆ main() [1/2]

static void grammarscope.ejb.client.parser.DocumentFactory.main ( final String[]  args) throws Exception
static

◆ main() [2/2]

static void grammarscope.ejb.client.parser.DocumentFactory.main ( final String[]  args) throws Exception
static

◆ mainAsync() [1/2]

static void grammarscope.ejb.client.parser.DocumentFactory.mainAsync ( final String[]  args) throws Exception
staticprivate

◆ mainAsync() [2/2]

static void grammarscope.ejb.client.parser.DocumentFactory.mainAsync ( final String[]  args) throws Exception
staticprivate

◆ mainSync() [1/2]

static void grammarscope.ejb.client.parser.DocumentFactory.mainSync ( final String[]  args) throws Exception
staticprivate

◆ mainSync() [2/2]

static void grammarscope.ejb.client.parser.DocumentFactory.mainSync ( final String[]  args) throws Exception
staticprivate

Member Data Documentation

◆ nTests

static final int grammarscope.ejb.client.parser.DocumentFactory.nTests = 1
static

◆ textAnalysis

TextAnalysis grammarscope.ejb.client.parser.DocumentFactory.textAnalysis
private

Analysis


The documentation for this class was generated from the following file: