sec_parser.processing_steps.page_number_classifier
Classes
Create a collection of name/value pairs. |
|
Module Contents
- class sec_parser.processing_steps.page_number_classifier.PageNumberCandidate
- TEXT_LENGTH_THRESHOLD = 100
- OCCURRENCE_THRESHOLD = 5
- text: str
- class sec_parser.processing_steps.page_number_classifier.MostCommonCandidateSearchStatus(*args, **kwds)
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- NOT_SEARCHED
- NOT_EXIST
- FOUND
- class sec_parser.processing_steps.page_number_classifier.PageNumberClassifier(types_to_process: set[type[sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement]] | None = None, types_to_exclude: set[type[sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement]] | None = None)
-
- _NUM_ITERATIONS = 2
- _element_to_page_number_candidate: dict[sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement, PageNumberCandidate]
- _candidate_count: collections.Counter[PageNumberCandidate]
- _most_common_candidate: PageNumberCandidate | None = None
- _most_common_candidate_count: int = 0
- _search_status: MostCommonCandidateSearchStatus
- _process_element(element: sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement, context: sec_parser.processing_steps.abstract_classes.abstract_elementwise_processing_step.ElementProcessingContext) sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement
- _find_page_number_candidates(element: sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement) None
- _classify_elements(element: sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement) sec_parser.semantic_elements.abstract_semantic_element.AbstractSemanticElement
- _get_most_common_candidate() PageNumberCandidate | None