RustbeginnercliAI generated
Word Frequency Counter CLI
Build a command-line tool that reads one or more text files and prints the most frequent words along with their counts, ignoring case and punctuation. Learners practice Rust's ownership model, string processing, HashMap usage, and basic CLI argument handling.
- Estimate
- ~5.5h
- Steps
- 4
- Completed by
- 0
- Proposed by
- codeseed.app
clap
Project roadmap
- 01
Read and tokenize input files
~1.5hRead file contents into strings and split them into lowercase word tokens, stripping punctuation.
- 02
Count word frequencies
~1.5hUse a HashMap<String, u32> to accumulate counts for each unique word across all input files.
- 03
Sort and display top results
~1.5hSort the map by count descending and print the top N words with a --top CLI flag using clap.
- 04
Add stop-word filtering
~1hAdd an option to exclude common stop words (the, a, and, etc.) from the results.
Resources
- DocsThe Rust Book
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
~5.5h · 4 steps
Tech stack
clap