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:
- MaxEnt (@cite{goldwater-johnson-2003}):
P(c) ∝ exp(H(c))(softmax) - NHG (@cite{boersma-pater-2016}): add Gaussian noise to weights
- Normal MaxEnt (@cite{flemming-2021}): add i.i.d. Gaussian noise to candidates
All three share the WeightedConstraint and harmonyScore definitions.
structure
Theories.Phonology.HarmonicGrammar.WeightedConstraint
(C : Type)
extends Core.OT.NamedConstraint C :
A weighted constraint for Harmonic Grammar.
Extends NamedConstraint with a rational-valued weight.
- weight : ℚ
Constraint weight (higher = more important).
Instances For
def
Theories.Phonology.HarmonicGrammar.harmonyScore
{C : Type}
(constraints : List (WeightedConstraint C))
(c : C)
:
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
- Theories.Phonology.HarmonicGrammar.harmonyScoreR constraints c = ↑(Theories.Phonology.HarmonicGrammar.harmonyScore constraints c)