eliza_chat 1.0.1 eliza_chat: ^1.0.1 copied to clipboard
A Dart version of the classic Eliza chatbot. Eliza chat is a dart implementation of the ELIZA chatbot designed by Joseph Weizenbaum, in the sixties. ELIZA was one of the first chatbots that ever existed.
example/eliza_chat_example.dart
import 'dart:io';
import 'package:eliza_chat/eliza_chat.dart';
void main() {
var eliza = Eliza();
print(eliza.getHeader());
print(eliza.getInitial());
while (true) {
stdout.write("You: ");
var input = stdin.readLineSync();
if (input == null) {
break;
}
var output = eliza.processInput(input);
if (output == null) {
break;
}
print("Eliza: $output");
}
print(eliza.getFinal());
}