Lingua::StarDict - Perl interface to the StarDict
use Lingua::StarDict; my $sd = new StarDict; # or my $sd = new StarDict( dict => "path_to_dictionary.ifo" ); my $dicts = $sd->dictionaries; my $result = $sd->search("word");
Lingua::StarDict allows you to translate words via StarDict library and its dictionaries. This module is only an interface, so your should install the StarDict before. Full StarDict (with GUI and a lot of dependeces on GNOME libraries) can be found at http://stardict.sourceforge.net and the console version SDCV - StarDict console version (without depencies on GNOME) - here http://sdcv.sourceforge.net
returns the reference to an array of hashes.
use Lingua::StarDict; use Data::Dumper; my $sd = new Lingua::StarDict; print Dump( $sd->dictionaries ); $VAR1 = [ { 'wordcount' => 110339, 'ifofile' => '/usr/share/stardict/dic/en-ru-bars.ifo', 'bookname' => 'en-ru-bars' }, ... ];
some_word
Search an translation for the given word. Returns the reference to an array of hashes.
print Dump( $sd->search("some_word") ); $VAR1 = [ { 'explanation' => 'some_word explanation', 'bookname' => 'dictionary name', # dictionary name where it was found 'definition' => 'some_word definition' }, ... ];
StarDict http://stardict.sourceforge.net/
SDCV StarDict console version without dependencies on a GNOME libraries. http://sdcv.sourceforge.net/
Suhanov Vadim <suhanov_vadim@mail.ru>
Copyright (C) 2004 by Suhanov Vadim
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
3 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Lingua::StarDict, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::StarDict
CPAN shell
perl -MCPAN -e shell install Lingua::StarDict
For more information on module installation, please visit the detailed CPAN module installation guide.