Extract learning data