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
How do you get the complexity of an algorithm? What is the relation b/w the time & space complexities of an algorithm? Justify your answer with an example.

Write a Program to Show Twenty Ellipses 1. Write a program to show twenty ellipses which move away from the mouse pointer. Their initial locations should be random.

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

Write a function drawCA(aname, coords) that uses the plot3 command to draw the C α backbone of the protein. When calling this function, you should pass in the aname and coords var

This assignment begins software tools and techniques for structuring complex programs. Use it to become familiar with these facilities, and ensure you use the speci?ed concepts in

asample database report

Vacation Envy - Travel and Photo Sharing Website Site Overview- Vacation Envy is a travel as well as photo-sharing site. Make your travel map, share photos and show off al

(a) Define a procedure (subsets x) that takes a list as a single argument and returns all 2^n subsets of that list, i.e. the power set of the list; e.g. (subsets '(a b c)) ==> (

Write a program that will input two numbers from the keyboard and execute each of the signed and unsigned multiply and divide instructions.  For each instruction, the program shoul

How to build one dimensional list from string and build string from a list? Suppose input string is: STACKOVERFLOW then the output list should be outputList = [S,T,A,C,K,O,V,E,R,F