Need program recommedations.

RedRado03

New member
Joined
Jan 10, 2006
Messages
4
Programming Experience
Beginner
Plead attached file.
 

Attachments

  • This is an example document.doc
    32 KB · Views: 24
Um, how about giving us a brief description of what's up.... no offense, but I don't just go around downloading documents just because someone posted it.

-tg
 
this is what that doc file contains:

This is an example document (doc). I am trying to create a program in Visual Basic (VB). What this program needs to do is search through a doc for acronym’s. After all the acronym’s are found it creates a acronym table at the end of the doc. 90% of all the acronym’s are within parenthesis. Not sure exactly what to do about the other 10%. I have a Master Acronym List (MAL) that is a table that can be used to help with the search. I’m just unsure how to code this. This will be appended after program reads this doc….

Acronym
Definition
doc
document
VB
Visual Basic
MAL
Master Acronym List


This is the Master Acronym list example that it would use to find the known acronym’s.

ronym
Definition
1D
first dimensional
2D
two dimensional
3D
three dimensional
doc
document
cc
carbon copy
MAL
Master Acronym List
TTYL
Talk to you later
VB
Visual Basic

Some code has started. I have over 2000 acronyms in my master acronym list. Do I need to create an array? Can I have it search for parenthesis and then do a word count to get the Acronym? Need to know how to code this.
 
RedRado03 said:
Thanks Juggalo. I didn't know how to submit the post with the word tables.

i just copied and pasted the content of the file into the post editer then clicked submit reply :)
 
Read the MAL into a data structure that supports keyed lookups, for example a hash table.

If you knew that all acronyms were in parens, then you could use a regular expression and then iterate through the match collection. But since you don't, you should probably just read the file into a string, use some string member function to split the string into an array of words, and then do a keyed lookup of each word for a match in your lookup table. Since 90% have parens, you should look for words surrounded by parens and strip them off before doing the lookup.
 
do you have an example of what the code would look like with a couple acronyms in a hashtable? And how it would interact w/ the document? I would be more than happy to send you some of the code I have but I would probably be embarrassed to post it.
 
Back
Top