![]() |
GrammarScope
4.0.0
|


Classes | |
| class | Cache |
Public Member Functions | |
| AbstractDocumentFactory (final Language language) | |
| boolean | init (final String text) |
| abstract List< Token > | getTokens (final int sentenceIdx) throws RuntimeException |
| abstract TypedDependencyProvider[] | getSupportedProviders () throws RuntimeException |
| abstract TypedDependencyMode[] | getSupportedModes () throws RuntimeException |
| String | getText () throws RuntimeException |
| List< SentenceSegment > | getSentences () throws RuntimeException |
| int | getSentenceCount () throws RuntimeException |
| List< WordSegment > | getWords () 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< Entailment > | getEntailments (final int sentenceIdx) |
| List< Triple > | getTriples (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 Attributes | |
| static final XMLPrinter | xMLPrinter = stanfordMode ? new XMLPrinterStanford() : new XMLPrinterGrammarScope() |
Protected Member Functions | |
| abstract Segmentation | getSegmentation () throws RuntimeException |
| abstract Tree | getStanfordParseTree (final int sentenceIdx) throws RuntimeException |
| abstract GrammaticalStructure | getStanfordGrammaticalStructure (final int sentenceIdx) throws RuntimeException |
| abstract Collection< TypedDependency > | getStanfordTypedDependencies (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException |
| abstract Collection< TypedDependency > | getStanfordTypedDependencies2 (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException |
| abstract SemanticGraph | getStanfordSemanticGraph (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException |
| abstract SemanticGraph | getStanfordSemanticGraph2 (final int sentenceIdx, final TypedDependencyMode mode) throws RuntimeException |
| abstract List< NamedEntity > | getStanfordNamedEntities (final int sentenceIdx) throws RuntimeException |
| abstract Sentiment | getStanfordSentiment (int sentenceIdx) |
| abstract List< Entailment > | getStanfordEntailments (int sentenceIdx) |
| abstract List< Triple > | getStanfordTriples (int sentenceIdx) |
| abstract Coreferences | getStanfordCoreferences () throws RuntimeException |
Protected Attributes | |
| 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 |
Private Member Functions | |
| Map< TypedDependencyMode, Collection< TypedDependency > > | makeTypedDependencies (final int sentenceIdx) |
| Map< TypedDependencyMode, Collection< TypedDependency > > | makeTypedDependencies2 (final int sentenceIdx) |
| Map< TypedDependencyMode, SemanticGraph > | makeSemanticGraphs (final int sentenceIdx) |
| Map< TypedDependencyMode, SemanticGraph > | makeSemanticGraphs2 (final int sentenceIdx) |
Static Private Member Functions | |
| static List< SentenceSegment > | groupToSentence (final List< List< WordSegment >> sentenceWordSegments) |
| static List< WordSegment > | flatten (final List< List< WordSegment >> sentenceWordSegments) |
| static Segment | getSpan (final List<? extends Segment > segments) |
| static String | tokensToString (final List< Token > tokens, @SuppressWarnings("SameParameterValue") final String tokenizer, final boolean isXml) |
| static String | treeToString (final Tree parseTree, final boolean isXml) |
| static String | grammaticalStructureToString (final GrammaticalStructure grammaticalStructure, final boolean isXml) |
| static String | typedDependenciesToString (final Map< TypedDependencyMode, Collection< TypedDependency >> typedDependencies, final TypedDependencyProvider provider, final boolean isXML) |
| static String | semanticGraphsToString (final Map< TypedDependencyMode, SemanticGraph > semanticGraphs, final TypedDependencyProvider provider, final boolean isXml) |
| static String | namedEntitiesToString (final List< NamedEntity > namedEntities, final String sentenceString, final SentenceSegment sentenceSegment, final boolean isXml) |
| static String | sentimentToString (final Sentiment sentiment, final boolean isXml) |
| static String | entailmentsToString (final List< Entailment > entailments, final boolean isXml) |
| static String | triplesToString (final List< Triple > triples, final boolean isXml) |
| static String | coreferencesToString (final Coreferences coreferences, final boolean isXml) |
Private Attributes | |
| List< WordSegment > | wordSegments |
| List< SentenceSegment > | sentenceSegments |
Static Private Attributes | |
| static final boolean | stanfordMode = false |
| static final boolean | relationDependentsFromGrammaticalStructure = false |
Abstract document factory
| grammarscope.glue.AbstractDocumentFactory.AbstractDocumentFactory | ( | final Language | language | ) |
Constructor
| language | language |
|
staticprivate |
Coreferences to string
| coreferences | coreferences |
| isXml | xml format |
|
staticprivate |
Entailments to string
| entailments | entailments |
| isXml | xml format |
|
staticprivate |
Flatten hierarchical list of per-sentence word segments
| sentenceWordSegments | hierarchical list of per-sentence word segments |
| AAnalysis grammarscope.glue.AbstractDocumentFactory.getAnalysis | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get (sentence) analysis artifact
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| ACoreferences grammarscope.glue.AbstractDocumentFactory.getCoreferences | ( | ) | throws RuntimeException |
Get coreferences artifact
Implements grammarscope.iface.IDocumentFactoryService.
| List<Entailment> grammarscope.glue.AbstractDocumentFactory.getEntailments | ( | final int | sentenceIdx | ) |
Get entailments
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| AGrammaticalStructure grammarscope.glue.AbstractDocumentFactory.getGrammaticalStructure | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get grammatical structure artifact
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| ANamedEntities grammarscope.glue.AbstractDocumentFactory.getNamedEntities | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get named entities artifact
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| AParseTree grammarscope.glue.AbstractDocumentFactory.getParseTree | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get parse artifact
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| APartsOfSpeech grammarscope.glue.AbstractDocumentFactory.getPoses | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get parts-of-speech artifact
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| ARelationDependents grammarscope.glue.AbstractDocumentFactory.getRelationDependents | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get relation dependents artifact
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| String grammarscope.glue.AbstractDocumentFactory.getReport | ( | final int | sentenceIdx, |
| final boolean | xmlFlag | ||
| ) | throws RuntimeException |
Get (sentence) analysis string
| sentenceIdx | sentence index |
| xmlFlag | XML format requested |
Implements grammarscope.iface.IDocumentFactoryService.
| String [] grammarscope.glue.AbstractDocumentFactory.getReports | ( | final int | sentenceIdx, |
| final boolean | xmlFlag | ||
| ) | throws RuntimeException |
Get (sentence) analysis strings
| sentenceIdx | sentence index |
| xmlFlag | XML format requested |
Implements grammarscope.iface.IDocumentFactoryService.
|
abstractprotected |
Get segmentation
| RuntimeException | exception |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
| ASemanticGraph grammarscope.glue.AbstractDocumentFactory.getSemanticGraph | ( | final int | sentenceIdx, |
| final TypedDependencyProvider | provider, | ||
| final TypedDependencyMode | mode | ||
| ) | throws RuntimeException |
Get semantic graph artifact
| sentenceIdx | sentence index |
| provider | typed dependency provider |
| mode | typed dependency mode |
Implements grammarscope.iface.IDocumentFactoryService.
| Map<TypedDependencyProvider, Map<TypedDependencyMode, ASemanticGraph> > grammarscope.glue.AbstractDocumentFactory.getSemanticGraphs | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get semantic graph artifacts
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| int grammarscope.glue.AbstractDocumentFactory.getSentenceCount | ( | ) | throws RuntimeException |
| List<SentenceSegment> grammarscope.glue.AbstractDocumentFactory.getSentences | ( | ) | throws RuntimeException |
Get sentences
Implements grammarscope.iface.IDocumentFactoryService.
Reimplemented in grammarscope.glue.corenlp.DocumentFactory.
| Sentiment grammarscope.glue.AbstractDocumentFactory.getSentiment | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get sentiment
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
|
staticprivate |
Span
| segments | segments |
|
abstractprotected |
Get coreferences
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
|
abstractprotected |
Get entailments
| sentenceIdx | sentence index |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.parser.DocumentFactory.
|
abstractprotected |
Get grammatical structure
| sentenceIdx | sentence |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
|
abstractprotected |
Get named entities
| sentenceIdx | sentence index |
| RuntimeException | exception |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.parser.DocumentFactory.
|
abstractprotected |
Get parse tree
| sentenceIdx | sentence index |
| RuntimeException | exception |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
|
abstractprotected |
Get semantic graph
| sentenceIdx | sentence |
| mode | typed dependency mode |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.parser.DocumentFactory.
|
abstractprotected |
Get semantic graph (workflow 2)
| sentenceIdx | sentence |
| mode | typed dependency mode |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.parser.DocumentFactory.
|
abstractprotected |
Get sentiment
| sentenceIdx | sentence index |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.parser.DocumentFactory.
|
abstractprotected |
Get triples
| sentenceIdx | sentence index |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.parser.DocumentFactory.
|
abstractprotected |
Get typed dependencies
| sentenceIdx | sentence |
| mode | typed dependency mode |
| RuntimeException | exception |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
|
abstractprotected |
Get typed dependencies (workflow 2)
| sentenceIdx | sentence |
| mode | typed dependency mode |
| RuntimeException | exception |
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
|
abstract |
Get supported typed dependency modes
| RuntimeException | exception |
Implements grammarscope.iface.IDocumentFactoryService.
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.parser.DocumentFactory.
|
abstract |
Get supported typed dependency providers
| RuntimeException | exception |
Implements grammarscope.iface.IDocumentFactoryService.
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
| String grammarscope.glue.AbstractDocumentFactory.getText | ( | ) | throws RuntimeException |
Get text
Implements grammarscope.iface.IDocumentFactoryService.
| ATextAnalysis grammarscope.glue.AbstractDocumentFactory.getTextAnalysis | ( | final TypedDependencyProvider | provider, |
| final TypedDependencyMode | mode | ||
| ) | throws RuntimeException |
Get text analysis
| provider | provider |
| mode | mode |
Implements grammarscope.iface.IDocumentFactoryService.
| String grammarscope.glue.AbstractDocumentFactory.getTextReport | ( | final TypedDependencyProvider | provider, |
| final TypedDependencyMode | mode, | ||
| final boolean | xMLModeFlag | ||
| ) | throws RuntimeException |
Get text report
| provider | typed dependency provider |
| mode | typed dependency mode |
| xMLModeFlag | xml form |
| RuntimeException | exception |
Implements grammarscope.iface.IDocumentFactoryService.
| String [] grammarscope.glue.AbstractDocumentFactory.getTextReports | ( | final TypedDependencyProvider | provider, |
| final TypedDependencyMode | mode, | ||
| final boolean | xMLModeFlag | ||
| ) | throws RuntimeException |
Get text reports
| provider | typed dependency provider |
| mode | typed dependency mode |
| xMLModeFlag | xml form |
| RuntimeException | exception |
Implements grammarscope.iface.IDocumentFactoryService.
|
abstract |
Get tokens
| sentenceIdx | sentence index |
| RuntimeException | exception |
Implements grammarscope.iface.IDocumentFactoryService.
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
| List<Triple> grammarscope.glue.AbstractDocumentFactory.getTriples | ( | final int | sentenceIdx | ) |
Get triples
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| Map<TypedDependencyProvider, Map<TypedDependencyMode, ATypedDependencies> > grammarscope.glue.AbstractDocumentFactory.getTypedDependencies | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get typed dependencies artifact
| sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
| ATypedDependencies grammarscope.glue.AbstractDocumentFactory.getTypedDependencies | ( | final int | sentenceIdx, |
| final TypedDependencyProvider | provider, | ||
| final TypedDependencyMode | mode | ||
| ) | throws RuntimeException |
Get typed dependencies artifact
| sentenceIdx | sentence index |
| provider | typed dependency provider |
| mode | typed dependency mode |
Implements grammarscope.iface.IDocumentFactoryService.
| List<WordSegment> grammarscope.glue.AbstractDocumentFactory.getWords | ( | ) | throws RuntimeException |
Get words
Implements grammarscope.iface.IDocumentFactoryService.
Reimplemented in grammarscope.glue.corenlp.DocumentFactory.
|
staticprivate |
Grammatical structure to string
| grammaticalStructure | grammatical structure |
| isXml | xml format |
|
staticprivate |
Make sentence segments and map : returns (list of segments, segment to list of words map)
| sentenceWordSegments | list of sentences |
| boolean grammarscope.glue.AbstractDocumentFactory.init | ( | final String | text | ) |
Init processing
| text | input text |
Implements grammarscope.iface.IDocumentFactory.
Reimplemented in grammarscope.glue.parser.DocumentFactory, grammarscope.glue.corenlp.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.parser.DocumentFactory, grammarscope.ejb.client.corenlp.DocumentFactory, and grammarscope.ejb.client.corenlp.DocumentFactory.
|
private |
Make semantic graphs
| sentenceIdx | sentence index |
|
private |
Make semantic graphs
| sentenceIdx | sentence index |
|
private |
Make typed dependencies
| sentenceIdx | sentence index |
|
private |
Make typed dependencies 2
| sentenceIdx | sentence index |
|
staticprivate |
Named entities to string
| namedEntities | named entities |
| sentenceString | sentence string |
| sentenceSegment | sentence segment |
| isXml | xml format |
|
staticprivate |
Semantic graphs to string
| semanticGraphs | semantic graphs |
| provider | provider |
| isXml | xml format |
|
staticprivate |
Sentiment to string
| sentiment | sentiment |
| isXml | xml format |
|
staticprivate |
Tokens to string
| tokens | tokens |
| tokenizer | tokenize |
| isXml | xml format |
|
staticprivate |
Parse tree to string
| parseTree | parse tree |
| isXml | xml format |
|
staticprivate |
Triples to string
| triples | triples |
| isXml | xml format |
|
staticprivate |
Typed dependencies to string
| typedDependencies | typed dependencies |
| isXML | xml format |
| provider | provider |
|
protected |
Grammatical structure cache
|
protected |
Language
|
protected |
Parse tree cache
|
protected |
Relation dependents factory
|
staticprivate |
Build relation dependents from GrammaticalStructure
|
private |
Sentence segments
|
staticprivate |
XML mode (Stanford|GrammarScope)
|
protected |
Text
|
protected |
Typed dependency cache
|
protected |
Typed dependency cache (workflow 2)
|
private |
Word segments
|
static |
XML printer
1.8.17