From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6e272adfef17f353 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-07 09:31:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Reply-To: "James S. Rogers" From: "James S. Rogers" Newsgroups: comp.lang.ada References: <3E43DF55.DC92A8E8@bton.ac.uk> Subject: Re: Hi, I'm new to ADA X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Fri, 07 Feb 2003 17:31:25 GMT NNTP-Posting-Host: 12.86.37.168 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1044639085 12.86.37.168 (Fri, 07 Feb 2003 17:31:25 GMT) NNTP-Posting-Date: Fri, 07 Feb 2003 17:31:25 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:33885 Date: 2003-02-07T17:31:25+00:00 List-Id: "Paul Gregory" wrote in message news:3E43DF55.DC92A8E8@bton.ac.uk... > I'm a complete novice as all you guys once were in terms of ADA and I've > > been given a small school project to do. I'm sure as a novice you > experienced many frustrations and difficulties along the way ! > > As you people are probably the best people to ask I was wondering if any > of you could give me any tips as to how > to go about the following: > > --------------------------------------------------------- > --------------------------------------------------------- > The task > > You are invited to design and implement a translation program which will > > take an English sentence and translate it into French (and optionally > translate from French > to English). > > Your program will use a simple dictionary containing the following > words: > > English > French > big > grand > black > noir > cat > chat > dog > chien > is > est > small > petit > the > le > white > blanc > > > Example 1 > > Do you wish to add words to the dictionary?: N > > Please enter a sentence: > The cat is white. > > The French translation of your sentence is: > Le chat est blanc. > > Example 2 > > Do you wish to add words to the dictionary?: N > > Please enter a sentence: > The cat is dead. > > I cannot translate that sentence. > > Example 3 > > Do you wish to add words to the dictionary?: Y > English word: horse > Equivalent French word: cheval > > Do you wish to add more words?: N > > Please enter a sentence: > Le cheval est grand. > > The English translation of your sentence is: > The horse is big. > > -------------------------------------------------------------------------- -- > > ---------------------------------------- > I know you all have far more important things to be getting on with but > any > advice would be brilliant ! It appears from your description that you are translating the words, not the entire language syntax. This can be important to because it helps define the complexity of your assignment. A translation of words only will involve a simple look-up and substitution of words. A translation of syntax will account for different word order, or contextual evaluation of phrases which lead to different idiomatic expressions. You need to think about how to design a two-way look up table of words. You also need to think about how you will identify the language of the input sentence so that you will perform the correct translation. This can be complicated by the fact that English contains some French words, and modern French contains some English words. Jim Rogers