AI Grammar Correction and Spell Check in C# for .NET Applications
🎯 Purpose of the Sample
The Text Corrector Demo showcases how to utilize the LM-Kit.NET SDK for text correction tasks. This sample demonstrates the integration of large language models (LLMs) into a .NET application to correct grammatical errors, spelling mistakes, and other textual inaccuracies. It highlights the power and efficiency of advanced AI models in enhancing text quality.
👥 Industry Target Audience
This sample is particularly beneficial for developers and organizations in the following sectors:
- 📝 Content Creation: Automatically correct and enhance the quality of articles, blogs, and other written content.
- 🏫 Education: Assist students and educators by providing tools for improving writing skills and ensuring grammatical accuracy.
- 📚 Publishing: Streamline the editing process by quickly identifying and correcting textual errors.
- 📞 Customer Support: Enhance the quality of written communications in customer interactions.
🚀 Problem Solved
Manual text correction is time-consuming and prone to inconsistencies. The Text Corrector Demo addresses this problem by leveraging LLMs to automate the text correction process, ensuring consistent and accurate results. This automation improves productivity and the quality of written content.
💻 Sample Application Description
The Text Corrector Demo is a console application that allows users to correct text using various AI models.
✨ Key Features
- 📈 Model Selection: Users can choose from predefined models or provide a custom model URI.
- 📊 Progress Tracking: The application displays download and loading progress for the selected model.
- 🔄 Dynamic Text Correction: The application corrects user-provided text and displays the enhanced version.
- 📈 Performance Metrics: Displays progress and status of the text correction process.
🧠 Supported Models
The sample supports several state-of-the-art models:
- Mistral Nemo 2407 12.2B
- Meta Llama 3.1 8B
- Google Gemma2 9B Medium
- Microsoft Phi-3 3.82B Mini
- Alibaba Qwen-2 7.6B
🛠️ Getting Started
📋 Prerequisites
- .NET Framework 4.6.2 or .NET 6.0
📥 Download the Project
▶️ Running the Application
📂 Clone the repository:
git clone https://github.com/LM-Kit/lm-kit-net-samples.git
📁 Navigate to the project directory:
cd lm-kit-net-samples/console_framework_4.62/text_corrector
or
cd lm-kit-net-samples/console_net6/text_corrector
🔨 Build and run the application:
dotnet build dotnet run
📝 Follow the on-screen prompts to select a model and start correcting text.
💡 Example Usage
- Select a Model: Choose from the available models or enter a custom model URI.
- Enter Text for Correction: Provide the text you want to be corrected.
- Receive Corrected Text: The application will process the text and display the corrected version.
- Continue or Exit: Enter another text for correction or end the program by submitting an empty input.
By following these steps, developers can explore the functionalities of LM-Kit.NET and integrate advanced text correction capabilities into their applications, enhancing the quality of written content through automated, AI-driven correction processes.