X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=base%2Flib%2FText%2FTradition%2FParser%2FTabular.pm;h=ab91eb385dad3f3f6d01d3aae7e402d05ae96062;hb=a445ce40b95a497a8a6f5276e0933d158d392443;hp=c37fb3bbe6e0f418712c26b886eb804eca3688cc;hpb=951ddfe8781b6111653ed8074488e5ddb65178f7;p=scpubgit%2Fstemmatology.git diff --git a/base/lib/Text/Tradition/Parser/Tabular.pm b/base/lib/Text/Tradition/Parser/Tabular.pm index c37fb3b..ab91eb3 100644 --- a/base/lib/Text/Tradition/Parser/Tabular.pm +++ b/base/lib/Text/Tradition/Parser/Tabular.pm @@ -31,7 +31,8 @@ Text::Tradition::Parser::Tabular =head1 DESCRIPTION -Parser module for Text::Tradition to read an alignment table format, such as CSV. +Parser module for Text::Tradition to read an alignment table format, such as +CSV or Excel. =head1 METHODS @@ -39,15 +40,28 @@ Parser module for Text::Tradition to read an alignment table format, such as CSV Takes an initialized tradition and a set of options; creates the appropriate nodes and edges on the graph, as well as the appropriate -witness objects. The $option_hash must contain either a 'file' or a -'string' argument with the table to be parsed; it may also contain a -'sep_char' argument to specify how the fields are separated. - -The table should have witnesses arranged in columns, with the witness sigla -in the first row. Empty cells are interpreted as omissions (and thus -stemmatologically relevant.) Longer lacunae in the text, to be disregarded -in cladistic analysis, may be represented by filling the appropriate cells -with the tag '#LACUNA#'. +witness objects. The $option_hash can contain the following: + +=over + +=item * file - Name of file which contains the data + +=item * string - A string that itself contains the data. One of 'file' or +'string' is required. + +=item * sep_char - For plaintext formats, the field separation character. +Defaults to "\t" (tab-separated); should be "," for comma-separated format. + +=item * excel - If the data is in an Excel file, this option should be set +to 'xls' (for pre-2007 Excel format) or 'xlsx' (for Excel XML format.) + +=back + +The data should comprise a table with witnesses arranged in columns, with +the witness sigla in the first row. Empty cells are interpreted as +omissions (and thus stemmatologically relevant.) Longer lacunae in the +text, to be disregarded in cladistic analysis, may be represented by +filling the appropriate cells with the tag '#LACUNA#'. If a witness name ends in the collation's ac_label, it will be treated as an 'ante-correction' version of the 'main' witness whose sigil it shares.