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

Lime text fails in case of multiple sentences separated by punctuation #531

Closed
laurasootes opened this issue Mar 21, 2023 · 3 comments · Fixed by #773
Closed

Lime text fails in case of multiple sentences separated by punctuation #531

laurasootes opened this issue Mar 21, 2023 · 3 comments · Fixed by #773

Comments

@laurasootes
Copy link
Contributor

laurasootes commented Mar 21, 2023

Lime text fails in case of multiple text parts separated by punctuation. For example on

"review with???! review with???!"

(also on a sentence like:
The movie started great, but the ending is boring and unoriginal
due to the comma in the middle)

A sentence ending on punctuation symbol(s) does work, this was covered in the previous fix

It returns an error:
Could not create tensor from given input list

@laurasootes laurasootes self-assigned this Mar 21, 2023
@laurasootes
Copy link
Contributor Author

So far I traced it back to https://github.com/dianna-ai/dianna/blob/main/dianna/utils/onnx_runner.py it fails on
pred_onnx = sess.run([output_name], onnx_input)[0]

@stefsmeets
Copy link
Contributor

It seems to me that it fails on all punctuation as long as there is no space inbetween.

i.e. this fails:
The movie started great, but the ending is boring and unoriginal.

This works:
The movie started great , but the ending is boring and unoriginal .

@laurasootes
Copy link
Contributor Author

laurasootes commented Apr 6, 2023

Behaviour like this was already found by @loostrum in #437. A fix was implemented in #462. However, maybe the fix did not fix the whole problem?

I did notice before that the previously implemented tests did not cover all cases that we encountered now, so I did already added some additional tests in this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants