Translator

xzen123

New member
Joined
Jun 3, 2009
Messages
1
Programming Experience
Beginner
Im trying to create a program that translates english to another language. i have no clue how to begin doing this, i have the program designed and all of the buttons besides the "Translate" button coded...it has 2 radio button to choose which way you are translating, (English to german, or German to english) the input is a textbox, and the output is a label, if anyone could give me some help, or maybe even point me in the right direction it would be greatly appreciated. and its going to be nothing more than a "replace this word with that word" kind of program. Im also going to connect to a database where the list of words will be held.
 
..

If it was me, i would make lots, and lots, and lots of if statements eg:
VB.NET:
If EnglishText = "Hello" Then
GermanText = "Guten Morgen"
End If

Etc. Im sure theres a way to do it with a database though.
 
If you are considering translating sentences then this is not going to be an easy problem to solve. Although you could just limit the program to phrases that have been preloaded to your database.

If you want something more dynamic ...

Firstly, as you suggest there will be a database of words which will give you the foreign equivalent of a word and vice versa.

But there are all sorts of other grammatical problems to solve, such as conjugating verbs or selecting the correct case (e.g. genitive etc).

Your program will have to be able to get back to the root words, perform its lookup to find the foreign roots and then apply the correct grammatical rules.

To do that your program will need to be able to recognise nouns and verbs etc, in a sentence, so I would start there. Write a program that will analyse a sentence and pick out the nouns, verbs and subject. Your word dictionary will not only have a mapping of words between languages but each word will have a type such as noun or verb etc.

I don't know to much about German, but even with identifying nouns and verbs you are going to have some problems with English. For example when is the word "play" a verb or a noun? Here is something I dug up on the net:

[ame="http://www.scribd.com/doc/3271104/150-Words-Which-Are-Both-Verbs-and-Nouns"]150 Words Which Are Both Verbs and Nouns@@AMEPARAM@@/docinfo/3271104?access_key=key-1wsohl1bs98gvkb9lz8a@@AMEPARAM@@3271104@@AMEPARAM@@key-1wsohl1bs98gvkb9lz8a[/ame]

Good luck - you've set yourself a really challenging but interesting problem.
 
Back
Top