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

Public Member Functions

 DefaultParserServer ()
 
void setup (final Properties properties)
 
void reset ()
 
boolean bind ()
 
void unbind ()
 
String getParserOptions ()
 
boolean isValid ()
 
String getDescription ()
 
Options getOptions ()
 
ISegmenter getSegmenter ()
 
IMorphology getMorphology ()
 
IParser getParser ()
 
IGrammaticalStructureAnalyzer getGrammaticalStructureAnalyzer ()
 
IDependencyParser getDependencyParser ()
 
ITypedDependenciesAnalyzer getTypedDependenciesAnalyzer ()
 
ISemanticGraphAnalyzer getSemanticGraphAnalyzer ()
 
long getCapabilities ()
 
List< TokenmakeTokens (final Tree tree)
 
TextAnalysis processText (final String text) throws IllegalArgumentException
 
Properties getDefaultConfig (final Language lang)
 

Static Public Member Functions

static String makeDescription (final Properties properties)
 
static void main (final String[] args)
 

Private Member Functions

void makeTokens (final Tree tree, final List< Token > tokens, final Map< Tree, Integer > indices)
 
Language getLanguage ()
 

Private Attributes

Properties settings
 
ISegmenter segmenter
 
IMorphology morphology
 
IParser parser
 
IGrammaticalStructureAnalyzer grammaticalStructureAnalyzer
 
IDependencyParser dependencyParser
 
ITypedDependenciesAnalyzer typedDependencyAnalyzer
 
ISemanticGraphAnalyzer semanticGraphAnalyzer
 
long typedDependencyFlags
 
long typedDependencyFlags2
 
long semanticGraphFlags
 
long semanticGraphFlags2
 

Static Private Attributes

static int instantiationCount
 

Detailed Description

Default Stanford parser server. Every binding attempt will result in an instantiation.

Author
Bernard Bou

Constructor & Destructor Documentation

◆ DefaultParserServer()

grammarscope.server.parser.DefaultParserServer.DefaultParserServer ( )

Constructor

Member Function Documentation

◆ bind()

boolean grammarscope.server.parser.DefaultParserServer.bind ( )

Load all submodules (segmenter, parser, analyzer, ...)

Returns
true if success

Implements grammarscope.server.iface.IServer.

Reimplemented in grammarscope.server.parser.SingletonParserServer.

◆ getCapabilities()

long grammarscope.server.parser.DefaultParserServer.getCapabilities ( )

Get server capabilities

Returns
long

Implements grammarscope.server.iface.IServer.

◆ getDefaultConfig()

Properties grammarscope.server.parser.DefaultParserServer.getDefaultConfig ( final Language  lang)

Get server config

Returns
properties

Implements grammarscope.server.iface.IServer.

◆ getDependencyParser()

IDependencyParser grammarscope.server.parser.DefaultParserServer.getDependencyParser ( )

Get dependency parser

Returns
dependency parser

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ getDescription()

String grammarscope.server.parser.DefaultParserServer.getDescription ( )

Get server description

Returns
description

Implements grammarscope.server.iface.IServer.

◆ getGrammaticalStructureAnalyzer()

IGrammaticalStructureAnalyzer grammarscope.server.parser.DefaultParserServer.getGrammaticalStructureAnalyzer ( )

Get grammatical structure analyzer

Returns
grammatical structure analyzer

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ getLanguage()

Language grammarscope.server.parser.DefaultParserServer.getLanguage ( )
private

Language factory

Returns
language

◆ getMorphology()

IMorphology grammarscope.server.parser.DefaultParserServer.getMorphology ( )

Get morphology

Returns
morphology

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ getOptions()

Options grammarscope.server.parser.DefaultParserServer.getOptions ( )

Get server options

Returns
options

Implements grammarscope.server.iface.IServer.

◆ getParser()

IParser grammarscope.server.parser.DefaultParserServer.getParser ( )

Get parser

Returns
parser

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ getParserOptions()

String grammarscope.server.parser.DefaultParserServer.getParserOptions ( )

Get parser options

