sec_parser.semantic_elements.highlighted_text_element
Classes
The HighlightedTextElement class, among other uses, |
|
Module Contents
- class sec_parser.semantic_elements.highlighted_text_element.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:
sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElementThe 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.
- style = None
- classmethod 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
Convert the semantic element into another semantic element type.
- to_dict(*, include_previews: bool = False, include_contents: bool = False) dict[str, Any]
- class sec_parser.semantic_elements.highlighted_text_element.TextStyle
- PERCENTAGE_THRESHOLD = 80
- BOLD_THRESHOLD = 600
- is_all_uppercase: bool = False
- bold_with_font_weight: bool = False
- italic: bool = False
- centered: bool = False
- underline: bool = False
- __bool__() bool
- classmethod from_style_and_text(style_percentage: dict[tuple[str, str], float], text: str) TextStyle
- classmethod _is_bold_with_font_weight(key: str, value: str) bool