IPA: //ˈkæstɪɡeɪtər//
KK: /kæstɪˌɡeɪtər/
A person who criticizes or reprimands someone severely.
The teacher acted as a castigator, pointing out the mistakes in the student's work.
Castigator is formed from "castigare" (meaning to chastise or correct) which is derived from "castus" (meaning pure) and "agere" (meaning to drive or do). The word refers to someone who corrects or chastises, often with the intent of making someone better or purer.
Think of someone who 'drives' ('agere') you towards being 'pure' ('castus') by correcting your behavior — that's what a castigator does.