Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search_dates doesn't appear to respect settings #1245

Open
FredAtNeo opened this issue Nov 14, 2024 · 0 comments
Open

search_dates doesn't appear to respect settings #1245

FredAtNeo opened this issue Nov 14, 2024 · 0 comments

Comments

@FredAtNeo
Copy link

I am using the below code and I am getting incorrect values returned:

from dateparser.search import search_dates

content = "Agreement shall be renewed through and including December 31, 2024 (the \"Renewal Term\"); and (b) after the Renewal Term, the Agreement shall continue thereafter until either party elects to terminate the Agreement by delivering written notice of termination to the other party at least 90 days before the desired effective date of such termination"

results = search_dates(
        content,
        # azure_text_input_data.response.response["content"],
        settings={"STRICT_PARSING": True, "REQUIRE_PARTS": ["day", "month", "year"]},
)

print(results)

My expectation is that only the date December 31, 2024 is returned, but when I run this I also get "90 days before" in the results. Is there something wrong in my code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant