Toolbox-XToolbox-X

Manage Verb Forms

Shared pre-configured instance of the Verbalizer class for English verb conjugations.

verbalizer

The verbalizer is a default shared instance of the Verbalizer class. It comes preloaded with standard English conjugation rules and irregular verbs.

When to Use

  • Use this instance when you don't need multiple configurations.
  • If you need isolated or custom rules, you can instantiate the class directly as new Verbalizer().

Features

  • Convert verbs between base, past tense, and past participle forms.
  • Built-in support for irregular verbs (e.g. gowentgone).
  • Preserves case sensitivity of input verbs.
  • Modify rules dynamically at runtime.

Example Usage

playground.ts

Extending Rules

Since verbalizer is a shared instance, modifications to it at runtime affect all consumers:

import { verbalizer } from 'toolbox-x/verbalizer';

// Add a custom base rule
verbalizer.addBaseRule(/ied$/i, 'y');

// Add a custom past tense rule
verbalizer.addPastRule(/e$/i, 'ed');

// Add a custom past participle rule
verbalizer.addParticipleRule(/e$/i, 'ed');

// Add an irregular verb
verbalizer.addIrregular('swim', 'swam', 'swum');

See Also

Last updated: Sun, Jun 14, 2026 07:52:00PM (UTC)

On this page