Marius Gavrilescu

NAME

Aard - Read aarddict dictionaries

SYNOPSIS

  use Aard;
  my $dict = Aard->new('something.aar');
  printf "This dictionary (volume %d of %d) has %d entries\n", $dict->volume, $dict->total_volumes, $dict->count;
  printf "The tenth entry's key: %s\n", $dict->key(9);
  printf "The tenth entry's value: %s\n", $dict->article(9);

DESCRIPTION

Aard is a module for reading files in the Aard Dictionary format (.aar). A dictionary is an array of (key, article) pairs, with some associated metadata.

new(filename)

Creates a new Aard object for the given file.

fh

Returns the open filehandle to the dictionary.

count

Returns the number of entries in this dictionary.

key(index)

Returns the key of the indexth element. This method caches the keys.

article(index)

Returns the article of the indexth element. This method caches the articles.

uuid

Returns the UUID of this dictionary as a binary string. This is a value shared by all volumes of the same dictionary.

uuid_string

Returns the UUID of this dictionary as a human-readable string. This is a value shared by all volumes of the same dictionary.

volume

Returns the volume number of this file.

total_volumes

Returns the total number of volumes for this dictionary.

meta

Returns the raw metadata as a hashref.

article_count

Returns the number of unique articles in this volume (if article_count_is_volume_total is true) or in this dictionary (otherwise).

article_count_is_volume_total

Returns true if article_count means number of articles in this volume. This is always true since aardtools 0.9.0.

index_language
article_language
title
version
description
license
source

SEE ALSO

http://aarddict.org, http://aarddict.org/aardtools/doc/aardformat.html

AUTHOR

Marius Gavrilescu, <marius@ieval.ro>

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Marius Gavrilescu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.2 or, at your option, any later version of Perl 5 you may have available.