Documentation

Linglib.Theories.Pragmatics.Implicature.ScalarImplicatures.Basic

Get scalar alternatives for a scale member in context. Delegates to HornScale members filtered by semantic entailment, polarity-aware.

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

    Lightweight wrapper preserving the .implicatureArises accessor.

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

          Does an alternative arise as a scalar implicature of a quantifier term?

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

            Example: "some" → "not all" in UE context

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

              Example: "some" → "not all" blocked in DE context

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

                Theorem: DE Blocks "Some → Not All"

                In UE context, the implicature arises. In DE context, the implicature is blocked.

                Theorem: In DE, "All" Has Implicatures

                In DE context, "all" can implicate "not some" (reversed!).

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

                  Two types of inferences from disjunction.

                  1. Exclusivity (scalar): "A or B" → "not (A and B)" Derived from Horn set ⟨or, and⟩.

                  2. Ignorance (non-scalar): "A or B" → "speaker doesn't know which" Derived from competence failure for individual disjuncts.

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

                      Result of analyzing a disjunctive utterance.

                      • statement : String

                        The disjunctive statement

                      • exclusivityArises : Bool

                        Does exclusivity implicature arise?

                      • ignoranceArises : Bool

                        Does ignorance implicature arise?

                      • compatible : Bool

                        Can both arise together?

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

                          Analyze a simple disjunction in context.

                          Both exclusivity AND ignorance can arise together.

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

                            Theorem: Both Inferences Are Compatible

                            "A or B" can simultaneously implicate:

                            • "not both" (exclusivity)
                            • "speaker doesn't know which" (ignorance)

                            The long disjunction problem (@cite{geurts-2010} p.61-64).

                            For "A or B or C", the alternatives are not just {A, B, C}. We need ALL conjunctive closures:

                            • Core: A, B, C
                            • Binary: A∧B, A∧C, B∧C
                            • Full: A∧B∧C

                            The substitution method (replacing "or" with "and") fails to generate all necessary alternatives for n > 2.

                            • disjuncts : List String

                              The disjuncts

                            • coreAlternatives : List String

                              Core alternatives (individual disjuncts)

                            • derivedAlternatives : List String

                              Derived alternatives (conjunctions)

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

                                Generate all binary conjunctions from a list.

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

                                  Generate the full conjunction of all terms.

                                  Equations
                                  Instances For

                                    Analyze a long disjunction, computing all alternatives.

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

                                      Example: Three-way disjunction

                                      "A or B or C" has alternatives:

                                      • Core: A, B, C
                                      • Derived: A∧B, A∧C, B∧C, A∧B∧C
                                      Equations
                                      Instances For

                                        Theorem: Three-way disjunction has 3 core alternatives

                                        Theorem: Three-way disjunction has 4 derived alternatives

                                        The 4 derived alternatives are: A∧B, A∧C, B∧C, A∧B∧C

                                        Theorem: Total alternatives for 3-way = 7

                                        Core (3) + Derived (4) = 7 alternatives

                                        The simple substitution method: replace "or" with "and".

                                        For "A or B": substitute to get "A and B" ✓ For "A or B or C": substitute to get "A and B and C" ✓ But MISSES: "A and B", "A and C", "B and C" ✗

                                        This is why we need closure under conjunction.

                                        Equations
                                        Instances For

                                          What substitution method produces vs what's needed.

                                          • n :

                                            Number of disjuncts

                                          • substitutionResult :

                                            What substitution gives

                                          • neededAlternatives :

                                            What's actually needed

                                          • substitutionSuffices : Bool

                                            Does substitution suffice?

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

                                              Compare substitution method to full closure.

                                              Equations
                                              Instances For

                                                Theorem: Substitution Works for n=2

                                                For "A or B", substitution gives "A and B" which is the only alternative.

                                                Theorem: Substitution Fails for n=3

                                                For "A or B or C", substitution gives 1 alternative but we need 4 (A∧B, A∧C, B∧C, A∧B∧C).

                                                Complete scalar implicature derivation result.

                                                • term : String

                                                  The original utterance's scalar term

                                                • strongerAlts : List String

                                                  Stronger alternatives found

                                                • implicatures : List String

                                                  Implicatures derived (negations of stronger alternatives)

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

                                                    Derive all scalar implicatures for a term via HornScale.

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

                                                      Example: Complete derivation for "some" in UE context

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

                                                        Theorem: "some" in UE derives "not(most)" and "not(all)"

                                                        Example: Complete derivation for "some" in DE context

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

                                                          Theorem: "some" in DE derives NO implicatures

                                                          Derive scalar implicatures from a list of words. Each word is looked up in the scale registry; scalar words produce implicatures based on polarity context.

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

                                                            Check if any implicature in the results negates a given alternative.

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

                                                              Implicature's internal representation for implicature analysis.

                                                              Bundles the Standard Recipe result with context information.

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

                                                                  Check if a word is a scalar quantifier

                                                                  Equations
                                                                  Instances For

                                                                    Determine context polarity from words. Simplified: checks for negation markers.

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

                                                                      Parse words into Implicature structure.

                                                                      For now, uses a simplified analysis:

                                                                      • Finds scalar item position
                                                                      • Determines polarity from negation markers
                                                                      • Assumes competence holds and derives strong implicature in UE
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For

                                                                        Example: "some students sleep" in DE context (under negation)

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