Text this: Contextual inference through flexible integration of environmental features and behavioural outcomes.