The teacher 主语
wanted 谓语动词
me宾语
to learn French all by myself宾补
宾补的分析:learn动词French宾语all by myself状语.