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

Classes

interface  IRelationProcessor
 
class  Walker
 

Public Member Functions

 StanfordRelationModel (final GrammaticalRelation root, final List< GrammaticalRelation > relations, final Language language)
 
List< GrammaticalRelation > getChildren (final GrammaticalRelation relation)
 
GrammaticalRelation getParent (final GrammaticalRelation relation)
 

Static Public Member Functions

static String getTreeName (final GrammaticalRelation grammaticalRelation, final boolean down, final boolean displayLongName)
 
static String getTreeAncestorsNames (final GrammaticalRelation grammaticalRelation, final boolean down, final boolean displayLongName)
 
static StanfordRelationModel makeModel (final Language language)
 
static StanfordRelationModel makeEnglishModel ()
 
static StanfordRelationModel makeUniversalEnglishModel ()
 
static StanfordRelationModel makeChineseModel ()
 
static void main (final String[] args)
 

Public Attributes

final GrammaticalRelation root
 
final GrammaticalRelation[] relations
 
final Language language
 

Static Private Member Functions

static Map< GrammaticalRelation, List< GrammaticalRelation > > makeChildren (final List< GrammaticalRelation > relations)
 
static StanfordRelationModel makeDefaultModel ()
 

Private Attributes

final Map< GrammaticalRelation, List< GrammaticalRelation > > children
 

Detailed Description

Decorates Stanford GrammaticalRelation model

Author
Bernard Bou

Constructor & Destructor Documentation

◆ StanfordRelationModel()

grammarscope.server.iface.StanfordRelationModel.StanfordRelationModel ( final GrammaticalRelation  root,
final List< GrammaticalRelation >  relations,
final Language  language 
)

Constructor

Parameters
rootroot relation
relationsrelation list
languagelanguage

Member Function Documentation

◆ getChildren()

List<GrammaticalRelation> grammarscope.server.iface.StanfordRelationModel.getChildren ( final GrammaticalRelation  relation)

Get this relation's parent

Parameters
relationrelation
Returns
this relation's parent

◆ getParent()

GrammaticalRelation grammarscope.server.iface.StanfordRelationModel.getParent ( final GrammaticalRelation  relation)

Get this relation's children

Parameters
relationrelation
Returns
this relation's children

◆ getTreeAncestorsNames()

static String grammarscope.server.iface.StanfordRelationModel.getTreeAncestorsNames ( final GrammaticalRelation  grammaticalRelation,
final boolean  down,
final boolean  displayLongName 
)
static

Get up lineage (parents to root)

Parameters
grammaticalRelationgrammatical relation
downparent-child order
displayLongNamewhether to display long names
Returns
lineage string

◆ getTreeName()

static String grammarscope.server.iface.StanfordRelationModel.getTreeName ( final GrammaticalRelation  grammaticalRelation,
final boolean  down,
final boolean  displayLongName 
)
static

Get tree name (this node with appended lineage)

Parameters
grammaticalRelationgrammatical relation
downparent-child order
displayLongNamewhether to display long names
Returns
tree name string

◆ main()

static void grammarscope.server.iface.StanfordRelationModel.main ( final String[]  args)
static

Dump model tree

Parameters
argsnot used

◆ makeChildren()

static Map<GrammaticalRelation, List<GrammaticalRelation> > grammarscope.server.iface.StanfordRelationModel.makeChildren ( final List< GrammaticalRelation >  relations)
staticprivate

Build children map

Parameters
relationsset of relations
Returns
children map

◆ makeChineseModel()

static StanfordRelationModel grammarscope.server.iface.StanfordRelationModel.makeChineseModel ( )
static

Make Chinese model

Returns
Chinese model

◆ makeDefaultModel()

static StanfordRelationModel grammarscope.server.iface.StanfordRelationModel.makeDefaultModel ( )
staticprivate

Make default model

Returns
default model

◆ makeEnglishModel()

static StanfordRelationModel grammarscope.server.iface.StanfordRelationModel.makeEnglishModel ( )
static

Make English model

Returns
English model

◆ makeModel()

static StanfordRelationModel grammarscope.server.iface.StanfordRelationModel.makeModel ( final Language  language)
static

Make model

Parameters
languagelanguage name
Returns
default model

◆ makeUniversalEnglishModel()

static StanfordRelationModel grammarscope.server.iface.StanfordRelationModel.makeUniversalEnglishModel ( )
static

Make UniversalEnglish model

Returns
English model

Member Data Documentation

◆ children

final Map<GrammaticalRelation, List<GrammaticalRelation> > grammarscope.server.iface.StanfordRelationModel.children
private

Children map

◆ language

final Language grammarscope.server.iface.StanfordRelationModel.language

◆ relations

final GrammaticalRelation [] grammarscope.server.iface.StanfordRelationModel.relations

Relation array

◆ root

final GrammaticalRelation grammarscope.server.iface.StanfordRelationModel.root

Root relation


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