From 8084fc7556c130c686b79ac4dd78723bb8251819 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 16 Jan 2024 16:58:23 +0100 Subject: [PATCH] Fix some typos in comments and documentation (found by codespell) Signed-off-by: Stefan Weil --- kraken/ketos/ro.py | 2 +- kraken/kraken.py | 2 +- kraken/lib/dataset/recognition.py | 4 ++-- kraken/lib/segmentation.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kraken/ketos/ro.py b/kraken/ketos/ro.py index e2c97f19f..dceee4d7f 100644 --- a/kraken/ketos/ro.py +++ b/kraken/ketos/ro.py @@ -65,7 +65,7 @@ @click.option('--lag', show_default=True, default=READING_ORDER_HYPER_PARAMS['lag'], - help='Number of evaluations (--report frequence) to wait before stopping training without improvement') + help='Number of evaluations (--report frequency) to wait before stopping training without improvement') @click.option('--min-delta', show_default=True, default=READING_ORDER_HYPER_PARAMS['min_delta'], diff --git a/kraken/kraken.py b/kraken/kraken.py index d269cc7c8..94308f999 100644 --- a/kraken/kraken.py +++ b/kraken/kraken.py @@ -602,7 +602,7 @@ def ocr(ctx, model, pad, reorder, base_dir, no_segmentation, text_direction): if reorder and base_dir != 'auto': reorder = base_dir - # first we try to find the model in the absolue path, then ~/.kraken + # first we try to find the model in the absolute path, then ~/.kraken nm = {} # type: Dict[str, models.TorchSeqRecognizer] ign_tags = model.pop('ignore') for k, v in model.items(): diff --git a/kraken/lib/dataset/recognition.py b/kraken/lib/dataset/recognition.py index 0dfca6779..529149810 100644 --- a/kraken/lib/dataset/recognition.py +++ b/kraken/lib/dataset/recognition.py @@ -329,7 +329,7 @@ def add(self, line: Optional[BaselineLine] = None, page: Optional[Segmentation] = None): """ - Adds an indiviual line or all lines on a page to the dataset. + Adds an individual line or all lines on a page to the dataset. Args: line: BaselineLine container object of a line. @@ -518,7 +518,7 @@ def add(self, line: Optional[BBoxLine] = None, page: Optional[Segmentation] = None): """ - Adds an indiviual line or all lines on a page to the dataset. + Adds an individual line or all lines on a page to the dataset. Args: line: BBoxLine container object of a line. diff --git a/kraken/lib/segmentation.py b/kraken/lib/segmentation.py index 0d0829fba..03edd33d6 100644 --- a/kraken/lib/segmentation.py +++ b/kraken/lib/segmentation.py @@ -1031,7 +1031,7 @@ def extract_polygons(im: Image.Image, bounds: 'Segmentation') -> Image.Image: Args: im: Input image - bounds: A Segmentation class containing a boundig box or baseline + bounds: A Segmentation class containing a bounding box or baseline segmentation. Yields: