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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SEEKing names that vary

Status
Not open for further replies.

FoxGolfer

Programmer
Jul 30, 2002
100
US
(VFP7.0)
I'm trying to seek a value in a table that is indexed on the name field. The text file, downloaded from a website that feeds the seek statement uses variable spelling. For example, one week it has TCU, next week T.C.U; UTEP, then U.T.E.P., S. Carolina vs. South Carolina, etc. The case variation is not a problem, but the other changes are creating eof() and inaccurate data.
Any help?

Tom
 
Well,
seems like you need a lookup table of seek term synonyms.

main seek terms
1 TCU
2 UTEP
3 SC

synonym seek terms
1 1 TCU
2 1 T.C.U
3 1 T.C.U.
4 2 UTEP
4 2 U.T.E.P
5 3 SC
5 3 S. Carolina
5 3 South Carolina

Now if you find U.T.E.P in the synonym seek terms you see, that you really should seek for id 2 of the main seek terms, so for UTEP.

Of course you need to manually maintain these synonyms table, but I see no automatic way to do that, even if the problem is all about US state names only, there is no simple conversion function.

Bye, Olaf.

 
Thanks, I didn't think of using a look-up table for a variable seek.

Tom
 
Nope, it's a cut and paste from an uncontrolled website.

Thanks,

Tom
 
Interesting problem can you give more examples, the ones you give are easy fixes, converting state variations (only 50), the other example could be handled by stripping the puncuation.


Michael C
 
Michael,
Thanks for your response. That project was cancelled. Initially I did punctuation stripping but it was more than that; it was variations of every conceivable spelling and abbreviations of states.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top