A probabilistic model of Ancient Egyptian writing