The BookBot is a simple Python script designed to analyze the text of a book. It can read the book text from a file, count the number of words, and create a frequency dictionary of all characters in the text.
- Read Book Text: Load and read the contents of a text file.
- Count Words: Calculate the total number of words in the book.
- Character Frequency Analysis: Generate a dictionary that maps each character to its frequency of appearance in the text.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need Python installed on your system. This code has been tested with Python 3.8, but it should work with any Python 3.x version.
Clone this repository to your local machine using:
git clone https://github.com/your-username/bookbot.gitUsage
To run the BookBot, navigate to the project directory and run:
python main.py
Make sure that the books directory contains a text file named frankenstein.txt, as the script expects this file by default.