Skip to content

mak2508/prob_rsa

Repository files navigation

Probabilistic RSA-presupposition

This is an implementation of RSA from Presupposition Triggering Reflects Pragmatic Reasoning About Utterance Utility using probabilitic programming to achieve greater scalability of the examples with respect to world, context, utterance and qud sizes.

The examples and the code are adapted/guided from the original codebase from the above linked paper, which can be here.

The search_inference library is taken from the pyro package. The original source can be found here.

The inference_algorithms contains: Exact Search, Best-First Search, Importance Sampling, Stochastic Variational Inference.

Getting Started

Environment Setup

Make sure you have python installed. The codebase is tested with python 3.12, but should work with earlier versions too.

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Examples

To make use of the library, a config file representing the presupposition to be studied must be created. Some examples can be found in the sample_configs folder. Explanations of different class methods are documented within the class.

rsa = RSA(<path_to_config_file>)

You can find example usage in notebooks in the examples folder.

About

Probabilistic Programming Implementation of RSA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages