Text Analyzer
Phase 1 - Basic text statistics
Create a Python script that reads a text file and computes the number of words and sentences, as well as identifies unique phone numbers and CNPs.
- Input a text file
- Count total words and sentences
- Detect unique phone numbers (starting with 07) and CNPs
Functional result: Script displays correct word and sentence counts and lists unique phone numbers and CNPs found.
Phase 2 - Letter frequency analysis
Extend the script to compute case-insensitive letter statistics and the percentage of each letter relative to the total letters in the text.
- Count occurrences of each letter (ignore case)
- Calculate the percentage of each letter in total letters
- Display the results alongside previously computed statistics
Functional result: Script outputs a frequency table of letters with counts and percentages, together with word, sentence, phone, and CNP statistics.