Skip to content

Small python date-parsing library for noisy date strings

Notifications You must be signed in to change notification settings

dannyfriar/lazydate

Repository files navigation

Lazydate

Small python date-parsing library to convert noisy date strings to Python datetime.datetime objects and extract dates from short texts (using an encoder-decoder model).

Designed to be robust to mis-spellings, different date formats and surrounding text.

import lazydate as ld

ld.parse("22 aug 93")
>>> datetime.datetime(1993, 8, 22, 0, 0)

ld.parse("the event will happen on 19 december '20")
>>> datetime.datetime(2020, 12, 19, 0, 0)

ld.parse("20./n0vembr/2020")
>>> datetime.datetime(2020, 11, 20, 0, 0)

ld.parse_batch(["22 aug 93", "20./n0vembr/2020"])
>>> [datetime.datetime(1993, 8, 22, 0, 0), datetime.datetime(2020, 11, 20, 0, 0)]

About

Small python date-parsing library for noisy date strings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages