Dave Rolsky > Lingua-ZH-CCDICT > Lingua::ZH::CCDICT::Storage::InMemory

Download:
Lingua-ZH-CCDICT-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

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.

syntax highlighting: