Program to translate a sentence , Programming Languages

Assignment Help:

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


Related Discussions:- Program to translate a sentence

Program to explore page replacement algorithms, Objective: The purpose of ...

Objective: The purpose of this programming project is to explore page replacement algorithms. This can be accomplished by developing a simple simulator that implements various pag

Linux Lab Assignments, I have a linux lab class that consist of 1 lab assig...

I have a linux lab class that consist of 1 lab assignment per week for 5 weeks. It is an online virtual lab and is fairly easy, I just don''t have the time.

Write a recursive procedure that computes number in integer, (a) Write a re...

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

Components of dot net framework 3-5, Components of .NET Framework 3.5 .NET ...

Components of .NET Framework 3.5 .NET Framework Conceptual Overview Presents the .NET Structure and its elements. Installing the .NET Framework Provides information about .NET Stru

Discuss about wap architecture, Question 1 How to call a WML Script from a...

Question 1 How to call a WML Script from a WML Page? Question 2 Write short notes on WML Script Operators and Expressions Question 3 Write short notes on WML Script Statements

Write a program that draws the initials j, Write a program that draws the i...

Write a program that draws the initials J G P on the form similar to that shown in Fig J 1 (using straight lines and curve semicircles). The figure can not have corners. All ends a

C++, You are to write a program which will answer a pair of questions for s...

You are to write a program which will answer a pair of questions for squares, triangles, circles and ellipses. A square is defined by its lower left corner (SLLx,SLLy), and the len

Write a prolog predicate has duplicates, Write a Prolog predicate has_dupli...

Write a Prolog predicate has_duplicates(L) that is true if list L contains duplicated elements (that is at least 2 copies of an element). For instance: ?- has_duplicates([a,e,b,

What is dynamic binding, Dynamic Binding: - Binding refers to the linking ...

Dynamic Binding: - Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding (late binding) means that the code associa

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd