Alina-enni / lingdiggers

Project for the Building NLP Applications course
0 stars 0 forks source link

Step 3 #11

Closed Alina-enni closed 2 years ago

Alina-enni commented 2 years ago
  1. If you just copy the code from the tutorial, your program will crash if you enter a word (term) that does not occur in any document in the collection. Modify your program to work correctly also in the case that a term is unknown. For instance, what documents should be retrieved for a search such as: (1) "unknownweirdword", (2) "NOT unknownweirdword", or (3) "unknownweirdword OR this"? (If this is too difficult, don't get stuck here, but come back to it later.)
Alina-enni commented 2 years ago

I will try to figure this one out after Raul gave us some hints at how to do this

Alina-enni commented 2 years ago

One problem I've encountered is that our current code does not work when the user inputs "NOT example" for example. The negation part is not recognised by the script and is instead interpreted as an unknown --> the query is interpreted as something not in the collection at all.

Because of this, I have to make changes to the while-loop