Text::Tradition - a software model for a set of collated texts
use Text::Tradition; my $t = Text::Tradition->new( 'name' => 'this is a text', 'input' => 'TEI', 'file' => '/path/to/tei_parallel_seg_file.xml' ); my @text_wits = $t->witnesses(); my $manuscript_a = $t->witness( 'A' ); $t = Text::Tradition->new(); $t->add_witness( 'sourcetype' => 'xmldesc', 'file' => '/path/to/teitranscription.xml' ); $t->add_witness( 'sourcetype => 'plaintext', 'sigil' => 'Q', 'string' => 'The quick brown fox jumped over the lazy dogs' ); ## TODO $t->collate_texts; my $text_path_svg = $t->collation->as_svg(); ## See Text::Tradition::Collation for more on text collation itself
Text::Tradition is a library for representation and analysis of collated texts, particularly medieval ones. A 'tradition' refers to the aggregation of surviving versions of a text, generally preserved in multiple manuscripts (or 'witnesses'). A Tradition object thus has one more more Witnesses, as well as a Collation that represents the unity of all versions of the text.
Creates and returns a new text tradition object. The following options are accepted.
Initialization based on a collation file:
Initialization based on a list of witnesses [NOT YET IMPLEMENTED]:
Return the Text::Tradition::Witness objects associated with this tradition, as an array.
Returns the Text::Tradition::Witness object whose sigil is $sigil, or undef if there is no such object within the tradition.
Instantiate a new witness with the given options (see documentation for Text::Tradition::Witness) and add it to the tradition.
Delete the witness with the given sigil from the tradition. Returns the witness object for the deleted witness.
Adds a set of witnesses from a JSON array specification. This is a wrapper to parse the JSON and call add_witness (with the specified $options) for each element therein.
This package is free software and is provided "as is" without express or implied warranty. You can redistribute it and/or modify it under the same terms as Perl itself.
Tara L Andrews <email@example.com>