
TM::Analysis - Topic Maps, analysis functions

use TM::Materialized::AsTMa; my $tm = new TM::Materialized::AsTMa (file => 'test.atm'); $tm->sync_in; Class::Trait->apply ($tm, 'TM::Analysis'); print Dumper $tm->statistics; print Dumper $tm->orphanage;

This package contains some topic map analysis functionality.

This (currently quite limited) function computes a reference to hash containing the following fields:
nr_topletsNr of midlets in the map. This includes ALL midlets for topics and also those for assertions.
nr_assertsNr of assertions in the map.
nr_clustersNr of clusters according to the cluster function elsewhere in this document.
This computes all topics which have either no supertype and also those which have no type. Without further parameters, it returns a hash reference with the following fields:
untypedHolds a list reference to all topic ids which have no type.
emptyHolds a list reference to all topic ids which have no instance.
unclassifiedHolds a list reference to all topic ids which have no superclass.
unspecifiedHolds a list reference to all topic ids which have no subclass.
Optionally, a list of the identifiers above can be passed in so that only that particular information is actually returned (some speedup):
my $o = TM::Analysis::orphanage ($tm, 'untyped');


Copyright 200[3-68] by Robert Barta, <drrho@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.