Jump to content

Making Dictionary With Javascript


mostafatalebi

Recommended Posts

Hello everybody

I am creating a translation-service website, and I want to know how theoretically I can make an online dictionary. I mean using javascript I make a medical-dictionary or something else. Can anyone give me a general process of how to make a dictionary online using javascript?

Link to comment
https://forums.phpfreaks.com/topic/270493-making-dictionary-with-javascript/
Share on other sites

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.

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.

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.