This is a solution to a technical test, which involves building an application that reads and processes text from a provided stream in real-time. The application provides various statistics about the stream, including the total number of characters and words, the 5 largest and smallest words, the 10 most frequently appearing words, and a list of all characters with their frequencies.
- .NET version: 6.x
- Programming language: C#
- Referenced assemblies: RandomWords.dll, NLipsum.Core.dll
- Build and run the solution in Visual Studio Code without modifications
- Write unit tests using the MSTest testing framework
To run the application, follow these steps:
- Clone the repository.
- Open the solution in Visual Studio Code.
- Build the solution to restore dependencies and compile the code.
- Run the application.
- The application reads text from the provided stream in real-time.
- As the text is being processed, the following information is displayed:
- Total number of characters and words.
- The 5 largest words.
- The 5 smallest words.
- The 10 most frequently appearing words.
- A list of all characters and their frequencies.
- The application provides real-time updates as new text is read from the stream.
Unit tests have been implemented to ensure the correctness of the application's functionality. To run the tests:
- Clone the repository: https://github.com/Heshan-Qiu/WordStatsTest
- Open the test project in Visual Studio Code.
- Build the solution.
- Run the tests.
This solution demonstrates the ability to process a stream of text in real-time and generate statistics about the text. The code follows good coding practices and includes unit tests for robustness. Feel free to explore the code and make any enhancements or modifications as needed.
As an additional feature, I have also implemented two web pages using Angular and Vue to display the statistics generated by the application. Open your web browser and navigate to https://wordstatsfrontend.azurewebsites.net to view the Angular web page and https://wordstatsvuefrontend.azurewebsites.net/ to view the Vue web page.
For any questions or further assistance, please contact me at heshan.chiu@gmail.com.
Thank you for reviewing this solution!