Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database search
#1
I would like to have a search function in my app where the user types in a name and the database is searched for the record that matches that name however, the user may not know the correct spelling of the name that they are looking for. For example, the database may contain the name of Anomalocaris but the user enters Anamalacares into the search box. How can you get the proper record in this case?

I have looked at libraries such as FuzzyWuzzy but documentation is sparse and examples that I have seen need the name that is entered as well as the string to compare it with and then simply returns a number indicating the number of differences between the two.

What is the best way to resolve the problem of finding a record based upon a misspelled name?
Reply
#2
This may be of interest: https://stackabuse.com/phonetic-similari...in-python/
Reply
#3
Thank you for your response. Being new to Python, and looking at the code in their example, it is still not clear to me how it works when searching a database based upon the user's input which may not have the proper spelling. Again, it is talking about returning numbers as weights. Are you supposed to select the record with the highest number?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Search the data to update in a database chris0147 7 6,713 Oct-27-2016, 03:16 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020