Skip to content

Commit

Permalink
Change type values
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Jul 4, 2024
1 parent 416b900 commit 3094375
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ check_format:
. .venv/bin/activate; command black --line-length 125 . --check

test:
. .venv/bin/activate; command cd src; python -m unittest test/test_trainer.py
. .venv/bin/activate; command cd src; python -m pytest
8 changes: 4 additions & 4 deletions src/pdf_token_type_labels/TokenType.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
class TokenType(Enum):
FORMULA = "Formula"
FOOTNOTE = "Footnote"
LIST_ITEM = "ListItem"
LIST_ITEM = "List item"
TABLE = "Table"
PICTURE = "Picture"
TITLE = "Title"
TEXT = "Text"
PAGE_HEADER = "PageHeader"
SECTION_HEADER = "SectionHeader"
PAGE_HEADER = "Page header"
SECTION_HEADER = "Section header"
CAPTION = "Caption"
PAGE_FOOTER = "PageFooter"
PAGE_FOOTER = "Page footer"

@staticmethod
def from_text(text: str):
Expand Down
4 changes: 2 additions & 2 deletions src/test/test_pdf_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def test_wrong_pdf(self):
def test_blank_xml(self):
pdf_features_empty = PdfFeatures.from_poppler_etree_content("", "")
pdf_features_empty_list = PdfFeatures.from_poppler_etree_content("", "[]")
self.assertNotEquals(pdf_features_empty, None)
self.assertNotEquals(pdf_features_empty_list, None)
self.assertNotEqual(pdf_features_empty, None)
self.assertNotEqual(pdf_features_empty_list, None)

def test_ocr_pdf(self):
current_directory = Path(__file__).parent.resolve()
Expand Down

0 comments on commit 3094375

Please sign in to comment.