INNER CODE UNIT · Python
spaces_percentage
lefterisloukas/edgar-crawler · extract_items.py:364
spaces_percentage = spaces / len(table_text)
else:
# If the table text is empty, set the percentage to 0
spaces_percentage = 0
return non_blank_digits_percentage, spaces_percentage
def remove_html_tables(self, doc_report: str, is_html: bool) -> str:
"""
Remove HTML tables that contain numerical data
Note that there are many corner-cases in the tables that have text data instead of numerical
Args:
doc_report (str): The report html
is_html (bool): Whether the document contains html code or just plain text
Returns:
str: The report html without numerical tables