You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
ctparse - Parse natural language time expressions in Python version:
Python version: 3.10
Operating System: Linux
Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
What I did do?
I encountered issues with ctparse while using it for natural language date and time processing, especially with return dates. When attempting date-time validation, I observed problems with ctparse not providing None responses for incorrect inputs, sometimes generating random dates.
I have attached image for reference:
The examples one is correct,
I plan to raise this issue on GitHub and seek a solution if possible.
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
The text was updated successfully, but these errors were encountered:
thanks for sharing your feedback. However, I am afraid there is no straight forward solution to your problem, at least none that I am seeing. ctparse by nature is not perfect but rather tries to generate the best possible match. I.e. as long as there is one rule that generates at least one production, that will be returned.
To mitigate your issue you can build auxiallary logic on the meta data in the response:
res=ctparse("how are you?")
# the score can be understood as log-quality - very small values like this are a sign of low qualityres.score# how much of the original text was used for this response? If that is just a small part (here 1/4) there is likely something fishylen(res.resolution) /len("how are you?")
I hope that helps.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
What I did do?
I encountered issues with ctparse while using it for natural language date and time processing, especially with return dates. When attempting date-time validation, I observed problems with ctparse not providing None responses for incorrect inputs, sometimes generating random dates.
I have attached image for reference:
The examples one is correct,
I plan to raise this issue on GitHub and seek a solution if possible.
The text was updated successfully, but these errors were encountered: