Enhanced dependencies #
Basic dependency trees enforce a unique-heads constraint: every word (except root) has exactly one head, so certain predicate-argument relations that hold semantically cannot be represented as tree edges — shared dependents in coordination, controlled subjects, and relative-clause gaps are the canonical cases. Enhanced dependencies relax the tree to a directed graph in which words may have multiple heads.
Main declarations #
EnhancementType— coarse classification of an enhanced edge.hasUnrepresentedArg— a word has an argument relation in the enhanced graph that the basic tree fails to encode.classifyEnhancement— assign anEnhancementTypeto an enhanced edge.
Implementation notes #
Predicate-shape definitions inherit the substrate-wide Bool convention;
statements use ... = true / = false. Worked fixtures for the three
phenomena (coordination, control, relative-clause gap) are kept minimal —
feature-rich Word payloads were dropped because the theorems are
structural. Coordination.enhanceSharedDeps is the bridge used to build
the coordination enhanced graph; the control and relative-clause graphs
are stipulated.
Enhancement classification #
The kind of implicit relation an enhanced edge makes explicit. Each variant corresponds to a phenomenon where the basic tree loses information.
- controlSubject : EnhancementType
- relClauseGap : EnhancementType
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- DepGrammar.EnhancedDependencies.instDecidableEqEnhancementType x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
A word has an unrepresented argument in the basic tree if it appears as a dependent in the enhanced graph under some head to which the basic tree has no edge.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Classify an enhanced edge by what type of enhancement it represents.
Returns none when the edge is already in the basic tree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Coordination fixture: "John sees and hears Mary" #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Control fixture: "Students forgot to come" #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Relative-clause fixture: "the book that John read" #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.