def METHOD_NAME(filepath: str) -> str:
    file_extension = PurePath(filepath).suffix
    if "pdf" in file_extension:
        full_doc_text = pdf_to_text(filepath)
    elif "html" in file_extension:
        with open(filepath, "r") as f:
            html_doc = f.read()
        full_doc_text = html_to_text(html_doc)
    else:
        with open(filepath, "r") as f:
            full_doc_text = f.read()
    return full_doc_text