Skip to content

A C# console app that uses a Binary Search Tree to analyse text files for word frequency, longest word, and line numbers.

License

Notifications You must be signed in to change notification settings

Bhargavv1/Text-Analysis-Tool-in-C-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

A C# console app that uses a Binary Search Tree to analyse text files for word frequency, longest word, and line numbers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages