Documentation

Linglib.Discourse.Centering.Defs

Centering Theory — Core Definitions #

[GJW95] [Kam86] [Sid79] Theory-neutral types for Centering: realizations, utterances, and typeclass plug-ins for ranking schemes (CfRanker/CfRankerOf), realization (Realizes), and pronominalization (Pronominalizes). Role type R is a parameter; Instances/ provides per-paper rankers.

Cf Ranking Plug-In #

Numeric rank over a role type for ordering forward-looking centers (higher rank ⇒ more prominent in Cf).

  • rank : R
Instances
    @[reducible, inline]
    abbrev Discourse.Centering.CfRanker.toLinearOrder (R : Type u_1) [CfRanker R] [DecidableEq R] [Fintype R] (h : ∀ (a b : R), rank a = rank ba = b := by decide) :
    LinearOrder R

    Lift a CfRanker instance to a LinearOrder. For finite-enum role types, the injectivity obligation is dischargeable by decide.

    Equations
    Instances For

      Realization and Utterance #

      structure Discourse.Centering.Realization (E : Type u_1) (R : Type u_2) :
      Type (max u_1 u_2)

      A noun-phrase realization: entity, role, pronoun flag.

      • entity : E
      • role : R
      • isPronoun : Bool
      Instances For
        def Discourse.Centering.instReprRealization.repr {E✝ : Type u_1} {R✝ : Type u_2} [Repr E✝] [Repr R✝] :
        Realization E✝ R✝Std.Format
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[implicit_reducible]
          instance Discourse.Centering.instReprRealization {E✝ : Type u_1} {R✝ : Type u_2} [Repr E✝] [Repr R✝] :
          Repr (Realization E✝ R✝)
          Equations
          @[implicit_reducible]
          instance Discourse.Centering.instDecidableEqRealization {E✝ : Type u_1} {R✝ : Type u_2} [DecidableEq E✝] [DecidableEq R✝] :
          DecidableEq (Realization E✝ R✝)
          Equations
          def Discourse.Centering.instDecidableEqRealization.decEq {E✝ : Type u_1} {R✝ : Type u_2} [DecidableEq E✝] [DecidableEq R✝] (x✝ x✝¹ : Realization E✝ R✝) :
          Decidable (x✝ = x✝¹)
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            structure Discourse.Centering.Utterance (E : Type u_1) (R : Type u_2) :
            Type (max u_1 u_2)

            An utterance as a list of NP realizations in surface order.

            Instances For
              def Discourse.Centering.instReprUtterance.repr {E✝ : Type u_1} {R✝ : Type u_2} [Repr E✝] [Repr R✝] :
              Utterance E✝ R✝Std.Format
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[implicit_reducible]
                instance Discourse.Centering.instReprUtterance {E✝ : Type u_1} {R✝ : Type u_2} [Repr E✝] [Repr R✝] :
                Repr (Utterance E✝ R✝)
                Equations
                def Discourse.Centering.instDecidableEqUtterance.decEq {E✝ : Type u_1} {R✝ : Type u_2} [DecidableEq E✝] [DecidableEq R✝] (x✝ x✝¹ : Utterance E✝ R✝) :
                Decidable (x✝ = x✝¹)
                Equations
                Instances For
                  @[implicit_reducible]
                  instance Discourse.Centering.instDecidableEqUtterance {E✝ : Type u_1} {R✝ : Type u_2} [DecidableEq E✝] [DecidableEq R✝] :
                  DecidableEq (Utterance E✝ R✝)
                  Equations

                  Generalized Cf Ranking (per-realization) #

                  class Discourse.Centering.CfRankerOf (E : Type u_1) (R : Type u_2) :
                  Type (max u_1 u_2)

                  Rank a full Realization (not just its role). Needed by rankers that depend on surface position (Rambow 1993) or information status (Strube-Hahn 1999); CfRanker R lifts here via cfRankerOf_of_role.

                  Instances
                    @[implicit_reducible, instance 100]
                    instance Discourse.Centering.cfRankerOf_of_role {E : Type u_1} {R : Type u_2} [r : CfRanker R] :

                    Default lift: rank by role only via r.role. Low priority so per-realization instances win.

                    Equations

                    Realizes / Pronominalizes Plug-Ins #

                    class Discourse.Centering.Realizes (U : Type u_1) (E : outParam (Type u_2)) :
                    Type (max u_1 u_2)

                    "u realizes e": the entity e is among the referents contributed by u. outParam E so typeclass search infers entity type from U.

                    • Rel : UEProp

                      The predicate "u realizes e".

                    • decRel (u : U) (e : E) : Decidable (Rel u e)

                      The relation is pointwise decidable.

                    Instances
                      @[reducible, inline]
                      abbrev Discourse.Centering.realizes {U : Type u_1} {E : Type u_2} [Realizes U E] (u : U) (e : E) :

                      "u realizes e", as a Prop. Ergonomic alias for Realizes.Rel.

                      Equations
                      Instances For
                        class Discourse.Centering.Pronominalizes (U : Type u_1) (E : outParam (Type u_2)) :
                        Type (max u_1 u_2)

                        "u pronominalizes e": some realization of e in u is pronominal.

                        • Rel : UEProp

                          The predicate "u pronominalizes e".

                        • decRel (u : U) (e : E) : Decidable (Rel u e)

                          The relation is pointwise decidable.

                        Instances
                          @[reducible, inline]
                          abbrev Discourse.Centering.pronominalizes {U : Type u_1} {E : Type u_2} [Pronominalizes U E] (u : U) (e : E) :

                          "u pronominalizes e", as a Prop. Ergonomic alias for Pronominalizes.Rel.

                          Equations
                          Instances For