docstr: Parameters
  ----------
  doc_domains : np.array like
          Length of documents in corpus. Specifies a single domain for each document.
  min_domain_count : int, None
          Term should appear in at least this number of domains
          Default 0
  max_domain_count : int, None
          Term should appear in at most this number of domains
          Default is the number of domains in doc_domains
docstr_tok: ["Parameters","--","--","--","--","--","doc_domains",":","np.array","like","Length","of","documents","in","corpus",".","Specifies","a","single","domain","for","each","document",".","min_domain_count",":","int",",","None","Term","should","appear","in","at","least","this","number","of","domains","Default","0","max_domain_count",":","int",",","None","Term","should","appear","in","at","most","this","number","of","domains","Default","is","the","number","of","domains","in","doc_domains"]
code: def __init__(
      self, doc_domains, min_domain_count=None, max_domain_count=None
  ):
      """
  
      Parameters
      ----------
      doc_domains : np.array like
              Length of documents in corpus. Specifies a single domain for each document.
      min_domain_count : int, None
              Term should appear in at least this number of domains
              Default 0
      max_domain_count : int, None
              Term should appear in at most this number of domains
              Default is the number of domains in doc_domains
      """
      self.doc_domains = doc_domains
      if max_domain_count is None and min_domain_count is None:
          raise NeedsMaxOrMinDomainCountException(
              "Either max_domain_count or min_domain_count must be entered"
          )
      self.min_domain_count = (
          0 if min_domain_count is None else min_domain_count
      )
      self.max_domain_count = (
          len(doc_domains)
          if max_domain_count is None
          else max_domain_count
      )
  
file_path: scattertext/scattertext/termcompaction/DomainCompactor.py
imports: import numpy
  from scattertext.domain.CombineDocsIntoDomains import CombineDocsIntoDomains
label_desc: Use image node_id 1 to create a new DomainCompactor object from inherited base classes: object with example: obj = DomainCompactor(doc_domains, min_domain_count, max_domain_count)