An open API service indexing awesome lists of open source software.

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.

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