Some tools for probabilistic calculating and linguistic applications. Uses the Probability monads detailed by Erwig & Kollmansberger (2006) and expanded on by Eric Kidd (here, here, and here).
Super preliminary for now --- these are more learning tools for me than scientific tools for you. Seems like the only way I can learn new formal things these days is by making myself code up an implementation. 🤫
Utils.hs
has the basic monad transformer for probabilistic computing (coarser
semirings are acceptable too). Prob.hs
uses this transformer to define
various probabilistic monads, with support for Bayesian calculations and
sampling functions. All of this is based pretty directly on Kidd's work.
RSA.hs
implements a simple speaker-oriented Rational Speech Acts model using
these tools. Scalar.hs
extends this to hearer-oriented scalar implicature
with lexical uncertainty. Look at how straightforward the agents are to define
using the monadic probability interface. It's nice.
Some things I'm thinking about:
-
Embedded implicature, Ã la Potts et al (2015); compositional issues.
-
Helping yourself to lexical scales vs. not (cf. Potts et al again, as well as Russell 2012).
-
Abstractions underlying the various RSA models (or other kinds of formal pragmatic models, e.g., IBR). Is there a most-general perspective?
-
The scalar implicatures of exceptionally scoping indefinites. I think the lexical uncertainty models may work nicely here, but I should check.
-
How (normalizable) semirings coarser than probabilities might be useful.