Skip to content

Commit

Permalink
Revert "Merge branch 'main' of github.com:alphanome-ai/sec-parser"
Browse files Browse the repository at this point in the history
This reverts commit 62c2dcf, reversing
changes made to cf34079.
  • Loading branch information
Elijas committed Dec 21, 2023
1 parent 62c2dcf commit 87d8f2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 42 deletions.
12 changes: 2 additions & 10 deletions sec_parser/processing_steps/title_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
TextStyle,
)
from sec_parser.semantic_elements.title_element import TitleElement
from sec_parser.semantic_elements.page_element import PageElement

if TYPE_CHECKING: # pragma: no cover
from sec_parser.semantic_elements.abstract_semantic_element import (
Expand Down Expand Up @@ -60,18 +59,11 @@ def _process_element(
"""Process each element and convert to TitleElement if necessary."""
if not isinstance(element, HighlightedTextElement):
return element

# Ensure the style is tracked
self._add_unique_style(element.style)

level = self._unique_styles_by_order.index(element.style)

if PageElement.is_page(source = element):
return PageElement.create_from_element(
element,
log_origin=self.__class__.__name__,
)

level = self._unique_styles_by_order.index(element.style)
return TitleElement.create_from_element(
element,
level=level,
Expand Down
32 changes: 0 additions & 32 deletions sec_parser/semantic_elements/page_element.py

This file was deleted.

0 comments on commit 87d8f2e

Please sign in to comment.