Jump to content

Making Dictionary With Javascript


mostafatalebi

Recommended Posts

no it is probably a script to be installed on my Host, then provide an authentication just like any website, and the user login into my site and searches for his word. It is server-side. The user who is employed as a translator in my website, and then has access to an area called "Get Help from Dictionary", then he enters and searches for his vocab.

Link to comment
Share on other sites

There are plenty of tutorials around in regards to searching a database using libraries such as mongoose for node etc. Where exactly are you stuck? OD you have your database of data? I would start there. Once you have the actual data, only then can you look at how to best access it. It shouldn't be difficult tat all once you have the actual data.

Link to comment
Share on other sites

let me provide you with an example then see is it a good solution:

 

I have a database which consists of two columns: "Word" "definition"

Then the user searches a word called "Pixel", what happen is that my dictionary goes through the table and searches for that specific word: "SELECT definistion FROM dictionary WHERE word='Pixel'"

 

Is it logical?

Link to comment
Share on other sites

Well, you need to remember that words can have multiple definitions. Also, you probably want to add pronunciation, maybe the type .. like noun verb etc depending on each definition, and maybe even an example of how it's used. This is all stuff you can rip from somewhere.

 

An easier way is probably to find an API you can use because it's much easier than trying to create your own dictionary.

 

On a side note. If you continue and need to add more definitions to a word, I would use one table for the word and an ID, then another for the definition, pronunciation, usage, etc. That way you can link them by the ID of the word and won't have any problems adding more or removing any at any time.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.