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.
This subclass offers no extra methods.
David Rolsky <firstname.lastname@example.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.