NAME

Text::TEI::Collate::Word - represent a collatable word in a manuscript text

DESCRIPTION

Text::TEI::Collate::Word is an object that describes a word in a collated text. This may be a useful way for editors of other things to plug in their own logic.

METHODS

new

Creates a new word object. This should probably only be called from Text::TEI::Collate::Manuscript. Constructor arguments (apart from the attributes) are:

  • string - the initial word string that should be parsed into its forms

  • json - a hash, presumably read from JSON, that has all the attributes

  • empty - a flag to say that this should be an empty word.

Access methods

word

The word according to canonical orthography, without any punctuation.

printable

Return either the word or the 'special', as applicable

original_form

If called with an argument, sets the form of the word, punctuation and all, that was originally passed. Returns the word's original form.

canonical_form

If called with an argument, sets the canonical form of the word (including punctuation). Returns the word's canonical form.

comparison_form

If called with an argument, sets the normalized comparison form of the word (the string that is actually used for collation matching.) Returns the word's comparison form.

punctuation

If called with an argument, sets the punctuation marks that were passed with the word. Returns the word's puncutation.

language

The name of the language module we are using (from Text::TEI::Collate::Lang) to derive our canonical and comparison word forms.

special

Returns a word's special value. Used for meta-words like BEGIN and END.

is_empty

Returns whether this is an empty word. Useful to distinguish from a special word.

is_glommed

Returns true if the word has been matched together with its following word. If passed with an argument, sets this value.

is_base

Returns true if the word has been matched together with its following word. If passed with an argument, sets this value.

placeholders

Returns the sectional markers, if any, that go before the word.

add_placeholder

Adds a sectional marker that should precede the word in question.

ms_sigil

Returns the sigil of the manuscript wherein this word appears.

Returns the list of links, or an empty list.

Adds to the list of 'like' words in this word's column.

linked_to

Returns the (base) word, if any, that this word is linked to.

variants

Returns the list of variants, or an empty list.

add_variant

Adds to the list of 'different' words in this word's column.

variant_of

Returns the word of which this word is a variant.

Removes the given word from this word's list of variants.

AUTHOR

Tara L Andrews <aurum@cpan.org>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 177:

Non-ASCII character seen before =encoding in ''ἔστιν;','. Assuming CP1252