The study of memory for texts has had an long tradition of research in psychology. According to most general accounts of text memory, the recognition or recall of items in a text is based on querying a memory representation that is built up on the basis of background knowledge. The objective of this paper is to describe and test a Bayesian model of this general account. In particular, we develop a model that describes how we use our background knowledge to form memories as a process of Bayesian inference of the statistical patterns that are inherent in a text, followed by posterior predictive inference of the words that are typical of those inferred patterns. This provides us with precise predictions about what words will be remembered from any given text. We then test these predictions using data from a memory experiment using texts from a corpus of British English.