Documentation

Linglib.Theories.Semantics.Probabilistic.Scenarios.Basic

Frames as Distributions over Concepts #

@cite{fillmore-1982} @cite{schank-abelson-1977}

A frame/scenario is a coherent situation type that makes certain concepts more or less likely.

A scenario is a named distribution over concepts.

This models the "scenario constraint" in SDS: P(concept | scenario)

  • name : String

    Name of the scenario (e.g., "SPORTS", "ASTRONOMY")

  • conceptDist : Concept

    Distribution: P(concept | scenario)

Instances For

    A scenario mixture: distribution over scenarios.

    When the scenario itself is uncertain, we have a mixture: P(concept) = Σ_s P(s) × P(concept | s)

    • dist : Scenario

      Distribution over scenarios: P(scenario)

    Instances For

      Frame Elements #

      A frame defines a set of roles (frame elements) and their typical fillers.

      COMMERCIAL_TRANSACTION frame:

      A frame element (role within a frame).

      • name : String

        Name of the element (e.g., "Buyer", "Goods")

      • typicalFillers : Concept

        Typical fillers: P(concept | this element)

      Instances For

        A full frame definition with its elements.

        • name : String

          Frame name

        • elements : List (FrameElement Concept)

          Frame elements with their filler distributions

        • scenarioBase : Concept

          Overall scenario distribution (for concepts not tied to specific elements)

        Instances For

          Scenario Induction from Context #

          Context words activate scenarios:

          This is modeled as P(scenario | context-words).

          See Phenomena.Polysemy.Studies.ErkHerbelot2024 for worked disambiguation examples using these types.

          A context cue: a word that provides evidence for scenarios.

          • word : String

            The cue word

          • likelihood : Scenario

            Likelihood: P(word | scenario)

          Instances For
            def Semantics.Probabilistic.Scenarios.inferScenario {S : Type} [BEq S] (prior : S) (cues : List (ContextCue S)) (scenarios : List S) :
            S

            Infer scenario distribution from context cues (Bayesian update).

            P(scenario | cues) ∝ P(scenario) × Π_cue P(cue | scenario)

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

              Frame Evocation #

              Words evoke frames. "buy" evokes COMMERCIAL_TRANSACTION. Once evoked, the frame provides expectations about:

              Frame evocation: which frames does a word evoke?

              • word : String

                The evoking word

              • evokedFrames : Frame

                Distribution: P(frame | word)

              Instances For
                def Semantics.Probabilistic.Scenarios.frameExpectations {Concept : Type} (frame : FrameDef Concept) (filledElements : List String) :
                List (FrameElement Concept)

                Given an evoked frame, get expectations for unfilled elements.

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

                  Full SDS-Style Disambiguation #

                  Combining selectional preferences with scenario constraints:

                  P(concept | role, context) ∝ P_sel(concept | role) × P_scen(concept | context)
                  
                  def Semantics.Probabilistic.Scenarios.sdsDisambiguate {Concept : Type} (selectional scenario : Concept) (concepts : List Concept) :
                  Concept

                  Full SDS disambiguation combining selectional and scenario constraints.

                  Equations
                  Instances For
                    def Semantics.Probabilistic.Scenarios.sdsDisambiguateWithUncertainty {Concept Scenario : Type} (selectional : Concept) (scenarioConceptDist : ScenarioConcept) (scenarioPosterior : Scenario) (concepts : List Concept) (scenarios : List Scenario) :
                    Concept

                    With scenario uncertainty: marginalize over scenarios first.

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

                      Scenarios as RSA Goals/QUDs #

                      In RSAScenario, the Goal type can encode scenarios:

                      Mapping #

                      SDSRSA
                      Scenario sGoal g
                      P(s | context)goalPrior
                      P(concept | s)World structure filtered by g

                      Implementation #

                      We can create RSA scenarios where:

                      1. Worlds encode concept assignments
                      2. Goals encode scenarios
                      3. goalProject filters worlds compatible with scenario

                      A scenario-structured world: pairs (concept-assignment, scenario).

                      • concept : Concept
                      • scenario : Scenario
                      Instances For
                        def Semantics.Probabilistic.Scenarios.scenarioGoalFilter {Concept Scenario : Type} [BEq Scenario] (targetScenario : Scenario) :
                        ScenarioWorld Concept ScenarioBool

                        Create a "scenario goal" that filters worlds by scenario membership.

                        Equations
                        Instances For