[regex?] word correction

  • Thread starter Mathieu LEMAIRE
  • Start date
M

Mathieu LEMAIRE

well what i want do seems tricky.. i want to feature something like
google's word correction

let say user typed in "corection". Having the word "correction" sw in my
dbases, i would then suggest him "correction"

I hardly know regex but is it the way to do that ??

Thank you for any clue
 
R

Ravi

What I am thinking, load the dictionary variables into the tree type
data strucutre in local memory. So when user types , we can search the
corresponding string in the tree in fast with the index. Get the
corresponding valid string if available match failed at one place from
that point.
Get the feedback and others and proceed.
Good luck.

Cheers,
Ravi.
 
R

Roedy Green

well what i want do seems tricky.. i want to feature something like
google's word correction

let say user typed in "corection". Having the word "correction" sw in my
dbases, i would then suggest him "correction"

I hardly know regex but is it the way to do that ??

you need a spell checker which has a dictionary of words and some
algorithms to guess the closest match.

See http://mindprod.com/jgloss/spellchecker.html
 
M

Mathieu LEMAIRE

What I am thinking, load the dictionary variables into the tree type
data strucutre in local memory. So when user types , we can search the
corresponding string in the tree in fast with the index. Get the
corresponding valid string if available match failed at one place from
that point.
I think your point is creating a JList that refreshes itself whenever
user types a letter ? I am looking for sthg like that already
developped ; that should already exist...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top