Documentation

Linglib.Syntax.DependencyGrammar.LongDistance

Long-distance dependencies in UD enhanced graphs #

Implements the gap-filling step of Universal Dependencies' enhanced dependency graphs ([dMN19]): the basic tree obeys a unique-heads constraint that loses the predicate–argument relation across a filler–gap configuration, and the enhanced graph recovers it by adding an explicit edge from the gap-host word to the filler.

Main declarations #

Implementation notes #

Todo #

Gap types and the UD relation map #

Argument position of the missing element: the four core UD argument relations subject, object, indirect object, and oblique.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[implicit_reducible]
      Equations

      Enhanced-edge construction #

      def DepGrammar.LongDistance.fillGap (t : DepTree) (fillerIdx gapHostIdx : ) (gapType : GapType) :

      Add a single enhanced edge to t: the filler becomes a dependent of the gap host with the UD relation corresponding to gapType.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def DepGrammar.LongDistance.extractionLabel (basic : DepTree) (enhanced : DepGraph) (nodeIdx : ) :
        Option GapType

        Recover the gap-type label at nodeIdx by diffing basic against enhanced: returns the first enhanced-only argument-shaped edge's GapType, or none.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Island heuristic and well-formedness #

          Coarse check: does the word at gapIdx head an nmod or conj relation. This does not recognise any of the four classical Ross-1967 islands.

          Equations
          Instances For
            def DepGrammar.LongDistance.checkNoIslandViolation (t : DepTree) (gaps : List ( × × GapType)) :
            Bool

            No gap is reported inside the coarse modifier/conjunct heuristic.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def DepGrammar.LongDistance.isLDWellFormed (t : DepTree) (gaps : List ( × × GapType)) :
              Bool

              Combined well-formedness for trees with long-distance gaps: substrate tree-level checks (minus checkVerbSubcat, since LD trees inherently have argument gaps), the coarse island heuristic, and filler-licensing (wh-word, leftward topicalization, or relative-clause head).

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For