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

Public Member Functions

 SPOAnalyzer (final ISegmenter segmenter, final IParser parser, final IMorphology morphology, final StanfordRelationModel relationModel)
 
List< List< SPOStructure > > analyzeDocument (final URL url) throws IOException
 
List< SPOStructureanalyze (final List< CoreLabel > sentence)
 
List< SPOStructureanalyze (final TreeGraphNode tree)
 

Static Public Member Functions

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

Private Member Functions

void analyze (final TreeGraphNode tree, final TreeGraphNode rootTree, final List< SPOStructure > list)
 
Term makeTerm (final Tree tree, final GrammaticalRelation grammaticalRelation, final Tree dependentTree)
 

Static Private Member Functions

static Map< String, GrammaticalRelation > makeIdToRelationMap (final StanfordRelationModel relationModel)
 

Private Attributes

final Map< String, GrammaticalRelation > idMap
 
final ISegmenter segmenter
 
final IParser parser
 
final IMorphology morphology
 
final HeadFinder headFinder
 

Detailed Description

Semantic pred-subject-object analyzer

Author
Bernard Bou

Constructor & Destructor Documentation

◆ SPOAnalyzer()

grammarscope.server.spo.SPOAnalyzer.SPOAnalyzer ( final ISegmenter  segmenter,
final IParser  parser,
final IMorphology  morphology,
final StanfordRelationModel  relationModel 
)

Constructor

Parameters
segmentersegmenter
parserparser
morphologymorphology
relationModelrelation model

Member Function Documentation

◆ analyze() [1/3]

List<SPOStructure> grammarscope.server.spo.SPOAnalyzer.analyze ( final List< CoreLabel >  sentence)

Analyze sentence

Parameters
sentencesentence
Returns
parsed structures

◆ analyze() [2/3]

List<SPOStructure> grammarscope.server.spo.SPOAnalyzer.analyze ( final TreeGraphNode  tree)

Analyze tree

Parameters
treetree
Returns
parsed structures

◆ analyze() [3/3]

void grammarscope.server.spo.SPOAnalyzer.analyze ( final TreeGraphNode  tree,
final TreeGraphNode  rootTree,
final List< SPOStructure list 
)
private

Analyze tree

Parameters
treetarget tree
rootTreeroot tree
listlist to collect results

◆ analyzeDocument()

List<List<SPOStructure> > grammarscope.server.spo.SPOAnalyzer.analyzeDocument ( final URL  url) throws IOException

Analyze document

Parameters
urlurl
Returns
parsed structures
Exceptions
IOExceptionexception

◆ main()

static void grammarscope.server.spo.SPOAnalyzer.main ( final String[]  args) throws IOException
static

Analyze document

Parameters
argsarg[1] document path
Exceptions
IOExceptionexception

◆ makeIdToRelationMap()

static Map<String, GrammaticalRelation> grammarscope.server.spo.SPOAnalyzer.makeIdToRelationMap ( final StanfordRelationModel  relationModel)
staticprivate

Make id to grammatical relation map

Parameters
relationModelrelation model
Returns
id to grammatical relation map

◆ makeTerm()

Term grammarscope.server.spo.SPOAnalyzer.makeTerm ( final Tree  tree,
final GrammaticalRelation  grammaticalRelation,
final Tree  dependentTree 
)
private

Make term

Parameters
treescope tree
grammaticalRelationgrammatical relation
dependentTreedependent tree
Returns
term

Member Data Documentation

◆ headFinder

final HeadFinder grammarscope.server.spo.SPOAnalyzer.headFinder
private

Head finder

◆ idMap

final Map<String, GrammaticalRelation> grammarscope.server.spo.SPOAnalyzer.idMap
private

Id to relation map

◆ morphology

final IMorphology grammarscope.server.spo.SPOAnalyzer.morphology
private

Morphology

◆ parser

final IParser grammarscope.server.spo.SPOAnalyzer.parser
private

Parser

◆ segmenter

final ISegmenter grammarscope.server.spo.SPOAnalyzer.segmenter
private

Segmenter


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