![]() |
GrammarScope
4.0.0
|
Public Member Functions | |
SPOAnalyzer () | |
Graph< GraphNode, GraphEdge > | analyze (final Document document, final TypedDependencyProvider provider, final TypedDependencyMode mode) |
Protected Member Functions | |
abstract Collection< Token > | getRoots (final Document document, final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) |
abstract Collection< T > | getEdges (final Document document, final int sentenceIdx, final TypedDependencyProvider provider, final TypedDependencyMode mode) |
T | findOneOf (final Collection< T > edges0, final String[] acceptableIds, final Token governor) |
List< T > | findAllOf (final Collection< T > edges0, final String[] acceptableIds, final Token governor) |
Private Member Functions | |
void | analyzePredicate (final int sentenceIdx, final Token predicate, final Collection< T > edges, final List< Link > links) |
void | analyzeTerm (final int sentenceIdx, final PT pT, final Collection< T > edges, final List< Link > links) |
PS | makePS (final int sentenceIdx, final Collection< T > edges, final Token predicate) |
PO | makePO (final int sentenceIdx, final Collection< T > edges, final Token predicate) |
List< PP > | makePPs (final int sentenceIdx, final Collection< T > edges, final Token predicate) |
List< TP > | makeTPs (final int sentenceIdx, final Collection< T > edges, final Token... terms) |
Collection< T > | filter (final Collection< T > edges0) |
boolean | accept (final T edge) |
Static Private Member Functions | |
static Map< Instance, Mention > | makeMap (final Document document) |
Private Attributes | |
final Set< Token > | visitedNotes |
Semantic pred-subject-object analyzer
grammarscope.spo.SPOAnalyzer< T extends ILink >.SPOAnalyzer | ( | ) |
Constructor
|
private |
Accept edge relevant to SPO
edge | tested edge |
Graph<GraphNode, GraphEdge> grammarscope.spo.SPOAnalyzer< T extends ILink >.analyze | ( | final Document | document, |
final TypedDependencyProvider | provider, | ||
final TypedDependencyMode | mode | ||
) |
Implements grammarscope.spo.ISPOAnalyzer.
|
private |
Analyze predicate
sentenceIdx | sentence index |
predicate | predicate |
edges | source edges |
links | result links |
|
private |
sentenceIdx | sentence index |
pT | pt |
edges | source edges |
links | result links |
|
private |
Filter out irrelevant edges
edges0 | source edges |
|
protected |
Find all edges with acceptable id and specific governor
edges0 | edges |
acceptableIds | acceptable id |
governor | governor |
|
protected |
Find first edge with acceptable id and specific governor
edges0 | edges |
acceptableIds | acceptable id |
governor | governor |
|
abstractprotected |
|
abstractprotected |
|
staticprivate |
Make map
document | document |
|
private |
Make predicate-object
sentenceIdx | sentence index |
edges | source edges |
predicate | predicate |
|
private |
Make predicate-predicate (ex:clausal complement)
sentenceIdx | sentence index |
edges | source edges |
predicate | predicate |
|
private |
Make predicate-subject
sentenceIdx | sentence index |
edges | source edges |
predicate | predicate |
|
private |
Make term predicate (ex:relative clause)
sentenceIdx | sentence index |
edges | source edges |
terms | terms |
|
private |
To avoid visiting cycling