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)


		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
		
scattertext/termcompaction/DomainCompactor.py