[solved]-Write Simple Version Eliza Prolog Essentially Program Display Prompt Ready Accept Input Pr Q39078641
Write a simple version of Eliza in Prolog.Essentially, the program is to display a prompt that it is ready toaccept input. At the prompt the user should type in an Englishsentence as a list of Prolog atoms and your program should respondto this sentence with another English sentence derived from theoriginal user sentence. Here is what an example session with yourprogram might look like:
![?- interact. Ready> [you, are, a, computer). Eliza: i am not a computer Ready> [do, you, speak, russian]. Eliza: no, i speak](https://media.cheggcdn.com/media/bf7/s511x171/bf77b23b-57ec-4f06-9b3e-c82ec8a9e229/php6g3cti.png)
The following is an outline of the steps your programshould perform in an infinite interactive loop:
1. accept a sentence that is typed in by the user as a list,
2. change each ‘you’ in the sentence to ‘i’,
3. change each ‘i’ in the original sentence to ‘why do you’,
4. change each ‘are’ to ‘am not’,
5. change each ‘do’ to ‘no, ‘ (change to no with a comma and aspace after the word),
6. change ‘russian’ to ‘portugese’,
7. write out the changed sentence as a response to the user aswords separated by spaces (not a raw Prolog list).
a. Write a separate, recursive output predicate to do this (nobuilt-in predicates or libraries).
b. Capitalization and final punctuation (period, question mark)are not required.
?- interact. Ready> [you, are, a, computer). Eliza: i am not a computer Ready> [do, you, speak, russian]. Eliza: no, i speak portugese Ready> Show transcribed image text ?- interact. Ready> [you, are, a, computer). Eliza: i am not a computer Ready> [do, you, speak, russian]. Eliza: no, i speak portugese Ready>
Expert Answer
Answer to Write a simple version of Eliza in Prolog. Essentially, the program is to display a prompt that it is ready to accept in… . . .
OR

