Compare requested languages to OCR engine instead of tesseract directly

Also refactoring to facilitating validation needing the plugin manager.
This commit is contained in:
James R. Barlow
2020-05-16 01:50:37 -07:00
parent 9af94ac9b7
commit 2bd586e093
8 changed files with 38 additions and 21 deletions
+6 -2
View File
@@ -100,11 +100,15 @@ class OcrEngine(ABC):
"""Returns the version of the OCR engine."""
@abstractstaticmethod
def creator_tag(options) -> str:
def creator_tag(options: Namespace) -> str:
"""Returns the creator tag to identify this software's role in creating the PDF."""
@abstractstaticmethod
def languages() -> AbstractSet[str]:
def __str__(self):
"""Returns name of OCR engine and version."""
@abstractstaticmethod
def languages(options: Namespace) -> AbstractSet[str]:
"""Returns set of languages that are supported."""
@abstractstaticmethod