Documentation

Linglib.Theories.Syntax.WordGrammar.Network

WG Network Integration #

Connects Core.Inheritance (Hudson's isA/prop network model) to the dependency grammar module so that word classes and their argument structures live in a single WG network. @cite{hudson-2010}

Argument structures are inherited via default inheritance: a transitive verb inherits from verb, but a passive can override locally (the most specific value wins — what @cite{hudson-2010} calls the "Best Fit Principle").

Subject-auxiliary inversion is modeled as subtype inheritance: the inverted auxiliary (Hudson uses both "inverted" and "interrogative" for the same word-class subtype, viewed from form vs. semantic side — see §11.6.1, p. 308) is a subtype of auxiliary that locally overrides the subject's direction from left to right, following @cite{hudson-2010}'s treatment of inversion as a word-class subtype rather than a movement rule.

Nodes in a WG network: word classes, dependency relations, or directions.

Instances For
    def WordGrammar.instReprWGNode.repr :
    WGNodeStd.Format
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[implicit_reducible]
      Equations

      Relation labels for property links in a WG network. In @cite{hudson-2010}'s terms, these are the named relations that connect word-class nodes to their syntactic properties.

      • argSlot (idx : ) : WGRel
      • slotDir (idx : ) : WGRel
      Instances For
        def WordGrammar.instReprWGRel.repr :
        WGRelStd.Format
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[implicit_reducible]
          Equations
          @[reducible, inline]

          Abbreviation for a WG inheritance network.

          Equations
          Instances For
            def WordGrammar.resolveSlot (net : WGNetwork) (wc : String) (idx : ) :

            Look up one argument slot from the network for a word class, using default inheritance. Returns none if the slot is not defined.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def WordGrammar.resolveArgStr (net : WGNetwork) (wc : String) (maxSlots : := 10) :

              Resolve the full argument structure for a word class by collecting slots 0, 1, 2, ... until one is not found. Uses default inheritance, so locally specified slots override inherited ones.

              Equations
              Instances For
                def WordGrammar.resolveArgStr.go (net : WGNetwork) (wc : String) (idx fuel : ) (acc : List DepGrammar.ArgSlot) :
                Equations
                Instances For

                  A WG network encoding the English auxiliary word-class hierarchy, following @cite{hudson-2010}:

                  • verb has slot 0 = nsubj/left (subject precedes verb by default)
                  • transitive isA verb, adds slot 1 = obj/right
                  • passive isA transitive, overrides slot 1 to obl/right (by-phrase)
                  • auxiliary isA verb, adds slot 1 = aux/right (main verb)
                  • inverted_auxiliary isA auxiliary, overrides slot 0 direction to right — the subject follows the auxiliary in questions

                  The last point is the key to subject-auxiliary inversion: the inverted auxiliary is a subtype of auxiliary that locally overrides the subject's position. Default inheritance does the rest — the inverted auxiliary inherits nsubj from verb (via auxiliary) but gets direction = right from its own local specification.

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

                    A transitive verb inherits nsubj/left from verb and adds obj/right locally — the network-derived argStr matches the manual argStr_VN (modulo optional fields that default).

                    A passive verb's locally specified slot 1 (obl/right) overrides the inherited transitive slot 1 (obj/right) — default inheritance in action.

                    The non-inverted auxiliary inherits nsubj/left from verb for slot 0.

                    The network-derived arg structure for a transitive verb has the same slots as the manually defined argStr_VN.

                    theorem WordGrammar.inversion_by_subtype :
                    resolveSlot englishAuxNet "auxiliary" 0 = some { depType := UD.DepRel.nsubj, dir := DepGrammar.Dir.left } resolveSlot englishAuxNet "inverted_auxiliary" 0 = some { depType := UD.DepRel.nsubj, dir := DepGrammar.Dir.right }

                    The interrogative/inverted auxiliary inherits nsubj from verb (via auxiliary) but its locally specified direction (right) overrides the inherited direction (left). This is Hudson's subtype analysis of inversion (@cite{hudson-2010} §11.6.1, Fig 11.13): the inverted auxiliary is not a separate lexical rule — it's a word-class subtype.

                    The inverted auxiliary inherits its main-verb slot (aux/right) from auxiliary without overriding it — only the subject direction changes.

                    The full argument structure for the non-inverted auxiliary: nsubj/left (inherited from verb) + aux/right (local).

                    The full argument structure for the inverted auxiliary: nsubj/right (local override) + aux/right (inherited from auxiliary).

                    Map clause type to the word class that licenses the auxiliary in that context. Matrix questions require an interrogative auxiliary (subject follows); all other clause types use the default auxiliary (subject precedes).

                    Equations
                    Instances For
                      def WordGrammar.wgLicenses (net : WGNetwork) (t : DepGrammar.DepTree) (auxIdx : ) (ct : Features.ClauseForm) :
                      Bool

                      License a dependency tree via the WG network: look up the word class for the clause type, resolve its argument structure from the network, and check the tree satisfies it. This is the end-to-end chain: ClauseForm → wordClass → network → argStr → satisfiesArgStr.

                      Equations
                      Instances For