Context tree selection and linguistic rhythm retrieval from written texts