The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lingua::ZH::CCDICT::Storage::InMemory - Store the dictionary in memory

USAGE

  use Lingua::ZH::CCDICT;

  my $dict = Lingua::ZH::CCDICT->new( storage => 'InMemory',
                                      file    => '/path/to/source/ccdict.txt',
                                    );

DESCRIPTION

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.

METHODS

This subclass offers no extra methods.

AUTHOR

David Rolsky <autarch@urth.org>

COPYRIGHT

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.