extract contexts