Documentation

Linglib.Theories.Phonology.HarmonicGrammar.Basic

Harmonic Grammar: Basic Definitions @cite{smolensky-legendre-2006} #

The shared foundation for all stochastic Harmonic Grammar variants: Maximum Entropy (MaxEnt), Noisy HG (NHG), and Normal MaxEnt.

A Harmonic Grammar assigns numerical weights to constraints. The harmony score of a candidate is the negated weighted sum of its constraint violations: H(c) = -Σⱼ wⱼ · Cⱼ(c).

Different stochastic variants map harmony scores to probabilities via different mechanisms:

All three share the WeightedConstraint and harmonyScore definitions.

A weighted constraint for Harmonic Grammar. Extends NamedConstraint with a rational-valued weight.

Instances For

    Harmony score: H(c) = -Σⱼ wⱼ · Cⱼ(c). Negative because violations are penalized.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def Theories.Phonology.HarmonicGrammar.harmonyScoreR {C : Type} (constraints : List (WeightedConstraint C)) (c : C) :

      Harmony score as a real number, for interfacing with softmax.

      Equations
      Instances For