Generalisation of language and knowledge models for corpus analysis