![]() |
GrammarScope
4.0.0
|
Public Member Functions | |
MutableGrammaticalRelation (final String name, final String shortName, final String longName, final ProtoGrammaticalRelation parent, final String sourcePatternString, final String[] targetPatternStrings) | |
MutableGrammaticalRelation (final String name, final String shortName, final String longName, final ProtoGrammaticalRelation parent, final String sourcePatternString, final String[] targetPatternStrings, final String description, final String[][] codedExamples) | |
MutableGrammaticalRelation | copy () |
void | addChild (final ProtoGrammaticalRelation child) |
void | removeChild (final ProtoGrammaticalRelation child) |
MutableGrammaticalRelation | getParent () |
Iterable< MutableGrammaticalRelation > | getChildrenIterable () |
Iterator< MutableGrammaticalRelation > | getChildrenIterator () |
String | getId () |
String | getName () |
String | getDescription () |
String[][] | getCodedExamples () |
void | setShortName (final String shortName) |
void | setLongName (final String longName) |
void | setSpecific (final String specific) |
void | setName (final String name) |
void | setDescription (final String description) |
void | setParent (final ProtoGrammaticalRelation parent) |
void | setChildren (final List< ProtoGrammaticalRelation > children) |
void | setSourcePattern (final Pattern sourcePattern) |
void | setTargetPatterns (final List< TregexPattern > targetPatterns) |
void | setCodedExamples (final String[][] codedExamples) |
String | getTreeName (final boolean down, final boolean displayLongName) |
String | getLineage (final boolean down, final boolean displayLongName) |
String[] | getTargetPatternStrings () |
void | walkTree (final IMutableRelationProcessor processor) |
![]() | |
boolean | isFromString () |
ProtoGrammaticalRelation (final String shortName, final String longName, final ProtoGrammaticalRelation parent, final String sourcePattern, final String[] targetPatterns, final String specificString) | |
Collection< Tree > | getRelatedNodes (final Tree tree, final Tree root) |
boolean | isApplicable (final Tree tree) |
boolean | isAncestor (final ProtoGrammaticalRelation gr0) |
final String | toString () |
String | getLongName () |
String | getShortName () |
String | getSpecific () |
List<? extends ProtoGrammaticalRelation > | getChildren () |
Pattern | getSourcePattern () |
List< TregexPattern > | getTargetPatterns () |
Static Public Member Functions | |
static Pattern | getSourcePattern (final List< TregexPattern > patterns) |
static String[] | getTargetPatternStrings (final List< TregexPattern > patterns) |
static String | patternToString (final TregexPattern pattern) |
static void | main (final String[] args) |
![]() | |
static List< TregexPattern > | compileTargetPatterns (final String[] patternStrings) |
Private Member Functions | |
MutableGrammaticalRelation (final String name, final String shortName, final String longName, final ProtoGrammaticalRelation parent, final Pattern sourcePattern, final List< TregexPattern > targetPatterns, final String description, final String[][] codedExamples) | |
Private Attributes | |
String | name |
String | description |
String[][] | codedExamples |
Static Private Attributes | |
static final long | serialVersionUID = 3L |
Additional Inherited Members | |
![]() | |
String | shortName |
String | longName |
ProtoGrammaticalRelation | parent |
List< ProtoGrammaticalRelation > | children = new ArrayList<>() |
Pattern | sourcePattern |
List< TregexPattern > | targetPatterns = new ArrayList<>() |
String | specific |
Mutable (editable) grammatical relation
grammarscope.mutable.MutableGrammaticalRelation.MutableGrammaticalRelation | ( | final String | name, |
final String | shortName, | ||
final String | longName, | ||
final ProtoGrammaticalRelation | parent, | ||
final String | sourcePatternString, | ||
final String[] | targetPatternStrings | ||
) |
Constructor
name | name |
shortName | short name |
longName | long name |
parent | parent relation |
sourcePatternString | uncompiled source pattern |
targetPatternStrings | uncompiled target patterns |
grammarscope.mutable.MutableGrammaticalRelation.MutableGrammaticalRelation | ( | final String | name, |
final String | shortName, | ||
final String | longName, | ||
final ProtoGrammaticalRelation | parent, | ||
final String | sourcePatternString, | ||
final String[] | targetPatternStrings, | ||
final String | description, | ||
final String | codedExamples[][] | ||
) |
Constructor
name | name |
shortName | short name |
longName | long name |
parent | parent relation |
sourcePatternString | uncompiled source pattern |
targetPatternStrings | uncompiled target patterns |
description | description |
codedExamples | examples |
|
private |
Constructor
name | name |
shortName | short name |
longName | long name |
parent | parent relation |
sourcePattern | compiled source pattern |
targetPatterns | compiled target patterns |
description | description |
codedExamples | examples |
void grammarscope.mutable.MutableGrammaticalRelation.addChild | ( | final ProtoGrammaticalRelation | child | ) |
Reimplemented from grammarscope.mutable.ProtoGrammaticalRelation.
MutableGrammaticalRelation grammarscope.mutable.MutableGrammaticalRelation.copy | ( | ) |
Clone
Iterable<MutableGrammaticalRelation> grammarscope.mutable.MutableGrammaticalRelation.getChildrenIterable | ( | ) |
Get child relations
Iterator<MutableGrammaticalRelation> grammarscope.mutable.MutableGrammaticalRelation.getChildrenIterator | ( | ) |
Get child iterator
String [][] grammarscope.mutable.MutableGrammaticalRelation.getCodedExamples | ( | ) |
Get coded examples
String grammarscope.mutable.MutableGrammaticalRelation.getDescription | ( | ) |
Get description
String grammarscope.mutable.MutableGrammaticalRelation.getId | ( | ) |
Get id
String grammarscope.mutable.MutableGrammaticalRelation.getLineage | ( | final boolean | down, |
final boolean | displayLongName | ||
) |
Get up lineage (parents to root)
down | parent-child order |
displayLongName | whether to display long names |
String grammarscope.mutable.MutableGrammaticalRelation.getName | ( | ) |
Get name
MutableGrammaticalRelation grammarscope.mutable.MutableGrammaticalRelation.getParent | ( | ) |
Get parent relation
Reimplemented from grammarscope.mutable.ProtoGrammaticalRelation.
|
static |
Extract source pattern from target patterns
patterns | target patterns |
String [] grammarscope.mutable.MutableGrammaticalRelation.getTargetPatternStrings | ( | ) |
|
static |
Stringify target patterns
patterns | patterns |
String grammarscope.mutable.MutableGrammaticalRelation.getTreeName | ( | final boolean | down, |
final boolean | displayLongName | ||
) |
Get tree name (this node with appended lineage)
down | parent-child order |
displayLongName | whether to display long names |
|
static |
Dump
args | arguments |
|
static |
Stringify pattern
pattern | pattern to stringify |
void grammarscope.mutable.MutableGrammaticalRelation.removeChild | ( | final ProtoGrammaticalRelation | child | ) |
Remove child from children array
child | child to remove |
void grammarscope.mutable.MutableGrammaticalRelation.setChildren | ( | final List< ProtoGrammaticalRelation > | children | ) |
Set children
children | children |
void grammarscope.mutable.MutableGrammaticalRelation.setCodedExamples | ( | final String | codedExamples[][] | ) |
Set coded examples
codedExamples | coded examples |
void grammarscope.mutable.MutableGrammaticalRelation.setDescription | ( | final String | description | ) |
Set description
description | description |
void grammarscope.mutable.MutableGrammaticalRelation.setLongName | ( | final String | longName | ) |
Set long name
longName | long name |
void grammarscope.mutable.MutableGrammaticalRelation.setName | ( | final String | name | ) |
Set name
name | name |
void grammarscope.mutable.MutableGrammaticalRelation.setParent | ( | final ProtoGrammaticalRelation | parent | ) |
Set parents
parent | parent relation |
void grammarscope.mutable.MutableGrammaticalRelation.setShortName | ( | final String | shortName | ) |
Set short name
shortName | short name |
void grammarscope.mutable.MutableGrammaticalRelation.setSourcePattern | ( | final Pattern | sourcePattern | ) |
Set source pattern
sourcePattern | source pattern |
void grammarscope.mutable.MutableGrammaticalRelation.setSpecific | ( | final String | specific | ) |
Set specific
specific | specific |
void grammarscope.mutable.MutableGrammaticalRelation.setTargetPatterns | ( | final List< TregexPattern > | targetPatterns | ) |
Set target patterns
targetPatterns | compiled target patterns |
void grammarscope.mutable.MutableGrammaticalRelation.walkTree | ( | final IMutableRelationProcessor | processor | ) |
Walk relation tree
processor | node processor |
|
private |
Example, the way the relation in the example is formalized. E.g. pred((Reagan,died) pairs
|
private |
Description
|
private |
Name
|
staticprivate |