In this paper we describe two large deviation principles for the empirical process of words cut out from a random sequence of letters according to a random renewal process: one where the letters are frozen ('quenched') and one where the letters are not frozen ('annealed'). We apply these large deviation principles to five classes of interacting stochastic systems: interacting diffusions, coupled branching processes, and three examples of a polymer chain in a random environment. In particular, we show how these large deviation principles can be used to derive variational formulas for the critical curves that are associated with the phase transitions occurring in these systems, and how these variational formulas can in turn be used to prove the existence of certain intermediate phases