Skip to main content

A simple package for date correction

Project description

Description

date-corrector is a simple postprocessing library to provide correction suggestions for dates extracted by an OCR. The library utilizes the levenshtein distance concept and uses backtracking with dynamic programming to search for possible date corrections. It can correct both english and arabic dates.

Installation

pip install date-corrector

Usage

from date_corrector import correctDate, listLanguages

languages = listLanguages()
print(languages)    # ['en', 'ar']

suggestions = correctDate('IZIo212O21', 'en')
print(suggestions)    # [('17/02/2021', 40.0), ('12/02/2021', 40.0)]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

date_corrector-0.0.2.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

date_corrector-0.0.2-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page