Skip to content

Not able to Extract "multiple" dates using get_date #39

Open
@suyashdb

Description

@suyashdb
>>>import lexnlp.extract.en.dates
>>> text = "This agreement is dated on 15th july 2018. This agreement shall terminate on the 15th day of March, 2020. "
>>> print(list(lexnlp.extract.en.dates.get_dates(text)))
[datetime.date(2020, 3, 15)]

currently the get_dates, get_raw_date_list method giving me only the last occurrence of date entity. In above text, i expected 15th july 2018 along with 15th march 2020.

Is there a way to grab all dates from a text/sentence?

Edit:
Probably the issue is: the first date in my text was not recognized hence not extracted. Here is the example:

>>> text = "AUTO XX IF SSR TKNA/E OR FA NOT RCVD BY RJ BY 29MAY19 1350 DOH LT,REF IATA PRVD PAX"
>>> list(lexnlp.extract.en.dates.get_raw_dates(text))
[]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions