Skip to content
Advertisement

FuzzyWuzzy error: WARNING:root:Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ‘/’]

Trying to write a code that will compare multiple files and return the highest fuzzratio between multiple options.

Problem is I’m getting an error message:

WARNING:root:Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ‘/’] WARNING:root:Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ‘.’]

And the exported file is essentially blank. Any clue why this is happening?

JavaScript

Advertisement

Answer

Sorry for the late answer. I am facing a similar issue and found your question.

The problem is not really one it’s just a warning and wont actually result in any differences in your matches.

JavaScript

Means that the query string for process.extract() didn’t contain any common characters of a natural language: [Query: '/'].

After digging into fuzzywuzzy, i found that a string processor reduces input query to empty string, which wont match any pattern in the search text you provide.

My approach to get rid of these warnings is to validate the query string with that string processor before doing the fuzzy search.

JavaScript
Advertisement