douglasfaisal's picture
Upload 7 files
16959be
import re
def question_to_statement(question: str):
pattern = "(?P<qWord>kapan|(ber|meng|si)?apa|(di|ke) ?(mana)|bagaimana) ?(saja)? ?(kah)?"
result = re.sub(pattern, "", question.lower())
result = result.replace("?", "")
result = re.sub("\s+", " ", result)
result = result.strip()
return result