Lingua::ZH::CCDICT::Storage::BerkeleyDB - Store the dictionary in BerkeleyDB files
use Lingua::ZH::CCDICT; my $dict = Lingua::ZH::CCDICT->new( storage => 'BerkeleyDB', work_dir => '/path/to/work/dir', );
This module stores the CCDICT dictionary in a set of BerkeleyDB files. There is one file for the data and a number of other files used as indexes.
This storage implementation is quite fast and uses very little memory.
The only parameter it takes is "work_dir". This directory will be used when creating new files from a CCDICT source file, when parse_source_file() is called. Once these files exist, they can be re-used for future searches without parsing the source again.
parse_source_file()
This class is the most memory-efficient of all the storage classes, as it uses BerkeleyDB cursors for result sets. It is also quite fast.
This class offers only one method not documented in the Lingua::ZH::CCDICT class.
Lingua::ZH::CCDICT
This returns a list of the files that make up the dictionary. This list includes files automatically created by BerkeleyDB for its own use.
David Rolsky <autarch@urth.org>
Copyright (c) 2002-2007 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Lingua::ZH::CCDICT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::ZH::CCDICT
CPAN shell
perl -MCPAN -e shell install Lingua::ZH::CCDICT
For more information on module installation, please visit the detailed CPAN module installation guide.