It is very likely he is addressing the pharisees here. Within the Jewish works, there is mention of using terms like master and teacher and father to address those scholars who fear the lord.
Jehoshaphat, King of Judah who,on seeing a scholar, used to rise from his throne, embrace him and kiss him, and call him ‘My master, my master; my teacher, my teacher’?
Babylonian Talmud Kethuboth 103b
and
‘He honoureth them that fear the Lord;’ that was Jehoshaphat king of Judah, who every time he beheld a scholar-disciple rose from his throne, and embraced and kissed him, calling him Father, Father; Rabbi, Rabbi; Mari, Mari!
Babylonian Talmud Makkoth 24a
In addition to theses, the surrounding context seems to be addressing the Jewish Ruling class. Jesus addresses swearing by the Temple (23:16), tithing for various plants (23:23), and particularities of the purity laws (23:24). Each of these corrections seem geared towards Jewish leaders who were well versed in the law. Some documentation on the connections to Jewish laws can be found here.