class_docstr: ParlAI general acceptabilty checker customized for the wizard of internet.
class_docstr_tok: ["ParlAI","general","acceptabilty","checker","customized","for","the","wizard","of","internet","."]
code: def check_messages(
      self,
      agent_id: str,
      persona: str,
      messages: List[str],
      is_worker_0: bool,
      violation_types: Iterable[str] = (),
  ) -> str:
      violations = []
      general_chat_violations = super().check_messages(
          self.get_conversation_messages(messages, agent_id),
          is_worker_0,
          violation_types,
      )
      if general_chat_violations:
          violations.extend(general_chat_violations.split(","))
  
      if agent_id == "Apprentice":
          persona_violations = bad_persona(persona, self.post_stemmer)
          if persona_violations:
              violations.extend(persona_violations)
  
      if agent_id == "Wizard":
          knowledge_violations = poor_knowledge_selection(
              messages,
              persona,
              self.post_stemmer,
              self.knowledge_overlap_threshold,
          )
          if knowledge_violations:
              violations.extend(knowledge_violations)
  
      return ",".join(violations)
  
file_path: ParlAI/parlai/crowdsourcing/projects/wizard_of_internet/acceptability.py
imports: import numpy
  from typing import Iterable, List
  from nltk.stem import PorterStemmer
  from parlai.crowdsourcing.utils.acceptability import AcceptabilityChecker, normalize_answer
  import parlai.utils.logging
label_desc: Use image node_id 2 for calling the WizardOfInternetAcceptabilityChecker obj's underlying member method code with example usage: obj.check_messages(agent_id, persona, messages, is_worker_0, violation_types) and returns: str