class_docstr: Detect whether the corpus contains possible profanity content.
  
  We use the word list from https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words
code: def __init__(self, langs: Optional[Union[str, List, Tuple]] = None):
      def _download(url, retries=5):
          while retries + 1 > 0:
              try:
                  r = requests.get(url, stream=True, verify=True)
                  if r.status_code != 200:
                      raise RuntimeError(
                          "Failed downloading url {}".format(url)
                      )
                  return r.text
              except Exception as e:
                  retries -= 1
                  if retries <= 0:
                      raise e
                  print(
                      "download failed due to {}, retrying, {} attempt{} left".format(
                          repr(e), retries, "s" if retries > 1 else ""
                      )
                  )
  
      url_path = "https://raw.githubusercontent.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words/b36ce5c34c14cb7872dd4c2a4e55fe526138462d/{lang}"
      available_langs = {
          "ar",
          "cs",
          "da",
          "de",
          "en",
          "eo",
          "es",
          "fa",
          "fi",
          "fr",
          "hi",
          "hu",
          "it",
          "ja",
          "ko",
          "nl",
          "no",
          "pl",
          "pt",
          "ru",
          "sv",
          "th",
          "tlh",
          "tr",
          "zh",
      }
      self._suspicious_words = []
      if langs is None:
          filter_langs = available_langs
      elif isinstance(langs, str):
          filter_langs = [langs]
      elif isinstance(langs, (tuple, list)):
          filter_langs = list(langs)
      else:
          raise ValueError("Unsupported input langs={}".format(langs))
      for lang in filter_langs:
          assert (
              lang in available_langs
          ), "lang={} is not supported. All supported languages={}".format(
              lang, available_langs
          )
          out = _download(url_path.format(lang=lang))
          self._suspicious_words += [
              word.strip() for word in out.split("\n") if word.strip()
          ]
      self._regex = _words_match_regex(self._suspicious_words)
  
imports: import re
  import regex
  import requests
  import unicodedata
  import os
  import warnings
  from typing import List, Pattern, Union, Tuple, Optional
  from sacremoses.normalize import MosesPunctNormalizer
  from ..utils.lazy_imports import try_import_fasttext, try_import_langid
  from ..utils.misc import download
  from ..base import get_model_zoo_home_dir, get_repo_url
label_desc: Use image node_id 1 to create a new ProfanityFilter object  with example: obj = ProfanityFilter(langs)