XAO::DO::SpellChecker::Base - base class for spellcheckers
my $server=XAO::Objects->new( objname => 'SpellChecker::Aspell', }); $server->server_run; my $speller=XAO::Objects->new( objname => 'SpellChecker::Aspell', ); $speller->switch_index($index_id); my $pairs=$speller->suggest_replacements("speling bee"); my $speller=XAO::Objects->new( objname => 'SpellChecker::Aspell', ); my $wlist=$speller->dictionary_create; $speller->dictionary_add($wlist,'perl'); $speller->dictionary_close($wlist);
Provides spell-checker base functions -- server, client, utility functions. The actual spellchecker should be implemented independently on top of it.
Methods are:
Runs the spellchecker server that clients can connect to. Never returns.
Switches the spellchecker to a different index. This has an effect of creating another copy of spellchecker where supported, possibly connected to a different dictionary.
By default it simply stores new index into $self->{'current_index'}. Returns old index value.
Internal method. Connects to the spelling server.
Pure virtual method, needs to be overriden by a specific spellchecker.
Nothing.
Copyright (c) 2005 Andrew Maltsev
<am@ejelta.com> -- http://ejelta.com/xao/
Recommended reading: XAO::Indexer, XAO::DO::Indexer::Base, XAO::DO::Data::Index.
To install XAO::Indexer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAO::Indexer
CPAN shell
perl -MCPAN -e shell install XAO::Indexer
For more information on module installation, please visit the detailed CPAN module installation guide.