raphaelsty / cherche

Neural Search
MIT License
325 stars 14 forks source link

Added spelling corrector object #2

Closed NicolasBizzozzero closed 2 years ago

NicolasBizzozzero commented 2 years ago

Hello ! I added a spelling corrector base class as well as the original implementation of the Norvig spelling corrector. The spelling corrector can be fitted directly on the pipeline's documents with the '.add(documents)' method. I also provided an optional (defaults to False) external dictionary, the one originally used by Norvig.

I have no issue updating my code for improvements, so feel free to suggest any modification !

raphaelsty commented 2 years ago

Thank you Nicolas, the code you produced corresponds exactly to the philosophy of cherche

NicolasBizzozzero commented 2 years ago

Hello Raphael ! I updated my code following your recommendations, hope this version is good enough to be included in cherche !

NicolasBizzozzero commented 2 years ago

Hello again ! Following my recent changes and addition of a "Query" base class, I also added a quick Pseudo Relevance Feedback class, which I found in plenty of IR research and can prove useful for others users.

I hope you will find these changes pertinent for cherche. As always, feel free to give me any recommendation for code cleanup and/or improvements !

raphaelsty commented 2 years ago

Merging to main.