NAME

Lingua::TypoGenerator - Generate plausible typos for a word

SYNOPSIS

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

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

@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

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

AUTHOR

Ivan Tubert-Brohman <itub@cpan.org>

COPYRIGHT

Copyright (c) 2004 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 107:

Non-ASCII character seen before =encoding in 'typos("año",'. Assuming UTF-8