Text this: Statistical analysis of behavioural data: an approach based on time-structured models