Alina-enni / lingdiggers

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

Search results not printing in ranked order #28

Closed miglamigla closed 2 years ago

miglamigla commented 2 years ago

I've checked the code and at the moment it does not print out the results in ranked order.

miglamigla commented 2 years ago

Instead of taking each item in our searchlist in turn and going through each document to find it, I changed the code to do it in reverse: take each matched document in turn and look for every searchlist item. This way the ranked order is retained, however this created the problem of duplicates. To go around it, before searching for each searchlist item in a doc, spaces are added before and after the item.