Skip to content

Commit

Permalink
Change version
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Oct 20, 2023
1 parent 83fa7fa commit 6732ed6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
name=PROJECT_NAME,
packages=["pdf_tokens_type_trainer", "pdf_features", "pdf_token_type_labels"],
package_dir={"": "src"},
version="0.53",
version="0.55",
url="https://github.com/huridocs/pdf-tokens-type-labeler",
author="HURIDOCS",
description="This tool returns each token type inside a PDF",
Expand Down
7 changes: 7 additions & 0 deletions src/pdf_token_type_labels/TaskMistakesType.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ class TaskMistakesType(Enum):
@staticmethod
def contains(key: str):
return key.upper() in [e.value for e in TaskMistakesType]

@staticmethod
def from_text(text: str):
try:
return TaskMistakesType[text.upper()]
except KeyError:
return TaskMistakesType.WRONG

0 comments on commit 6732ed6

Please sign in to comment.