Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8675021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:50:52+00:00 2026-06-12T19:50:52+00:00

My current programming project is a sort of french dictionary in Java (using sqlite).

  • 0

My current programming project is a sort of french dictionary in Java (using sqlite). I was wondering what would happen if someone wanted to find the present tense for “avoir” but typed in “avior” and how I would handle it. So I thought I could implement some sort of closest match/did you mean functionality. So my question is:

Is there a way to use the database to search for similar matches?

when I made the same program in python a while back (using xml instead) I used this system but it wasn’t very effective and required a large error margin to be somewhat effective (and subsequently suggesting words with no relevance!)… but something similar could still be useful nether the less

def getSimilar(self, word, Return = False):
    matches = list()
    for verb in self.data.getElementsByTagName("Verb"):
        for x in range(16):
            if x % 2 != 0 and x>0:
                if (x == 15 or x == 3 or x == 1): 
                    part = Dict(self.data).removeBrackets(Dict(self.data).getAccents(verb.childNodes[x].childNodes[0].data)) 
                    diff = 0
                    for char in word:
                        if (not char in part):
                            diff += 1
                    if (diff < self.similarityValue) and (-self.errorAllowance <= len(part) - len(word) <= self.errorAllowance):
                        matches.append(part)
                else:
                    for y in range(14): 
                        if (y % 2 != 0 and y>0):
                            part = Dict(self.data).getAccents(verb.childNodes[x].childNodes[y].childNodes[0].data)
                            diff = 0
                            for char in word:
                                if (not char in part):
                                    diff += 1
                            if (diff < self.similarityValue) and (-self.errorAllowance <= len(part) - len(word) <= self.errorAllowance):
                                matches.append(part)
    if not Return:
        for match in matches:
            print "Did you mean '" + match + "'?"
    if Return: return matches

Any help is welcomed!

Jamie

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:50:54+00:00Added an answer on June 12, 2026 at 7:50 pm

    try using
    https://github.com/mateusza/SQLite-Levenshtein

    Works quite well

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to elaborate on the current project i'm working on but that would
In a current project I am programming C++, and I am using the STL
Background I am using interface-based programming on a current project and have run into
NOTE: I am really not very good at Multithreaded programming, but my current project
I apologise for the length of this question. My current Mathematica programming project involves
I decided to get back to Cocoa/Objective-C programming recently and my current project calls
I'm programming against a Webservice that requires the amount of ticks (for the current
In my current django project I have a model that stores very long strings
Current Project Setup I've been working on a web-based chat, similar to Facebook chat.
So my current project is mostly in Python, but I'm looking to rewrite the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.