This repository contains a Trigrams Notebook and an ELIZA Chatbot.
The Trigrams Notebook demonstrates a third-order letter approximation model based on trigrams. It analyzes English texts sourced from Project Gutenberg. Trigrams are sequences of three consecutive characters and are used to predict text by modeling character relationships.
- Clone this repository.
- Open the repository in Visual Studio Code (or your preferred IDE).
- Open trigrams.ipynb.
- Click the button, "run all", to run trigrams.ipynb.
- Builds a trigram model for character-level prediction.
- Processes English text to generate probabilistic character sequences.
References
- Python Regex Library Docs: https://docs.python.org/3/library/re.html
- Remove blank lines: https://www.digitalocean.com/community/tutorials/python-remove-spaces-from-string
- String Methods( .upper() & .strip() ): https://docs.python.org/3/library/stdtypes.html#string-methods
- OS Module: https://docs.python.org/3/library/os.html
- Random.choice: https://docs.python.org/3/library/random.html#random.choices
- Splitting the text: https://docs.python.org/3/library/stdtypes.html#str.split
- JSON Dump: https://www.geeksforgeeks.org/json-dump-in-python/
- Project Gutenberg: https://www.britannica.com/topic/Project-Gutenberg
- Trigrams: https://www.dictionary.com/browse/trigram
My own version of the Eliza chatbot, built with JavaScript, HTML and CSS and deployed to GitHub pages.
The Eliza chatbot takes in user input and responds with an appropriate message.
- User input reflection for a natural conversational experience.
- Randomized responses for variety.
- Deployed and accessible online.
- Access the Eliza Chatbot on GitHub Pages: https://cormacm22.github.io/EmergingTechnologies/
- Type your message in the input box and press Enter.
- Engage in a conversation with ELIZA!
References
- Eliza - https://web.njit.edu/~ronkowit/eliza.html
- Regex - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
- Math.random() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
- Responses - https://github.com/ianmcloughlin/2425_emerging_technologies/blob/main/03_eliza.ipynb
- CSS / HTML - https://chatgpt.com