VerbaNet is a sophisticated text-to-text enhancement tool that leverages Large Language Models (LLMs) to provide Grammarly-like functionality with advanced tone customization, auto-inclusion, and auto-writing capabilities. Built with C++ for system-level integration and Python for LLM processing, VerbaNet runs as a taskbar application with toggle-based control, offering seamless text improvement across applications.
VerbaNet enhances text in real-time by analyzing and refining grammar, style, and tone based on user preferences. It supports multiple tones (e.g., formal, casual, professional), auto-includes suggestions in active text fields, and features an auto-writer mode for generating context-aware text. The application integrates with the system via a taskbar toggle, making it easy to enable or disable features.
- LLM-Powered Text Enhancement: Utilizes an LLM (via
search_engine.py) for grammar correction, style improvement, and tone adjustment. - Tone Customization: Supports multiple tones, adapting text to match user-defined styles (e.g., formal, conversational).
- Auto-Inclusion: Automatically inserts suggestions into active text fields across applications.
- Auto-Writer Mode: Generates context-aware text snippets based on user input and history.
- Taskbar Integration: Provides a system tray icon for toggling features on/off.
- Cross-Platform Support: Built with C++ for system hooks and Python for LLM processing.
- Python 3.8 or higher
- C++17-compatible compiler (e.g., MSVC, GCC)
- CMake 3.10 or higher
- LLM API key (e.g., Cohere or similar; configure in
config.json) - Windows (for system hooks; Linux support in progress)
-
Clone the Repository
git clone https://github.com/nithin434/VerbaNet.git cd VerbaNet -
Create a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Python Dependencies
pip install -r requirements.txt
-
Configure LLM API Key
- Obtain an API key from your LLM provider (e.g., Cohere.ai).
- Update
config.jsonin the project root:{ "llm_api_key": "your_llm_api_key", "tone": "default", "auto_include": true, "auto_writer": false }
-
Build C++ Components
mkdir build cd build cmake .. cmake --build . --config Release
To remove an existing build:
rmdir /s /q build # On Windows rm -rf build # On Linux
-
Verify Setup
python src/check_setup.py
Start the application:
python src/main.pyThe taskbar icon (assistant_icon.ico) will appear, allowing you to toggle VerbaNet’s features (e.g., auto-inclusion, auto-writer mode).
VerbaNet/
├── CMakeLists.txt # CMake build configuration
├── LICENSE.md # Apache 2.0 license
├── config.json # Configuration for LLM and features
├── assistant_icon.ico # Taskbar icon
├── src/
│ ├── llm/
│ │ └── search_engine.py # LLM integration for text processing
│ ├── native/
│ │ ├── keyboard_hook.cpp # System keyboard hooks
│ │ ├── keyboard_hook.h # Header for hooks
│ │ └── keyboard_hook.dll # Compiled DLL for hooks
│ ├── system_hooks/
│ │ ├── keyboard_hook.cpp # System hook implementation
│ │ ├── keyboard_hook.h # Header for hooks
│ │ └── keyboard_hook.dll # Compiled DLL for hooks
│ ├── ui/
│ │ ├── overlay_window.cpp # UI for overlay suggestions
│ │ └── overlay_window.h # Header for overlay UI
│ ├── check_setup.py # Setup verification script
│ ├── main.py # Main application script
│ ├── auto_toggle.py # Taskbar toggle logic
│ ├── deploy.py # Deployment script
│ ├── test_components.py # Component testing script
│ └── config.json # Local configuration
-
Taskbar Toggle
- Launch
main.pyto start VerbaNet. - Right-click the taskbar icon to toggle auto-inclusion or auto-writer mode.
- Configure tone settings in
config.json(e.g.,"tone": "formal").
- Launch
-
Auto-Inclusion
- When enabled, VerbaNet monitors text input in active applications.
- Suggestions (grammar, style, tone) are automatically inserted into text fields.
-
Auto-Writer Mode
- Enable in
config.json("auto_writer": true). - VerbaNet generates context-aware text based on the current input and history.
- Use the overlay UI (
overlay_window.cpp) to preview suggestions.
- Enable in
-
Testing Components
python src/test_components.py
- Tone Settings: Modify
"tone"inconfig.json(e.g.,formal,casual,professional). - Feature Toggles: Enable/disable
auto_includeandauto_writerinconfig.json. - LLM Configuration: Adjust API parameters in
src/llm/search_engine.pyfor custom behavior. - System Hooks: Customize
keyboard_hook.cppfor specific input monitoring needs.
- Text Enhancement: Corrects grammar, improves clarity, and adjusts tone using LLM analysis.
- Tone Customization: Adapts text to user-specified tones based on LLM processing.
- Auto-Inclusion: Seamlessly integrates suggestions into active text fields via system hooks.
- Auto-Writer Mode: Generates contextually relevant text snippets for emails, documents, or chats.
- Taskbar Control: Provides a lightweight UI for enabling/disabling features.
- LLM API Error: Verify
llm_api_keyinconfig.jsonand check API quotas. - Keyboard Hook Failure: Ensure
keyboard_hook.dllis correctly compiled and placed inbuild/Release. - Overlay UI Issues: Check
overlay_window.cppcompilation and system permissions. - Setup Issues: Run
src/check_setup.pyto diagnose configuration problems.
- Update
llm_api_keyinconfig.jsonwith a production-ready key. - Compile C++ components in Release mode (
cmake --build . --config Release). - Secure
config.jsonto prevent API key exposure. - Test system hooks on the target platform.
- Configure logging for production monitoring.
docker build -t VerbaNet .
docker run -p 5000:5000 --env-file .env VerbaNetContributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
We invite collaborations from developers and AI researchers to enhance VerbaNet’s capabilities.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
- Email: nithinjambula89@gmail.com
- LinkedIn: Nithin Jambula
- X: @nitn434
- Issues: GitHub Issues
- Website: VerbaNet.dev
- Text Enhancement
- Large Language Models
- Grammarly Alternative
- C++
- Python
- System Tray
- Tone Customization
- Auto-Writing