Some children have been punished for swearing by washing their mouths out with soap.