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
Your solution to the problem should be housed within a while loop, which allows the grader to test your solution repeatedly without having to re-execute the script, as shown in cla

how do i make a bomber game using pascal on a software called lazuras


Write a program that repeatedly prompts for and reads a positive integer value n and then calculates and displays the nth Fibonacci number

Exception handling Exception handling is a mechanism that separates code that detects and handles exceptional circumstances from the rest of your program. Note that an exceptional

In this section we need to take a brief look at systems of differential equations which are larger than 2 x 2. The problem now is not like the first few sections where we looked at

The aims of this assignment are to:    Provide experience in the use of a modern Integrated Development Environment (specifically NetBeans running on a Linux platform) for t

Example problem Imagine that  you  require  to create  a robot  that  will  roll up  close to a light  lamp  and  stop  a fixed distance from it.  The first question is, how w

If it is a weekday and it is not a holiday, then you go to work. However, if it is a weekday and it is a holiday, then what you do depends on the weather. If it is raining, you pla

Educational Objectives: After completing this assignment, the student should be able to accomplish the following: Apply generic algorithms in solving programming problems Define an