Skip to content

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-b

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.md
Notifications You must be signed in to change notification settings

nithin434/VerbaNet

Repository files navigation

VerbaNet: LLM-Powered Text Enhancement Tool

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.

Overview

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.

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.

Prerequisites

  • 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)

Installation

  1. Clone the Repository

    git clone https://github.com/nithin434/VerbaNet.git
    cd VerbaNet
  2. Create a Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Python Dependencies

    pip install -r requirements.txt
  4. Configure LLM API Key

    • Obtain an API key from your LLM provider (e.g., Cohere.ai).
    • Update config.json in the project root:
      {
        "llm_api_key": "your_llm_api_key",
        "tone": "default",
        "auto_include": true,
        "auto_writer": false
      }
  5. 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
  6. Verify Setup

    python src/check_setup.py

Running the Application

Start the application:

python src/main.py

The taskbar icon (assistant_icon.ico) will appear, allowing you to toggle VerbaNet’s features (e.g., auto-inclusion, auto-writer mode).

Project Structure

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

Usage Guide

  1. Taskbar Toggle

    • Launch main.py to 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").
  2. Auto-Inclusion

    • When enabled, VerbaNet monitors text input in active applications.
    • Suggestions (grammar, style, tone) are automatically inserted into text fields.
  3. 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.
  4. Testing Components

    python src/test_components.py

Configuration Options

  • Tone Settings: Modify "tone" in config.json (e.g., formal, casual, professional).
  • Feature Toggles: Enable/disable auto_include and auto_writer in config.json.
  • LLM Configuration: Adjust API parameters in src/llm/search_engine.py for custom behavior.
  • System Hooks: Customize keyboard_hook.cpp for specific input monitoring needs.

Features in Detail

  • 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.

Troubleshooting

  • LLM API Error: Verify llm_api_key in config.json and check API quotas.
  • Keyboard Hook Failure: Ensure keyboard_hook.dll is correctly compiled and placed in build/Release.
  • Overlay UI Issues: Check overlay_window.cpp compilation and system permissions.
  • Setup Issues: Run src/check_setup.py to diagnose configuration problems.

Deployment

Deployment Checklist

  • Update llm_api_key in config.json with a production-ready key.
  • Compile C++ components in Release mode (cmake --build . --config Release).
  • Secure config.json to prevent API key exposure.
  • Test system hooks on the target platform.
  • Configure logging for production monitoring.

Docker Deployment

docker build -t VerbaNet .
docker run -p 5000:5000 --env-file .env VerbaNet

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

We invite collaborations from developers and AI researchers to enhance VerbaNet’s capabilities.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Contact

Tags

  • Text Enhancement
  • Large Language Models
  • Grammarly Alternative
  • C++
  • Python
  • System Tray
  • Tone Customization
  • Auto-Writing

About

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-b

Topics

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published