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.


?- 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.


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 want another php script like that one in assignment: EM201484 SA727PHP i want to parse out an urls form log file i will post attachments for a demo

The last matrix operation which we'll see is matrix multiplication. Now there we will start along with two matrices, A nxp and B pxm . Remember hat A must have similar number of c

Write a script called 'prob1.m' that solves for the variables y, and z in terms of a user inputed x. The variables y and z are defined as follows: y = x - 30                when

Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system

I need help with some simple matlab statements

Support for Multi-Targeting The multi-targeting function of Vision Facilities allows you specify the particular edition or account of the .NET Structure that is required for your p

i want to record in database but how to delete only duplicate field not row in vb 6.0 or ms-access

Question 1 Discuss on UNIX kernel components 2 Explain process creation and process termination 3 When do a Deadlock occur? What are the Necessary Conditions for Deadlock

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following i

Expertsmind brings you unique solution in java assignments Exception Handling An exception is an issue that appears during the performance of an application. An exception