PICA::Schema::Builder - Create Avram Schema from examples
my $builder = PICA::Schema::Builder->new( title => 'My Schema' ); while (my $record = get_some_pica_record()) { $builder->add($record); } $schema = $builder->schema;
An Avram Schema can be created automatically from PICA::Data records. The result contains a list of field that have been used in any of the inspected records. The schema can tell which fields occurr in all records (required), whether a field has been repeated in a record (repeatable), and the same information for subfields (subfields). Subfield order is not taken into account.
required
repeatable
subfields
This class is a subclass of PICA::Schema.
The builder can be initialized with information of an existing builder or schema, in particular fields and total. Option ignore_unknown will ignore fields not already specified in fields.
fields
total
ignore_unknown
Analyse an additional PICA record.
Return a PICA::Schema that all analyzed records conform to. This methods creates a deep copy and removes all fields with total zero.
Catmandu::Breaker can analyze PICA data and create additional statistics.
To install PICA::Data, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PICA::Data
CPAN shell
perl -MCPAN -e shell install PICA::Data
For more information on module installation, please visit the detailed CPAN module installation guide.