With the continuous development and power of big data and artificial intelligence technology, the application of artificial intelligence technology in English learning is becoming more and more popular. In this paper, based on the knowledge of multi-task learning theory, the optimal learning path recommendation method based on K nearest neighbor algorithm is designed in order to enrich the current English teaching path. It is found that the English vocabulary learning path still has the problem of low degree of interaction, accordingly, a sentiment prediction model based on principal component analysis and K nearest neighbor algorithm is constructed, and the model is verified and analyzed. The prediction accuracy of the traditional K-nearest neighbor algorithm is 77.73%, while the prediction accuracy value of the model in this paper is 96.03%, which indicates that the introduction of principal component analysis algorithm on the basis of the traditional K-nearest neighbor algorithm can improve the prediction accuracy of students’ emotions, and enhance the interactive effect of teaching by accurately capturing students’ emotional state.