sec_parser.semantic_elements.highlighted_text_element ===================================================== .. py:module:: sec_parser.semantic_elements.highlighted_text_element Classes ------- .. autoapisummary:: sec_parser.semantic_elements.highlighted_text_element.HighlightedTextElement sec_parser.semantic_elements.highlighted_text_element.TextStyle Module Contents --------------- .. py:class:: HighlightedTextElement(html_tag: sec_parser.processing_engine.html_tag.HtmlTag, *, processing_log: sec_parser.processing_engine.processing_log.ProcessingLog | None = None, style: TextStyle | None = None, log_origin: sec_parser.processing_engine.processing_log.LogItemOrigin | None = None) Bases: :py:obj:`sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement` The HighlightedTextElement class, among other uses, is an intermediate step in identifying title elements. For example: ============ First, elements with specific styles (like bold or italic text) are classified as HighlightedTextElements. These are later examined to determine if they should be considered TitleElements. .. py:attribute:: style :value: None .. py:method:: create_from_element(source: sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement, log_origin: sec_parser.processing_engine.processing_log.LogItemOrigin, *, style: TextStyle | None = None) -> HighlightedTextElement :classmethod: Convert the semantic element into another semantic element type. .. py:method:: to_dict(*, include_previews: bool = False, include_contents: bool = False) -> dict[str, Any] .. py:class:: TextStyle .. py:attribute:: PERCENTAGE_THRESHOLD :value: 80 .. py:attribute:: BOLD_THRESHOLD :value: 600 .. py:attribute:: is_all_uppercase :type: bool :value: False .. py:attribute:: bold_with_font_weight :type: bool :value: False .. py:attribute:: italic :type: bool :value: False .. py:attribute:: centered :type: bool :value: False .. py:attribute:: underline :type: bool :value: False .. py:method:: __bool__() -> bool .. py:method:: from_style_and_text(style_percentage: dict[tuple[str, str], float], text: str) -> TextStyle :classmethod: .. py:method:: _is_bold_with_font_weight(key: str, value: str) -> bool :classmethod: