Skip to main content
Ink Logo
@impulsedev/ink is a specialized library designed to recognize handwritten digits and mathematical operators directly in the browser. It features a unique client-side auto-training capability, allowing it to adapt and learn without heavy server-side models.

Key Features

  • Math Recognition: accurate detection of digits (0-9) and operators (+, -, *, /, =).
  • Auto-Training: The library can train its own lightweight CNN model in the browser using bundled sample data. Zero server configuration required.
  • Expression Evaluation: Automatically parses recognized characters into valid mathematical expressions and calculates the result.
  • Stroke Management: Built-in tools for capturing, storing, and manipulating handwriting strokes.
  • TypeScript Support: Fully typed for a robust development experience.

Installation

Install the package via npm:

Quick Start

Here is a minimal example to initialize the library and recognize a simple drawing.