Lingua::ZH::CCDICT::Storage::InMemory - Store the dictionary in memory
use Lingua::ZH::CCDICT; my $dict = Lingua::ZH::CCDICT->new( storage => 'InMemory', file => '/path/to/source/ccdict.txt', );
This module stores the CCDICT dictionary in memory. It uses a rather large amount of memory in doing so (234MB on my system), but it is fast.
The object can be serialized to disk and reloaded, which is quicker than parsing the dictionary source repeatedly.
For serious usage, the Lingua::ZH::CCDICT::Storage::BerkeleyDB class is strongly recommended, since you can save the results of parsing the CCDICT data between invocations of your code.
Lingua::ZH::CCDICT::Storage::BerkeleyDB
This subclass offers no extra methods.
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.