Thread: translation code

  1. #1
    Registered User
    Join Date
    Jul 2009

    Unhappy translation code

    actually i need to program a translation system for malay-english texts using c++.

    i am still new with u have any suggestion about any suitable book for me to focus only on translation words.

    i have try to translate syntax to syntax but i do not know how i can modify the code so that it can translate all string enter by user?

    plz help me.....

  2. #2
    a newbie :p
    Join Date
    Aug 2008
    Zurich, Switzerland, Switzerland
    i think it is not that easy...
    it is called machine translation and it has been topic of research for many scientists...
    try googling: "machine translation algorithm"
    yo might need to read some scientific paper on this topic...

  3. #3
    Registered User
    Join Date
    Jul 2009

    thank a lot auralius

    thank 4 your feedback....
    act this is my coding to translate a syntax but i don't know how to translate multiple words ....for example if I translate a syntax "saya" it will produce an english syntax "I"..but how if I want to translate " saya suka" mean " I like".....

    anybody know????

    #include <iostream>
    #include <cstdio>
    using namespace std;
    int main() {
    int i;
    char str[80];
    char numbers[10][80]= {
    "saya", "i",
    "suka", "like",
    "makan", "eat",
    "nasi", "rice",
    "ayam", "chicken" };
    cout<<"Enter Malay word to translate: \n";
    cout<<"============================== \n\n";
    for (i=0; i<10; i+=2)
        if(!strcmp(str, numbers[i])) 
    	cout<< "English word is : \n"<<"================================\n\n\n"<<"\t"<<numbers[i+1]<<"\n\n\n\n\n\n\n\n";
    if(i==10) cout<< "Not found\n\n\n\n\n\n\n\n";
    return 0;

  4. #4
    a newbie :p
    Join Date
    Aug 2008
    Zurich, Switzerland, Switzerland
    i see...
    you want to do the translation by letters...

    first you need to parse the input first...
    let say the user input "saya suka"

    parse the input based on the white space...
    put into buffer and then compare it to your dictionary...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  3. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  4. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

Tags for this Thread