Pedagogical design of intelligent models for teaching foreign languages