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

Fix searching issues with classifier-reborn #77

Merged
merged 3 commits into from Nov 29, 2016

Conversation

tra38
Copy link
Contributor

@tra38 tra38 commented Oct 14, 2016

This pull request should handle issues #64 and #75, mostly by throwing up human-readable error messages. Error messages aren't cool, but they're more graceful than programs crashing.

Issue #64 is caused by adding "invalid" documents beforehand, and we resolve this by rejecting those "invalid" documents before they could cause problems later on for the end-user. If you try to search a corpus of documents that include "invalid" documents, the program will crash. If you try to find related phrases, it won't crash and you'll still get results. However, I would still recommend rejecting "invalid" documents outright because these invalid documents adds noise that can narrowly impact the LSI's results.

Issue #75 is caused by attempting to search through a corpus for a term that does not exist within the corpus. We resolve this issue by rejecting the search term outright. The user here knows that no document has the search term in question, and will be able to move on with their lives. This bug fix only works if you have GSL...otherwise, you just get the built-in "Cannot Normalize Zero Vector" error (which isn't a user-friendly error message, but it does stop invalid searches).

Let me know if these changes are appropriate or if you have your own suggestions.

@Ch4s3
Copy link
Member

Ch4s3 commented Nov 29, 2016

Just saw this pull request. Tanks a ton!

@Ch4s3 Ch4s3 merged commit adfbe5b into jekyll:master Nov 29, 2016
Ch4s3 added a commit that referenced this pull request Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants