import re


def clean_text(txt, regex_lst, RE_EMOJI, stopwords_hindi):
	"""This function takes the regular expression for various things such as punctuations and all which we want to remove and returns the cleaned sentence.
			
	Args:
		txt (str): Sentence which we have to clean.
		regex_lst (List[re]): List of all the regular expressions according to whom we have to clean the data.
		RE_EMOJI (re): The regular expression for the emojis removal.
		stopwords_hindi (List[str]): List of stopwords in Hindi Language
			
	Returns:
		str_cleaned (str): The cleaned sentence.
	"""
	  
	str_cleaned = txt

	# Iterate over the list of regular expressions. 
	for regex in regex_lst:
		str_cleaned = re.sub(regex, '', str_cleaned)
	str_cleaned = RE_EMOJI.sub(r'', str_cleaned)

	sent_splitted = str_cleaned.split()

	# Do not add the word to the list if it is in the stopwords.
	str_cleaned = " ".join([x.lower() for x in sent_splitted if x not in stopwords_hindi])
	return str_cleaned