Returns
parser options

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ getSegmenter()

ISegmenter grammarscope.server.parser.DefaultParserServer.getSegmenter ( )

Get segmenter

Returns
segmenter

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ getSemanticGraphAnalyzer()

ISemanticGraphAnalyzer grammarscope.server.parser.DefaultParserServer.getSemanticGraphAnalyzer ( )

Get semantic graph analyzer

Returns
semantic graph analyzer

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ getTypedDependenciesAnalyzer()

ITypedDependenciesAnalyzer grammarscope.server.parser.DefaultParserServer.getTypedDependenciesAnalyzer ( )

Get typed dependencies analyzer

Returns
typed dependencies analyzer

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ isValid()

boolean grammarscope.server.parser.DefaultParserServer.isValid ( )

Whether server is valid

Returns
true if server is valid

Implements grammarscope.server.parser.iface.IStanfordServer.

◆ main()

static void grammarscope.server.parser.DefaultParserServer.main ( final String[]  args)
static

Main

Parameters
argsfiles

◆ makeDescription()

static String grammarscope.server.parser.DefaultParserServer.makeDescription ( final Properties  properties)
static

◆ makeTokens() [1/2]

List<Token> grammarscope.server.parser.DefaultParserServer.makeTokens ( final Tree  tree)

Make tokens from parse tree

Parameters
treeparse tree
Returns
list of tokens

◆ makeTokens() [2/2]

void grammarscope.server.parser.DefaultParserServer.makeTokens ( final Tree  tree,
final List< Token tokens,
final Map< Tree, Integer >  indices 
)
private

Build token list from parse tree

Parameters
treeparse tree
tokensresult token list
indicesnode indices

◆ processText()

TextAnalysis grammarscope.server.parser.DefaultParserServer.processText ( final String  text) throws IllegalArgumentException

Process text

Parameters
texttext
Returns
text analysis
Exceptions
IllegalArgumentExceptionexception

◆ reset()

void grammarscope.server.parser.DefaultParserServer.reset ( )

◆ setup()

void grammarscope.server.parser.DefaultParserServer.setup ( final Properties  settings)

Pass config

Parameters
settingssettings

Implements grammarscope.server.iface.IServer.

◆ unbind()

void grammarscope.server.parser.DefaultParserServer.unbind ( )

Member Data Documentation

◆ dependencyParser

IDependencyParser grammarscope.server.parser.DefaultParserServer.dependencyParser
private

Dependency parser

◆ grammaticalStructureAnalyzer

IGrammaticalStructureAnalyzer grammarscope.server.parser.DefaultParserServer.grammaticalStructureAnalyzer
private

Grammatical structure analyzer

◆ instantiationCount

int grammarscope.server.parser.DefaultParserServer.instantiationCount
staticprivate

Instantiation count

◆ morphology

IMorphology grammarscope.server.parser.DefaultParserServer.morphology
private

◆ parser

IParser grammarscope.server.parser.DefaultParserServer.parser
private

◆ segmenter

ISegmenter grammarscope.server.parser.DefaultParserServer.segmenter
private

◆ semanticGraphAnalyzer

ISemanticGraphAnalyzer grammarscope.server.parser.DefaultParserServer.semanticGraphAnalyzer
private

Semantic graph analyzer

◆ semanticGraphFlags

long grammarscope.server.parser.DefaultParserServer.semanticGraphFlags
private

◆ semanticGraphFlags2

long grammarscope.server.parser.DefaultParserServer.semanticGraphFlags2
private

◆ settings

Properties grammarscope.server.parser.DefaultParserServer.settings
private

Settings

◆ typedDependencyAnalyzer

ITypedDependenciesAnalyzer grammarscope.server.parser.DefaultParserServer.typedDependencyAnalyzer
private

Typed dependency analyzer

◆ typedDependencyFlags

long grammarscope.server.parser.DefaultParserServer.typedDependencyFlags
private

◆ typedDependencyFlags2

long grammarscope.server.parser.DefaultParserServer.typedDependencyFlags2
private

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