PHPackages                             tuxonice/words - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tuxonice/words

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tuxonice/words
==============

A PHP package for generating pronounceable language-like words

v1.0.1(9mo ago)02MITPHPPHP &gt;=8.3CI passing

Since Jul 27Pushed 9mo agoCompare

[ Source](https://github.com/tuxonice/words)[ Packagist](https://packagist.org/packages/tuxonice/words)[ Docs](https://github.com/tuxonice/words)[ RSS](/packages/tuxonice-words/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

Word Generator
==============

[](#word-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a0a10e911831ddf8f38ee3385a3e19cfa80001924e3f60e202fd8c7fa493169e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7475786f6e6963652f776f7264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tuxonice/words)[![Total Downloads](https://camo.githubusercontent.com/b7c21d1d1f5da496a0db2d1a54e7af7ff8ac82538967fe8729bcb720a91bb346/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7475786f6e6963652f776f7264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tuxonice/words)[![GitHub Tests Action Status](https://camo.githubusercontent.com/eb41a2d989691e83af3cfcab72cb894a4d76f6926de1a5b3a3177e67bcd9ee1e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7475786f6e6963652f776f7264732f7068702d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/tuxonice/words/actions/workflows/php-tests.yml)[![License](https://camo.githubusercontent.com/0b48ee5e14821ede0db16e284a7b39a59928b38befd9ed6b0008e8628e6144f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7475786f6e6963652f776f7264733f7374796c653d666c61742d737175617265)](https://github.com/tuxonice/words/blob/main/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/0c2b64f86db4b023e7227b904cd0bb8cb62958eb60dc07a442cf03f31f3e06a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7475786f6e6963652f776f7264733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tuxonice/words)

A PHP package for generating pronounceable words based on language-specific phonetic patterns. Perfect for creating fictional names, placeholder text, or language generation experiments.

Features
--------

[](#features)

- Generate random words based on language-specific letter transition probabilities
- Support for multiple languages (currently Portuguese and Spanish)
- Standard mode with authentic language-specific phonetic patterns
- Easy mode with simpler letter combinations for easier pronunciation
- Command-line interface for quick word generation
- Configurable maximum word length and quantity
- Option to save generated words to a file
- Extensible design for adding new languages
- Fully object-oriented implementation with PSR-4 autoloading

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require tuxonice/words
```

### Manual Installation

[](#manual-installation)

```
# Clone the repository
git clone https://github.com/tuxonice/words.git
cd words

# Install dependencies
composer install
```

Usage
-----

[](#usage)

### Word Length Behavior

[](#word-length-behavior)

The `generateWord()` and `generateWords()` methods accept a length parameter that specifies the **maximum** length of the generated words. The actual length of generated words may be shorter depending on the language's phonetic patterns and transition rules. This approach ensures more natural-sounding words while still keeping them within the desired length constraints.

### Basic Usage

[](#basic-usage)

```
