class_docstr: Keyphrase Extraction
docstr: ```
  Keyphrase Extraction
  
  Args:
    lang(str):  2-character language code:
    custom_stopwords(list): list of custom stopwords to ignore
  ```
docstr_tok: ["``","`","Keyphrase","Extraction","Args",":","lang","(","str",")",":","2-character","language","code",":","custom_stopwords","(","list",")",":","list","of","custom","stopwords","to","ignore","``","`"]
code: def __init__(
      self,
      lang="en",
      custom_stopwords=[
          "et al",
          "et",
          "al",
          "n't",
          "did",
          "does",
          "lt",
          "gt",
          "br",
      ],
  ):
      """
      ```
      Keyphrase Extraction
  
      Args:
        lang(str):  2-character language code:
        custom_stopwords(list): list of custom stopwords to ignore
      ```
      """
      # error checks
      if not TEXTBLOB_INSTALLED:
          raise Exception(
              "The textblob package is required for keyphrase extraction: pip install textblob; python -m textblob.download_corpora"
          )
      if lang not in SUPPORTED_LANGS:
          raise ValueError(
              f'lang="{lang}" is not supported. Supported 2-character ISO 639-1 language codes are: {SUPPORTED_LANGS}'
          )
      self.lang = lang
  
      # build blacklist
      from nltk.corpus import stopwords as nltk_stopwords
      from sklearn.feature_extraction.text import ENGLISH_STOP_WORDS
  
      if lang == "en":
          stopwords = list(ENGLISH_STOP_WORDS) + custom_stopwords
      elif lang == "zh":
          stopwords = TU.chinese_stopwords() + custom_stopwords
      elif lang in SUPPORTED_LANGS:
          stopwords = nltk_stopwords.words(SUPPORTED_LANGS[lang])
      else:
          stopwords = []
      blacklist = stopwords + custom_stopwords
      self.blacklist = blacklist
  
imports: import warnings
  from collections import Counter
  from ...None import imports
  from ..None import textutils
label_desc: Use image node_id 1 to create a new KeywordExtractor object  with example: obj = KeywordExtractor(lang, custom_stopwords)