Link to home
Start Free TrialLog in
Avatar of Fahdmurtaza
FahdmurtazaFlag for Pakistan

asked on

creating dictionary in c++

please,help me building a dictionary code in c++.where user can input data,and then search it .example user enter the word and gets its meaniing ,synonym,antonym
         thanks
ASKER CERTIFIED SOLUTION
Avatar of cybertopia
cybertopia

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There's millions of words that they could search for... are you really going to type them all in?

I doubt it.

I had to do something slightly similar.. where the user typed in an IP address (I used Java for this btw), and then my program would return the location of that IP (the country, sometimes the town, and sometimes the actual house number [for registered IPs]).
This was quite difficult.. What I done (successfully), was develop a custom bot, to search the official WHOIS search websites, such as RIPE, etc (dependant on the range of the IP), then it would parse the returned data, to extract the address/location.. This was very very tedious.. But a simple dictionary search would be pretty damn easy (if you were to use a similar method).

Best of luck,
>> IM
Avatar of mortar
mortar

Sorry to intrude but InteractiveMind, is there any chance you can share the code that you used to extract the information off of the WHOIS websites?  I can post a seperate question if necessary.
Couldnt you create a database and have a c++ GUI with interface that querrys the database each time an addition is made to check to see if that addition exists or not, if it does then to deny the entry because there is no point in storying the same word along with its defintion , etc more then once.

This way you can make a searchable dictionary which you can add to, update and or delete words if necessary :)
Hi Mortar,

I don't believe that I still have it, it was a project I done for someone quite a long time ago.. But I *might* have some of the API I created for it in my chunky, code library :)

>> IM
Probably the simpliest would be to create a database.

Word Table
Col1: ID
Col2: Word

WordDefLink Table  (Each word could have multple definitions)
Col1:ID
Col2:DefID

Defintion Table
Col1:DefID
Col2:Definition
Col3:Synonyms (delimited list of synonyms)
Col4:Antonyms (delimited list of antonyms)

WordSoundExLinkTable (each word could have multiple soundex keys)
Col1: WordID
Col2: SoundExID

SoundExKey Table  
Col1: SoundExID
Col2: SoundEx of Word

1) User enters a word, you look it up in word table.  Present all defintions related to word.  Include list of synonyms and antonyms.
2) If word is not found, do a soundex on the user's work, search the SoundExKey table for the values, link back to Word Table to list possible suggestions.  

Doesn't handle prefix and suffix (stemming) but it is a start.

You also may want to look a this link for some ideas.
http://wordweb.info/developer/
http://wordweb.info/developer/SQL.html
I am not really all that great when it comes to database's so I just wanted to say thank you to SCDMETA for ellaborting on my suggestion ! I hope this gives you a better idea with regards to the dictionary you are making or w/e.

Kind regards

Gecko