GrammarScope  4.0.0
Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
grammarscope.io.print.Printer Class Reference

Static Public Member Functions

static String buildDocument (final String text, final String coreferences, final String[] reports)
 
static String buildDocument (final String... reports)
 
static String buildSentence (final int sentenceId, final Segment sentenceSegment, final String sentenceText, final String tokensString, final String parseTreeString, final String grammaticalStructureString, final String typedDependenciesString, final String semanticGraphsString, final String namedEntitiesString, final String sentimentString, final String entailmentsString, final String triplesString)
 
static String tokensToString (final List< Token > tokens)
 
static String tokensToString (final Map< Integer, Token > tokens)
 
static String parseTreeToString (final AParseTree parseTree)
 
static String parseTreeToString (final AParseTree parseTree, final long format)
 
static String grammaticalStructureToString (final AGrammaticalStructure grammaticalStructure)
 
static String grammaticalStructureToString (final AGrammaticalStructure grammaticalStructure, final long format)
 
static String typedDependenciesToString (final Map< TypedDependencyProvider, Map< TypedDependencyMode, ATypedDependencies >> typedDependencies)
 
static String semanticGraphsToTypedDependenciesString (final Map< TypedDependencyProvider, Map< TypedDependencyMode, ASemanticGraph >> semanticGraphs)
 
static String typedDependenciesToString (final ATypedDependencies typedDependencies)
 
static String semanticGraphsToString (final Map< TypedDependencyProvider, Map< TypedDependencyMode, ASemanticGraph >> semanticGraphs)
 
static String semanticGraphToString (final ASemanticGraph semanticGraph)
 
static String namedEntitiesToString (final ANamedEntities namedEntities)
 
static String sentimentToString (final Sentiment sentiment)
 
static String entailmentsToString (final List< Entailment > entailments)
 
static String triplesToString (final List< Triple > triples)
 
static String coreferencesToString (final ACoreferences coreferences)
 

Private Member Functions

 Printer ()
 

Static Private Attributes

static final String lineSeparator = new String(new char[80]).replace('\0', '-')
 
static final String sentenceLineSeparator = new String(new char[80]).replace('\0', '*')
 
static final String sentenceFormat
 

Constructor & Destructor Documentation

◆ Printer()

grammarscope.io.print.Printer.Printer ( )
private

Member Function Documentation

◆ buildDocument() [1/2]

static String grammarscope.io.print.Printer.buildDocument ( final String  text,
final String  coreferences,
final String[]  reports 
)
static

Assemble text report

Parameters
texttext
coreferencescoreferences
reportssentence reports
Returns
assemble report

◆ buildDocument() [2/2]

static String grammarscope.io.print.Printer.buildDocument ( final String...  reports)
static

Build document XML string

Parameters
reportsreports
Returns
XML string

◆ buildSentence()

static String grammarscope.io.print.Printer.buildSentence ( final int  sentenceId,
final Segment  sentenceSegment,
final String  sentenceText,
final String  tokensString,
final String  parseTreeString,
final String  grammaticalStructureString,
final String  typedDependenciesString,
final String  semanticGraphsString,
final String  namedEntitiesString,
final String  sentimentString,
final String  entailmentsString,
final String  triplesString 
)
static

Assemble sentence report

Parameters
sentenceIdsentence id
sentenceSegmentsentence segment
sentenceTextsentence text
tokensStringtokens string
parseTreeStringparse tree string
grammaticalStructureStringgrammatical structure string
typedDependenciesStringtyped dependencies string
semanticGraphsStringsemantic graph string
namedEntitiesStringnamed entities string
sentimentStringsentiment string
entailmentsStringentailments string
triplesStringtriples string
Returns
string

◆ coreferencesToString()

static String grammarscope.io.print.Printer.coreferencesToString ( final ACoreferences  coreferences)
static

Coreferences to string

Parameters
coreferencescoreferences
Returns
coreferences string

◆ entailmentsToString()

static String grammarscope.io.print.Printer.entailmentsToString ( final List< Entailment entailments)
static

Entailments to string

Parameters
entailmentsentailments
Returns
entailments string

◆ grammaticalStructureToString() [1/2]

static String grammarscope.io.print.Printer.grammaticalStructureToString ( final AGrammaticalStructure  grammaticalStructure)
static

Grammatical structure to string

Parameters
grammaticalStructuregrammatical structure
Returns
grammatical structure string

◆ grammaticalStructureToString() [2/2]

static String grammarscope.io.print.Printer.grammaticalStructureToString ( final AGrammaticalStructure  grammaticalStructure,
final long  format 
)
static

String for grammatical structure

