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.
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.
files()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.