From 083a7a1f6b85d98486c7e18fcb193992f6a33f68 Mon Sep 17 00:00:00 2001 From: Eyshila Ivanha Date: Wed, 5 Nov 2025 20:28:04 -0300 Subject: [PATCH 1/2] Added Text Analyzer mini project --- Number-Guess/TextAnalyzer/README.md | 0 Number-Guess/TextAnalyzer/Text.py | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Number-Guess/TextAnalyzer/README.md create mode 100644 Number-Guess/TextAnalyzer/Text.py diff --git a/Number-Guess/TextAnalyzer/README.md b/Number-Guess/TextAnalyzer/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Number-Guess/TextAnalyzer/Text.py b/Number-Guess/TextAnalyzer/Text.py new file mode 100644 index 0000000..6095274 --- /dev/null +++ b/Number-Guess/TextAnalyzer/Text.py @@ -0,0 +1,23 @@ +from collections import Counter + +def analyze_text(text): + words = text.split() + total_words = len(words) + total_chars = len(text) + total_no_spaces = len(text.replace(" ", "")) + + most_common_word = Counter(words).most_common(1)[0] + + print("\nšŸ“Š Text Analysis Results:") + print(f"āž”ļø Total words: {total_words}") + print(f"āž”ļø Total characters (with spaces): {total_chars}") + print(f"āž”ļø Total characters (without spaces): {total_no_spaces}") + print(f"āž”ļø Most used word: '{most_common_word[0]}' ({most_common_word[1]}x)") + +def main(): + print("🧠 Text Analyzer — Python Project") + text = input("Enter or paste the text you want to analyze:\n\n") + analyze_text(text) + +if __name__ == "__main__": + main() From 74745074146a98ab43081e015f92314804ff35dc Mon Sep 17 00:00:00 2001 From: EyshilaIvanha Date: Thu, 6 Nov 2025 08:41:22 -0300 Subject: [PATCH 2/2] Atualizar o README.md --- Number-Guess/TextAnalyzer/README.md | 99 +++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/Number-Guess/TextAnalyzer/README.md b/Number-Guess/TextAnalyzer/README.md index e69de29..138dde4 100644 --- a/Number-Guess/TextAnalyzer/README.md +++ b/Number-Guess/TextAnalyzer/README.md @@ -0,0 +1,99 @@ +🧠 Text Analyzer — Python Project + +A simple and efficient text analyzer in Python that calculates basic statistics from user-provided text, such as total words, characters, and the most frequently used word. + + +--- + +šŸš€ Features + +Counts the total number of words + +Counts total characters, both with and without spaces + +Identifies the most used word in the text + +Displays results clearly in the terminal + + + +--- + +🧩 Technologies Used + +Python 3 + +Standard library collections (Counter) + + + +--- + +šŸ“¦ Installation + +1. Clone this repository: + +git clone https://github.com/sheylaghost/text-analyzer.git + + +2. Navigate to the project directory: + +cd text-analyzer + + +3. Run the script: + +python main.py + + + + +--- + +🧠 How to Use + +1. Run the program in your terminal. + + +2. Enter or paste any text when prompted. + + +3. View the automatically generated analysis. + + + +Example: + +🧠 Text Analyzer — Python Project +Enter or paste the text you want to analyze: + +Python is amazing. Python is powerful. + +šŸ“Š Text Analysis Results: +āž”ļø Total words: 5 +āž”ļø Total characters (with spaces): 39 +āž”ļø Total characters (without spaces): 34 +āž”ļø Most used word: 'Python' (2x) + + +--- + +šŸ’” Possible Future Improvements + +Make the word count case-insensitive + +Remove punctuation before counting + +Calculate the number of unique words + +Export results to a .txt or .json file + + + +--- + +šŸ§‘ā€šŸ’» Author + +Eyshila Ivanha de Brito +Created as a Python learning exercise and open-source contribution. +šŸ’¬ Feel free to open issues or suggest improvements! \ No newline at end of file