Parameters
grammaticalStructuregrammatical structure
formatformat
Returns
grammatical structure string

◆ namedEntitiesToString()

static String grammarscope.io.print.Printer.namedEntitiesToString ( final ANamedEntities  namedEntities)
static

Named entities to string

Parameters
namedEntitiesnamed entities
Returns
named entities string

◆ parseTreeToString() [1/2]

static String grammarscope.io.print.Printer.parseTreeToString ( final AParseTree  parseTree)
static

Parse tree to string

Parameters
parseTreeparse tree
Returns
parse tree string

◆ parseTreeToString() [2/2]

static String grammarscope.io.print.Printer.parseTreeToString ( final AParseTree  parseTree,
final long  format 
)
static

Parse tree to string

Parameters
parseTreeparse tree
formatformat
Returns
parse tree string

◆ semanticGraphsToString()

static String grammarscope.io.print.Printer.semanticGraphsToString ( final Map< TypedDependencyProvider, Map< TypedDependencyMode, ASemanticGraph >>  semanticGraphs)
static

Semantic graphs to string

Parameters
semanticGraphssemantic graphs
Returns
semantic graphs string

◆ semanticGraphsToTypedDependenciesString()

static String grammarscope.io.print.Printer.semanticGraphsToTypedDependenciesString ( final Map< TypedDependencyProvider, Map< TypedDependencyMode, ASemanticGraph >>  semanticGraphs)
static

Semantic graphs to typed dependencies string

Parameters
semanticGraphssemantic graphs
Returns
typed dependencies string

◆ semanticGraphToString()

static String grammarscope.io.print.Printer.semanticGraphToString ( final ASemanticGraph  semanticGraph)
static

Semantic graph to string

Parameters
semanticGraphsemantic graph
Returns
semantic graph string

◆ sentimentToString()

static String grammarscope.io.print.Printer.sentimentToString ( final Sentiment  sentiment)
static

Sentiment to string

Parameters
sentimentsentiment
Returns
sentiment string

◆ tokensToString() [1/2]

static String grammarscope.io.print.Printer.tokensToString ( final List< Token tokens)
static

Make XML string from list of tokens

Parameters
tokenstokens
Returns
XML string

◆ tokensToString() [2/2]

static String grammarscope.io.print.Printer.tokensToString ( final Map< Integer, Token tokens)
static

Make XML string from list of tokens

Parameters
tokenstokens
Returns
XML string

◆ triplesToString()

static String grammarscope.io.print.Printer.triplesToString ( final List< Triple triples)
static

Triples to string

Parameters
triplestriples
Returns
triples string

◆ typedDependenciesToString() [1/2]

static String grammarscope.io.print.Printer.typedDependenciesToString ( final ATypedDependencies  typedDependencies)
static

Typed dependencies to string

Parameters
typedDependenciestyped dependencies
Returns
typed dependencies string

◆ typedDependenciesToString() [2/2]

static String grammarscope.io.print.Printer.typedDependenciesToString ( final Map< TypedDependencyProvider, Map< TypedDependencyMode, ATypedDependencies >>  typedDependencies)
static

Typed dependencies to string

Parameters
typedDependenciestyped dependencies
Returns
typed dependencies string

Member Data Documentation

◆ lineSeparator

final String grammarscope.io.print.Printer.lineSeparator = new String(new char[80]).replace('\0', '-')
staticprivate

◆ sentenceFormat

final String grammarscope.io.print.Printer.sentenceFormat
staticprivate
Initial value:
=
"[sentence]\nnumber: %d\n"
+ "segment: %s\n"
+ "text:\n%s\n" + lineSeparator + "\n"
+ "[tokens]\n%s\n" + lineSeparator + "\n"
+ "[parse]\n%s\n" + lineSeparator + "\n"
+ "[grammatical structure]\n%s\n" + lineSeparator + "\n"
+ "[typed dependencies]\n%s\n" + lineSeparator + "\n"
+ "[semantic graphs]\n%s\n" + lineSeparator + "\n"
+ "[named entities]\n%s\n" + lineSeparator + "\n"
+ "[sentiment]\n%s\n" + lineSeparator + "\n"
+ "[entailments]\n%s\n" + lineSeparator + "\n"
+ "[triples]\n%s\n" + lineSeparator + "\n"

◆ sentenceLineSeparator

final String grammarscope.io.print.Printer.sentenceLineSeparator = new String(new char[80]).replace('\0', '*')
staticprivate

The documentation for this class was generated from the following file:
grammarscope.io.print.Printer.lineSeparator
static final String lineSeparator
Definition: Printer.java:27