Program to translate a sentence , Programming Languages

a) Write a program i_language(Sentence,NewSentence) that translates a sentence to the i-language. In this language all vowels are changed to i and all other characters are kept in their original form. The program should keep upper case letters as well as lower case letters.

The vowels are a, e, i, o, u, y.

Ex:

?- i_language('I would like to go to cafe Italia!',NewSentence).

NewSentence = I wiild liki ti gi ti cifi Itilii!

b) The program implemented in a) should be utilised in the program read_translate. This program should use the built-in predicate read to get the sentence that should be translated and then present the new sentence using write. The program should read sentences until the user gives 'stop'. Follow the form of interaction given in the example.

?- read_translate.

Give a sentence, stop when finished.

|: 'In Paris you can find the Tour Eiffel. It is worth visiting!'.

In Piris yii cin find thi Tiir Iiffil. It is wirth visiting!

Give a sentence, stop when finished.

|: 'London has Big Ben.'.

Lindin his Big Bin.

Give a sentence, stop when finished.

|: stop.

yes

Posted Date: 2/28/2013 6:34:30 AM | Location : United States







Related Discussions:- Program to translate a sentence , Assignment Help, Ask Question on Program to translate a sentence , Get Answer, Expert's Help, Program to translate a sentence Discussions

Write discussion on Program to translate a sentence
Your posts are moderated
Related Questions
i need a coding to glow 8 LEDs on a port with pwm effect

Create the class Robot described in the Karel++ book. Description: The Robot class described in the Karel++ text is a derived class of ur_Robot. Create class Robot as a d

The schematic of the traffic light controller is as shown in figure 1. There are three control buttons on the panel: HAZ (Hazard), LT (Left) and RT (Right). Whenever, HAZ is clicke

Find out the selling cost average for packages developed in Pascal

Use an insertion sort to sort an array (sequence) of long word integers. The size of the list will appear just before the list itself. Use the same labels as in this example: LE

maake a programme in C of HR system

Problem Solving 1. Write Pascal code that accepts as input the names of the students, course work score and exam score for a unspecified number of students who have taken a subjec

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Write a function readPDBfile('filename') that will read the atoms for a protein stored in a PDB file, whose name is provided as an input to the function (note that this name should

1- Allocate array with 32bit 100 element 2- Prompt the user to enter the maximum or the upper bound of the random value 3- Read the value and use it generate random numbers to init