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

Is there a way to find out which values of a date are imputed by duckling #689

Open
nvinayvarma189 opened this issue Apr 26, 2022 · 5 comments

Comments

@nvinayvarma189
Copy link

Case 1:
Input text: on the 26th
Duckling output: {"value":"2022-04-26T00:00:00.000-07:00","grain":"day","type":"value"}
In this case, duckling has filled the values of the month (04) and the year (2022). So month and year are imputed

Case 2:
Input text: 26th May
Duckling output: {"value":"2022-05-26T00:00:00.000-07:00","grain":"day","type":"value"}
In this case, duckling has filled the value of the year (2022). Only year is imputed

In both the above cases, duckling tried to obtain a complete date from the input by imputing some values.

Question:
From the parsed output itself, Is there a way to know if duckling has imputed certain placeholder values to the parsed output? If yes, which ones (i.e. Month or a year or both, etc)?

@chessai
Copy link
Contributor

chessai commented Apr 26, 2022 via email

@nvinayvarma189
Copy link
Author

@chessai

Sorry but I did not get it. I understand that Duckling gives preference to the closest future date, but how can that help me find out what values of the date were imputed by Duckling?

@chessai
Copy link
Contributor

chessai commented Apr 26, 2022

@chessai

Sorry but I did not get it. I understand that Duckling gives preference to the closest future date, but how can that help me find out what values of the date were imputed by Duckling?

I don't think this is doable right now, you'd have to make a PR to make this possible

@nvinayvarma189
Copy link
Author

Thanks @chessai

I just have one more question. Since it is not possible to know which values are imputed, is it possible to know if at all imputation has happened?

I think even for this info, we would need a PR right?

@chessai
Copy link
Contributor

chessai commented Apr 27, 2022

Thanks @chessai

I just have one more question. Since it is not possible to know which values are imputed, is it possible to know if at all imputation has happened?

I think even for this info, we would need a PR right?

Yes, you would likely need a PR for that as well.

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

2 participants