Statistics for Categorisation and analysis of explanatory writing in mathematics