Lingua::TypoGenerator - Generate plausible typos for a word


Lingua-TypoGenerator documentation  | view source Contained in the Lingua-TypoGenerator distribution.

Index


NAME

Top

Lingua::TypoGenerator - Generate plausible typos for a word

SYNOPSIS

Top

    use Lingua::TypoGenerator 'typos';
    my @typos = typos("information");
    # returns qw(ibformation, ifnormation, iformation, iiformation, ...)

    # use accents
    @typos = typos("año", accents => 1);
    # returns qw(aao, aaño, ano, ao, aoñ, añ, añi, añp...)

DESCRIPTION

Top

This module has a single exportable function, typos, which, given a string, returns a list of "plausible typos". It works by deleting characters, duplicating characters, transposing adjacent characters, and replacing characters by adjacent keys in the QWERTY keyboard. It can also optionally add, remove or change the type of accent in a character.

FUNCTIONS

Top

    @typos = typos($word, %options);

Return a list of typos given a word. The only available option at this time is accents => 1, which enables accent munging.

TODO

Top

This module has a "Western European" and QWERTY bias. Ideally, future versions should include options for localization and different keyboards.

AUTHOR

Top

Ivan Tubert-Brohman <itub@cpan.org>

COPYRIGHT

Top


Lingua-TypoGenerator documentation  | view source Contained in the Lingua-TypoGenerator distribution.