Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementing spell check in my application's front-end

Status
Not open for further replies.

tbtcust

Programmer
Oct 26, 2004
214
US
I would like to implement spell check in my application front-end using a custom dictionary. Would someone provide some guidance?

Thanks in advance for any help.
 
Did you want forum707 or is this really a VB6 question?

In either case there isn't anything built-in or obvious for this. So a search for a 3rd party product or a code sample is probably your best bet.
 
Is that a spell check for someone writing a novel in your application, or is it for some technical entries? If you would explain it in more details you would get a better answer.

If, for example, you need users to enter only some hard to spell words, why not use a combo box with those words to choose from?


Have fun.

---- Andy
 
Thanks for the reply.

I have a list of 120 company names and they will be in a pic list going forward. Its the 100,000 + existing records where the company name was entered into a free form text box. These names have typos, misspelling, etc. I'm hoping to use the 120 names in a spellcheck function to correct the 100,000+ company names.

Your thoughts?
 

The 120 company names should be in a table where they would be 'spelled' once, right or wrong, and users can only choose the name from the list or combo. All other places (read: tables) where you need to use any Company, should use CompanyID instead which will connect to Company table by such CampanyID.

You may help your users to pick the Company by another combo like:
Display all Companies that start with a letter: (combo from A to Z)
and this 'letter' combo populates another combo with Company names that start with this letter.

I have similar situation with UserNames, over 600 users, for authorization purpose.


Have fun.

---- Andy
 
Andrzejek,

I don't disagree with your approach long term. But I need to clean up the 100,000+, as they are used downstream in a pivot table. That pivot's summary is skewed because of the name errors. If I can perform the cleanup in an automated way it would save me a lot of manual clean-up. I'm thinking a spellcheck on the company name column using just the 120 names as input would clean up the vast majority of errors.
 
It strikes me that you might be able to use Soundex or Metaphone to do this, and not bother with a dictionary at all.
 
Similar to strongm, I was going to suggest Levenshtein Distance. I don't see any VB6 code on that page, but it shouldn't be too difficult to convert the code that is there.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
strongm/gmmastros, Thanks so much. I looked at all three and this is what I'm looking for.
 
Can the database be read by MsAccess?
If so you could open the table and by using totals and grouping, create a list of all names with a count of each company. This would immediately show you how many were miss spelt. Instead of 100 companies you could get say 110 indicationg the 10 wrong ones.
Then execute an update query that changes each wrong names to the right one. Run this only for each of the 10 wrong names.

If you haven't MsAccess you can do it with Record sets in vb6 code but its harder to write the correct code.

Best way to not get duplication errors is to allow users to only select a name from an alphabetical table that has to have a "customer account created" first. It is easier to spot if someone enters the same company spelt differently.
A problem can still occur if someone enters a second entry for the same person eg T.Smith or Smith T. which is why they have separate fields for first and family names.

I often design a query for VB6 code using Msaccess then paste the SQL code across to a Vb6 execute statement (with a few changes to suit). You can test it easier that way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top