![]() |
GrammarScope
4.0.0
|
Classes | |
class | Cache |
class | MapCache |
class | MapCache2 |
class | MapCache3 |
Public Member Functions | |
Document (final IDocumentFactory documentFactory, final String text) | |
Document (final IDocumentFactory documentFactory, final URL url) | |
void | make () throws IOException |
void | clear () |
boolean | isReady () |
void | recognize (final int sentenceIdx) |
void | parse (final int sentenceIdx) |
void | analyze (final int sentenceIdx) |
void | processText () |
IView | getView () |
void | setView (final IView view) |
List< Token > | getTokens (final int sentenceIdx) throws RuntimeException |
APartsOfSpeech | getPoses (final int sentenceIdx) throws RuntimeException |
String | getPos (final int sentenceIdx, final Segment wordSegment) |
AParseTree | getParseTree (final int sentenceIdx) |
AGrammaticalStructure | getGrammaticalStructure (final int sentenceIdx) |
ARelationDependents | getRelationDependents (final int sentenceIdx) |
Map< TypedDependencyProvider, Map< TypedDependencyMode, ATypedDependencies > > | getTypedDependencies (final int sentenceIdx) throws RuntimeException |
ATypedDependencies | getTypedDependencies (final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) |
ASemanticGraph | getSemanticGraph (final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) |
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 |
AAnalysis | getAnalysis (final int sentenceIdx) |
ATextAnalysis | getTextAnalysis (final TypedDependencyProvider provider, final TypedDependencyMode mode) 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 |
String | getReport (final int sentenceIdx, final boolean xMLFlag) |
String[] | getReports (final int sentenceIdx, final boolean xMLFlag) |
Graph< GraphNode, GraphEdge > | getGraph (final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) |
ATypedDependencies | getDerivedTypedDependencies (final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) |
TypedDependencyProvider[] | getSupportedProviders () |
TypedDependencyMode[] | getSupportedModes () |
![]() | |
void | segment () |
String | getText () |
int | getSentenceCount () |
List< WordSegment > | getWords () |
List< SentenceSegment > | getSentences () |
List< Segment > | split (final Segment leftSegment, final Segment rightSegment) |
List< Segment > | split (final Segment segment) |
String | getPath () |
String | getString (final Segment segment) |
SentenceSegment | getSentenceSegment (final int sentenceIndex) |
int | nextSentence () |
int | previousSentence () |
void | setSentenceIdx (final int sentenceIdx) |
int | getCurrentSentenceIdx () |
SentenceSegment | getCurrentSentenceSegment () |
String | toString () |
![]() | |
String | getText () throws RuntimeException |
List< WordSegment > | getWords () throws RuntimeException |
List< SentenceSegment > | getSentences () throws RuntimeException |
int | getSentenceCount () throws RuntimeException |
Static Public Member Functions | |
static String | read (final URL url) throws IOException |
![]() | |
static Segment | merge (final List< Segment > segments) |
static Segment | merge (final Segment... segments) |
static String | sentenceToString (final List< Segment > sentence, final int lineLen) |
Public Attributes | |
Status | status |
String | report |
Protected Attributes | |
final IDocumentFactory | documentFactory |
![]() | |
final URL | url |
String | text |
boolean | isSegmented |
Private Member Functions | |
Document (final IDocumentFactory documentFactory, final URL url, final String text) | |
Static Private Member Functions | |
static String | preprocess (final String text0) |
static void | handleException (final Exception e) |
Private Attributes | |
final MapCache< Integer, List< Token > > | tokens |
final MapCache< Integer, APartsOfSpeech > | poses |
final MapCache< Integer, AParseTree > | parseTrees |
final MapCache< Integer, AGrammaticalStructure > | grammaticalStructures |
final MapCache3< Integer, TypedDependencyProvider, TypedDependencyMode, ASemanticGraph > | semanticGraphs |
final MapCache< Integer, ARelationDependents > | relationDependents |
final MapCache< Integer, ANamedEntities > | namedEntities |
final MapCache< Integer, Sentiment > | sentiments |
final MapCache< Integer, List< Entailment > > | entailments |
final MapCache< Integer, List< Triple > > | triples |
final Cache< ACoreferences > | coreferences |
IView | view |
Static Private Attributes | |
static final boolean | REMOVE_NEW_LINES = true |
Additional Inherited Members | |
![]() | |
SegmentedDocument (final IDocumentFactory documentFactory, final URL url, final String text) | |
Document (to hold processed data)
grammarscope.document.Document.Document | ( | final IDocumentFactory | documentFactory, |
final String | text | ||
) |
Constructor (do not call DocumentFactory yet, not assumed to be ready to provide service)
documentFactory | document factory |
text | document text |
grammarscope.document.Document.Document | ( | final IDocumentFactory | documentFactory, |
final URL | url | ||
) |
Constructor (do not call DocumentFactory yet, not assumed to be ready to provide service)
documentFactory | document factory |
url | document url |
|
private |
Private constructor (do not call DocumentFactory yet, not assumed to be ready to provide service)
documentFactory | document factory |
url | document url |
text | document text |
void grammarscope.document.Document.analyze | ( | final int | sentenceIdx | ) |
void grammarscope.document.Document.clear | ( | ) |
Clear cached data
Implements grammarscope.document.IDocument.
AAnalysis grammarscope.document.Document.getAnalysis | ( | final int | sentenceIdx | ) |
Get (sentence) analysis artifact
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
ACoreferences grammarscope.document.Document.getCoreferences | ( | ) | throws RuntimeException |
Get coreferences artifact
Implements grammarscope.iface.IDocumentFactoryService.
ATypedDependencies grammarscope.document.Document.getDerivedTypedDependencies | ( | final int | sentenceIdx, |
final TypedDependencyProvider | provider, | ||
final TypedDependencyMode | mode | ||
) |
Get typed dependencies derived from semantic graph
sentenceIdx | sentence index |
provider | typed dependencies provider |
mode | typed dependencies mode |
List<Entailment> grammarscope.document.Document.getEntailments | ( | final int | sentenceIdx | ) |
Get entailments
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
AGrammaticalStructure grammarscope.document.Document.getGrammaticalStructure | ( | final int | sentenceIdx | ) |
Get grammatical structure artifact
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
Graph<GraphNode, GraphEdge> grammarscope.document.Document.getGraph | ( | final int | sentenceIdx, |
final TypedDependencyProvider | provider, | ||
final TypedDependencyMode | mode | ||
) |
Get graph to be displayed (default is semantic graph)
sentenceIdx | sentence index |
provider | typed dependencies provider |
mode | typed dependency mode |
ANamedEntities grammarscope.document.Document.getNamedEntities | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get named entities artifact
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
AParseTree grammarscope.document.Document.getParseTree | ( | final int | sentenceIdx | ) |
Get parse artifact
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
String grammarscope.document.Document.getPos | ( | final int | sentenceIdx, |
final Segment | wordSegment | ||
) |
Get pos
sentenceIdx | sentence |
wordSegment | word |
APartsOfSpeech grammarscope.document.Document.getPoses | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get parts-of-speech artifact
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
ARelationDependents grammarscope.document.Document.getRelationDependents | ( | final int | sentenceIdx | ) |
Get relation dependents artifact
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
String grammarscope.document.Document.getReport | ( | final int | sentenceIdx, |
final boolean | xmlFlag | ||
) |
Get (sentence) analysis string
sentenceIdx | sentence index |
xmlFlag | XML format requested |
Implements grammarscope.iface.IDocumentFactoryService.
String [] grammarscope.document.Document.getReports | ( | final int | sentenceIdx, |
final boolean | xmlFlag | ||
) |
Get (sentence) analysis strings
sentenceIdx | sentence index |
xmlFlag | XML format requested |
Implements grammarscope.iface.IDocumentFactoryService.
ASemanticGraph grammarscope.document.Document.getSemanticGraph | ( | final int | sentenceIdx, |
final TypedDependencyProvider | provider, | ||
final TypedDependencyMode | mode | ||
) |
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.document.Document.getSemanticGraphs | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get semantic graph artifacts
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
Sentiment grammarscope.document.Document.getSentiment | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get sentiment
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
TypedDependencyMode [] grammarscope.document.Document.getSupportedModes | ( | ) |
Get supported typed dependency modes
Implements grammarscope.iface.IDocumentFactoryService.
TypedDependencyProvider [] grammarscope.document.Document.getSupportedProviders | ( | ) |
Get supported typed dependency providers
Implements grammarscope.iface.IDocumentFactoryService.
ATextAnalysis grammarscope.document.Document.getTextAnalysis | ( | final TypedDependencyProvider | provider, |
final TypedDependencyMode | mode | ||
) | throws RuntimeException |
Get text analysis
provider | provider |
mode | mode |
Implements grammarscope.iface.IDocumentFactoryService.
String grammarscope.document.Document.getTextReport | ( | final TypedDependencyProvider | provider, |
final TypedDependencyMode | mode, | ||
final boolean | xmlFlag | ||
) | throws RuntimeException |
Get (text) analysis string
provider | provider |
mode | mode |
xmlFlag | XML format requested |
Implements grammarscope.iface.IDocumentFactoryService.
String [] grammarscope.document.Document.getTextReports | ( | final TypedDependencyProvider | provider, |
final TypedDependencyMode | mode, | ||
final boolean | xmlFlag | ||
) | throws RuntimeException |
Get (text) analysis strings
provider | provider |
mode | mode |
xmlFlag | XML format requested |
Implements grammarscope.iface.IDocumentFactoryService.
List<Token> grammarscope.document.Document.getTokens | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get tokens
sentenceIdx | sentence index |
RuntimeException | runtime exception |
Implements grammarscope.iface.IDocumentFactoryService.
List<Triple> grammarscope.document.Document.getTriples | ( | final int | sentenceIdx | ) |
Get triples
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
Map<TypedDependencyProvider, Map<TypedDependencyMode, ATypedDependencies> > grammarscope.document.Document.getTypedDependencies | ( | final int | sentenceIdx | ) | throws RuntimeException |
Get typed dependencies artifact
sentenceIdx | sentence index |
Implements grammarscope.iface.IDocumentFactoryService.
ATypedDependencies grammarscope.document.Document.getTypedDependencies | ( | final int | sentenceIdx, |
final TypedDependencyProvider | provider, | ||
final TypedDependencyMode | mode | ||
) |
Get typed dependencies artifact
sentenceIdx | sentence index |
provider | typed dependency provider |
mode | typed dependency mode |
Implements grammarscope.iface.IDocumentFactoryService.
IView grammarscope.document.Document.getView | ( | ) |
Get view
|
staticprivate |
Handle exception
e | exception |
boolean grammarscope.document.Document.isReady | ( | ) |
void grammarscope.document.Document.make | ( | ) | throws IOException |
Make document (this calls DocumentFactory, now assumed to be ready to provide service called after lock on server is acquired)
IOException | exception |
void grammarscope.document.Document.parse | ( | final int | sentenceIdx | ) |
|
staticprivate |
Preprocess
text0 | raw text |
void grammarscope.document.Document.processText | ( | ) |
Process text level information (like coreference)
Implements grammarscope.document.IDocument.
|
static |
Create document from URL
url | source URL |
IOException | exception |
void grammarscope.document.Document.recognize | ( | final int | sentenceIdx | ) |
Recognize sentence (parts-of-speech, named entities, sentiment)
sentenceIdx | sentence index |
Implements grammarscope.document.IDocument.
void grammarscope.document.Document.setView | ( | final IView | view | ) |
Set view
view | document's view |
|
private |
Coreference cache
|
protected |
Document factory
|
private |
Entailments
|
private |
Grammatical structure cache
|
private |
Named Entities cache
|
private |
Parse tree cache
|
private |
Parts-of-speech cache
|
private |
Relation dependents cache
|
staticprivate |
String grammarscope.document.Document.report |
Status string
|
private |
Semantic graph cache
|
private |