One way of representing a context is statistical language nmdels which provide a word sequence probability, P(w~), where w~ denotes the sequence wi...wj.
they provide the conditional probability of a word given with the previous word sequence, P( wilw~-l ), which shows the prediction of a word in a given context.