https://github.com/bhargavv1/text-analysis-tool-in-c-
A C# console app that uses a Binary Search Tree to analyse text files for word frequency, longest word, and line numbers.
https://github.com/bhargavv1/text-analysis-tool-in-c-
binary-search-tree console-app csharp data-structures-algorithms text-analysis
Last synced: 4 months ago
JSON representation
A C# console app that uses a Binary Search Tree to analyse text files for word frequency, longest word, and line numbers.
- Host: GitHub
- URL: https://github.com/bhargavv1/text-analysis-tool-in-c-
- Owner: Bhargavv1
- License: other
- Created: 2025-07-03T12:46:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-07-03T12:47:35.000Z (4 months ago)
- Last Synced: 2025-07-03T13:53:40.600Z (4 months ago)
- Topics: binary-search-tree, console-app, csharp, data-structures-algorithms, text-analysis
- Language: C#
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Text Analysis Tool in C#
A console-based application that analyses a `.txt` file, extracts word frequencies, tracks line numbers, and stores the results in a Binary Search Tree (BST). Ideal for demonstrating data structure design and algorithm complexity.
## 🔍 Features
- Store all unique words using a custom `BinaryTree`
- Display:
- Total unique word count
- Most frequent word
- Longest word
- Line numbers for a given word
- Words in alphabetical or original order
- BST implementation with `BinaryTreeNode.cs` and `BinaryTree.cs`
- Efficient search, insertion, and in-order traversal
## 📁 File Structure
- `Program.cs`: Main logic
- `BinaryTree.cs`: Tree operations
- `BinaryTreeNode.cs`: Node structure
- `.sln` and `.csproj`: Project files
## 🔧 How to Run
1. Open in **Visual Studio** or **Rider**
2. Build and run the `TextAnalysisTool` project
3. When prompted, enter the path to a `.txt` file
> ⚠️ This tool does **not** include the Moby Dick text file. Use any `.txt` file for analysis.
## 🧠 Data Structures
- Uses a **Binary Search Tree (BST)** for dynamic insertion and ordered retrieval
- Compared against Dictionary and LinkedList in the project report
## 📜 License
MIT
## 👤 Author
Bhargav Vaidya – MSc Data Science