rrimpila / tiramisu

Building an NLP application
4 stars 0 forks source link

Malfunction with some search queries #52

Closed tiigit closed 1 year ago

tiigit commented 1 year ago

Here are some search queries that don't work as they're supposed to:

EDIT: word' (and other versions when only one quotation mark ' or ") --> throws ValueError: No closing quotation, doesn't show error message (only in BOOLEAN) word\ --> throws ValueError: No escaped character, doesn't show error message (only in BOOLEAN) OR is OR have OR want (also if operator is after the query) --> throws ValueError: not enough values to unpack (expected 3, got 2), doesn't show error message (in BOOLEAN)

Doesn't happen anymore: word/ --> throws FileNotFounderror, doesn't show error message (in BOOLEAN and RANKING)

ciccmin commented 1 year ago

It might be something to do with the lemmatiser function. I'll try to fix it asap

rrimpila commented 1 year ago

Though it might be related to the graph saving, there's currently no checking if the used characters are allowed in filenames. The latter error sounds like it's file system related.

rrimpila commented 1 year ago

I don't get the word/ error on Windows, I'm guessing it's because path slashes are different direction. But I found a function to normalize the query into a safer filename in any case, to lessen chances of things breaking. The ValueError still happens, I think it has something to do with the inflections

tiigit commented 1 year ago

word/ error doesn't happen anymore! Somehow it got fixed, but now it searches normally for occurences of "word/", is this what we want? @rrimpila @ciccmin

Also: I added a new error to the list above (OR in front or after the search query)

ciccmin commented 1 year ago

That's great! I don't see a problem with "word/" being searchable, so I think it can stay as it is

tiigit commented 1 year ago

All of these errors are now handled. If anything else comes up, we can create a new issue @rrimpila @ciccmin !