class_docstr: Detects offensive language using a list of offensive language and phrases from
  https://github.com/LDNOOBW.
class_docstr_tok: ["Detects","offensive","language","using","a","list","of","offensive","language","and","phrases","from","https",":","\/\/github.com\/LDNOOBW","."]
docstr: Add a single phrase to the filter.
docstr_tok: ["Add","a","single","phrase","to","the","filter","."]
code: def add_phrase(self, phrase):
      """
      Add a single phrase to the filter.
      """
      toks = self.tokenize(phrase)
      curr = self.offensive_trie
      for t in toks:
          if t not in curr:
              curr[t] = {}
          curr = curr[t]
      curr[self.END] = True
      self.max_len = max(self.max_len, len(toks))
  
imports: from parlai.agents.transformer.transformer import TransformerClassifierAgent
  from parlai.core.agents import create_agent, create_agent_from_shared
  from parlai.tasks.dialogue_safety.agents import OK_CLASS, NOT_OK_CLASS
  from parlai.utils.typing import TShared
  from parlai.utils.io import PathManager
  import parlai.utils.logging
  import os
label_desc: Use image node_id 2 for calling the OffensiveStringMatcher obj's underlying member method code with example usage: obj.add_phrase(phrase) without return types