Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


ELIZA Chatbot C

A terminal-based chatbot inspired by the classic ELIZA program written in C.
Developed for the Programming course of the LEEC degree at Instituto Superior Técnico.

Explore the project »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Project Context
  5. Contributors

About The Project

This repository contains a chatbot inspired by the classic ELIZA program, one of the earliest natural language processing systems.

The chatbot uses pattern matching and keyword recognition techniques to simulate conversations with the user through a terminal interface.

Features included in the project:

  • Interactive command-line interface
  • Keyword-based response generation
  • Rule-based conversational logic
  • Modular C code structure

The project was developed with a focus on practicing fundamental programming concepts such as:

  • Dynamic memory management
  • String manipulation
  • Modular software design
  • File organization and compilation workflows

(back to top)

Built With

  • C90
  • GCC
  • Makefile

(back to top)

Getting Started

Compilation

Using GCC:

gcc *.c -o eliza

Or using the Makefile:

make

Running the Program

./eliza

Arguments

Mostra esta ajuda e termina // Shows this help and exits

-h            

Ficheiro com base de dados de respostas (por omissao: eliza.dat) // Sets the question/answer database, uses eliza.dat by default

  -f filename   

Ficheiro de entrada (por omissao: stdin) // Sets input file, by default uses stdin

  -i filename   

Ficheiro de saida (por omissao: stdout) // Sets output file, by default uses stdout

  -o filename   

Ficheiro de log do input e output // Sets the log file for input/output

  -l filename   

Usar regras de portugues em vez de ingles // Uses portuguese conjugation rules

  -p            

(back to top)

Usage

After launching the program, the chatbot will prompt the user for input through the terminal.

Example interaction:

ELIZA: HI!  I'M ELIZA.  LET'S TALK.  TYPE `BYE' TO END THIS SESSION.
You: Hi

ELIZA: HOW DO YOU DO. PLEASE STATE YOUR PROBLEM.
You: Why are you screaming ?

ELIZA: WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM SCREAMING?
You: I am scared
...

(back to top)

Project Context

This project was developed for the Programming course of the Electrical and Computer Engineering degree (LEEC) at Instituto Superior Técnico during the 2025/2026 academic year.

The objective of the assignment was to implement a chatbot similar to the original ELIZA system while applying the programming concepts taught throughout the course.

The source code contains informal comments and internal jokes written during development. These do not affect functionality and were kept to preserve the development process and collaboration context.

Due to the academic nature of this project, all comments are written in Portuguese

(back to top)

Contributors

Developed collaboratively by:

(back to top)

License

This project was developed for academic purposes as part of a university course and is not intended for reuse, distribution, or modification.

(back to top)

About

Eliza inspired chatbot written in C for the Programming course project in LEEC25/26 IST

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages